Content display method and device, electronic equipment, storage medium and program product

By receiving content display requests, obtaining and filtering node collections, and typesetting in the display area based on display typesetting parameters, solving the problem of low display application efficiency in the prior art, and achieving the effect of quickly displaying complex content.

CN119250017APending Publication Date: 2025-01-03GUANGZHOU TENCENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310812763.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Current display applications are less efficient when loading and typing e-books, especially when the content is complex, resulting in slow display speed and inability to quickly display content.

Method used

By receiving content display requests, obtain the node collection of content to be displayed, filter and prune nodes, type in the display area based on display typesetting parameters, generate node layout information, and display content in the display area.

Benefits of technology

Improves the display efficiency of content, reduces layout time, and improves the display effect, especially when processing complex content, which can be displayed quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250017A_ABST
    Figure CN119250017A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a content display method and device, electronic equipment, a storage medium and a program product, which can be applied to various scenes such as cloud technology, artificial intelligence, intelligent transportation, Internet of Vehicles and the like. The method comprises the following steps: receiving a content display request, wherein the content display request comprises display typesetting parameters of to-be-displayed content; obtaining a node set corresponding to the to-be-displayed content, wherein the node set comprises a node converted by each content element in the to-be-displayed content; screening out at least one node from the node set according to the display typesetting parameters to obtain a candidate node set, and pruning the nodes of the candidate node set to obtain an identification node set; based on the identification node set, typesetting nodes in the node set in a display area corresponding to the display typesetting parameters to obtain node typesetting information; and displaying the to-be-displayed content in the display area according to the node typesetting information. The display efficiency of the to-be-displayed content can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display technology, and specifically to a content display method, device, electronic device, storage medium and program product, wherein the storage medium is a computer-readable storage medium, and the program product is a computer program product. Background Art

[0002] Currently, more and more users browse requested content such as e-books through display applications such as reading applications. However, with the increase in user scale and content categories, current display applications have become increasingly difficult to meet user needs.

[0003] When loading content such as e-books through the current display application, the current display application needs to spend a lot of time to segment the text in the content during the process of typesetting the content, and then typeset the text after word segmentation. Especially when the content in the e-book is more complicated, the current display application needs to spend more time to typeset the content and then display the content on the display page. As a result, the current display application cannot quickly display the content on the display page.

[0004] In summary, there is currently a problem of low content display efficiency. Summary of the invention

[0005] The embodiments of the present application provide a content display method, device, electronic device, storage medium and program product, which can improve the display efficiency of content.

[0006] A content display method, comprising:

[0007] receiving a content display request, the content display request including display layout parameters of the content to be displayed;

[0008] Obtaining a node set corresponding to the content to be displayed, the node set including nodes converted from each content element in the content to be displayed;

[0009] According to the display layout parameters, at least one node is selected from the node set to obtain a candidate node set, and the nodes of the candidate node set are pruned to obtain an identification node set;

[0010] Based on the identified node set, the nodes in the node set are laid out in a display area corresponding to the display layout parameter to obtain node layout information;

[0011] According to the node layout information, the content to be displayed is displayed in the display area.

[0012] Accordingly, an embodiment of the present application provides a content display device, including:

[0013] A receiving unit, which may be used to receive a content display request, wherein the content display request includes display layout parameters of the content to be displayed;

[0014] An acquisition unit may be used to acquire a node set corresponding to the content to be displayed, the node set including a node converted from each content element in the content to be displayed;

[0015] The screening unit may be used to screen out at least one node from the node set according to the display layout parameter to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identification node set;

[0016] The layout unit can be used to layout the nodes in the node set in the display area corresponding to the display layout parameter based on the identified node set to obtain node layout information;

[0017] The display unit can be used to display the content to be displayed in the display area according to the node layout information.

[0018] Optionally, in some embodiments, the acquisition unit can be specifically used to acquire historical content display records, search for target historical display records of the content to be displayed in the historical content display records; based on the query results, generate a node corresponding to each content element in the content to be displayed to obtain a node set.

[0019] Optionally, in some embodiments, the acquisition unit can be specifically used to extract a node set corresponding to the content to be displayed from a preset cache space when there is a target historical display record; when there is no target historical display record, obtain content elements of the content to be displayed, and convert the content elements into nodes to obtain a node set corresponding to the content to be displayed.

[0020] Optionally, in some embodiments, the acquisition unit can be specifically used to identify the element type of each content element in the content to be displayed, and obtain node parameters corresponding to the element type; based on the node parameters, generate nodes corresponding to the content elements to obtain a node set corresponding to the content to be displayed.

[0021] Optionally, in some embodiments, the acquisition unit can be specifically used to convert the format of the content element in the content to be displayed to obtain a target content element in a target format; determine the element type corresponding to the target content element according to the element attribute information of the target content element, and use the element type corresponding to the target content element as the element type corresponding to the content element.

[0022] Optionally, in some embodiments, the display unit can also be used to extract historical display layout parameters from a preset cache space; when the display layout parameters are the same as the historical display layout parameters, extract historical node layout information of the content to be displayed from the preset cache space; based on the historical node layout information, display the content to be displayed in the display area.

[0023] Optionally, in some embodiments, the screening unit can be specifically used to sort the nodes in the node set to obtain a sorting result, and based on the sorting result, determine a target node in a preset sorting range in the node set; based on the target node, screen out candidate nodes in a preset sorting position from the nodes in the candidate node set; determine the node distance between the target node and the candidate node, and prune the nodes of the candidate node set according to the display layout parameters and the node distance to obtain an identified node set.

[0024] Optionally, in some embodiments, the screening unit can be specifically used to classify the target nodes based on display layout parameters and node distance to obtain node types; when the node type is different from the preset node type, the nodes of the candidate node set are pruned to obtain the identified node set.

[0025] Optionally, in some embodiments, the screening unit can be specifically used to determine the actual layout parameters between the target node and the candidate node based on the node distance; when the parameter value of the actual layout parameter is greater than the parameter value of the display layout parameter, the candidate node is deleted from the candidate node set to obtain the identified node set.

[0026] Optionally, in some embodiments, the screening unit can be specifically used to fuse the display layout parameters and the node distance to obtain fused parameters; when the fused parameters are not within the preset parameter range, it is determined that the node type is different from the preset node type; when the fused parameters are within the preset parameter range, it is determined that the node type is the same as the preset node type.

[0027] Optionally, in some embodiments, the content display device also includes an updating unit, which can be specifically used to obtain node layout parameters corresponding to the target node when the node type is the same as the preset node type, and bind the node layout parameters to the target node to obtain a bound target node; according to the bound target node, update the candidate node set to obtain an updated node set, and use the updated node set as the candidate node set.

[0028] Optionally, in some embodiments, the layout unit can be specifically used to segment the node set based on the identified node set to obtain node subsets; layout the nodes in the node subset in a display area corresponding to the display layout parameters to obtain node layout information.

[0029] Optionally, in some embodiments, the layout unit can be specifically used to determine, according to the display layout parameters, a display sub-area corresponding to a node subset in a display area corresponding to the display layout parameters; calculate node coordinates of the nodes in the node subset in the display sub-area based on sequence information of the nodes in the node subset, and generate node layout information according to the node coordinates.

[0030] Optionally, in some embodiments, the layout unit can be specifically used to obtain display parameters corresponding to the node subset, and fuse the display layout parameters and the display parameters to obtain target fused parameters; based on the target fused parameters, determine the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters.

[0031] Optionally, in some embodiments, the display unit can be specifically used to obtain content elements corresponding to each node in the node set in the content to be displayed; based on the node layout information, the content elements are rendered in the display area to display the content to be displayed in the display area.

[0032] In addition, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the content display method provided by the embodiment of the present invention.

[0033] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for loading by a processor to execute any content display method provided in the embodiment of the present application.

[0034] In addition, an embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, any content display method provided in the embodiment of the present application is implemented.

[0035] The present application can receive a content display request, the content display request includes display layout parameters of the content to be displayed; obtain a node set corresponding to the content to be displayed, the node set includes nodes converted from each content element in the content to be displayed; according to the display layout parameters, filter out at least one node in the node set to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identification node set; based on the identification node set, layout the nodes in the node set in the display area corresponding to the display layout parameters to obtain node layout information; according to the node layout information, display the content to be displayed in the display area. Since the embodiment of the present application can obtain a node set of the content to be displayed, it can filter out at least one node in the node set based on the display layout parameters included in the content display request to obtain a candidate node set. On this basis, the present application also prunes the candidate node set. In this way, the present application can quickly layout the nodes in the node set based on the identification node set obtained by pruning, so that the node layout information can be obtained based on the layout, and the content to be displayed can be quickly displayed in the display area to improve the display efficiency of the content. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 is a scene schematic diagram of the content display method provided in an embodiment of the present application;

[0038] Figure 2 is a flowchart of a content display method provided in an embodiment of the present application;

[0039] Figure 3 is a schematic diagram of a display area provided in an embodiment of the present application;

[0040] Figure 4 is a second schematic diagram of a display area provided in an embodiment of the present application;

[0041] Figure 5 are three schematic diagrams of the display area provided in the embodiments of the present application;

[0042] Figure 6 It is a schematic diagram of the module architecture provided in the embodiment of the present application;

[0043] Figure 7 is a schematic diagram of the implementation process of step S203 provided in an embodiment of the present application;

[0044] Figure 8is a schematic diagram of the implementation process of step S41 provided in an embodiment of the present application;

[0045] Fig. 9 It is a comparative schematic diagram of the display effects of the prior art and the present application;

[0046] Fig.10 FIG2 is a second flow chart of a content display method provided in an embodiment of the present application;

[0047] Fig.11 is a schematic diagram of the structure of a content display device provided in an embodiment of the present application;

[0048] Fig.12 is a second schematic diagram of the structure of a content display device provided in an embodiment of the present application;

[0049] Fig.13 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0051] The embodiments of the present application provide a content display method, device, computer equipment and computer readable storage medium. The content display device can be integrated in a computer equipment, which can be a server or a terminal.

[0052] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, car terminal, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0053] For example, see Figure 1Taking the content display device integrated in a computer device as an example, the computer device can receive a content display request; obtain a node set corresponding to the content to be displayed; according to the display layout parameters, filter out at least one node in the node set to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identified node set; based on the identified node set, layout the nodes in the node set in a display area corresponding to the display layout parameters to obtain node layout information; and display the content to be displayed in the display area according to the node layout information.

[0054] The content display request includes display layout parameters of the content to be displayed. The content to be displayed may include but is not limited to any one of an e-book, a tweet, and a conversation.

[0055] The node set includes nodes converted from each content element in the content to be displayed.

[0056] The content display method involved in the present application is used to display content to be displayed. In the process of displaying the content to be displayed, the present application can obtain a candidate node set based on the node set of the content to be displayed. On this basis, in order to be able to display the content to be displayed more effectively and efficiently, the present application prunes the candidate node set. In this way, the nodes in the node set can be quickly laid out based on the identified node set obtained by pruning, so that the node layout information can be obtained based on the layout, and the content to be displayed can be quickly displayed in the display area to improve the display efficiency of the content.

[0057] Among them, it can be understood that the relevant data such as conversations, display layout parameters and other related data involved in the present application need to obtain permission or consent when applied to specific products or technologies, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.

[0058] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0059] This embodiment will be described from the perspective of a content display device, which can be specifically integrated into a computer device, which can be a server or a terminal. The terminal can include a tablet computer, a laptop computer, a personal computer (PC), a wearable device, a virtual reality device, or other smart devices that can acquire data.

[0060] A content display method, comprising:

[0061] A content display request is received, the content display request includes display layout parameters of the content to be displayed; a node set corresponding to the content to be displayed is obtained, the node set includes nodes converted from each content element in the content to be displayed; according to the display layout parameters, at least one node is screened out from the node set to obtain a candidate node set, and the nodes of the candidate node set are pruned to obtain an identified node set; based on the identified node set, the nodes in the node set are laid out in a display area corresponding to the display layout parameters to obtain node layout information; according to the node layout information, the content to be displayed is displayed in the display area.

[0062] The above content display method is further described below. Figure 2 As shown, the specific process of the content display method is shown in steps S201 to S205:

[0063] S201: Receive a content display request.

[0064] The content display request includes display layout parameters of the content to be displayed. The display layout parameters may be parameters related to the layout of the content to be displayed in the display area; the display layout parameters may include, for example, display parameters of the display area and preset content parameters. The display parameters of the device may include the area size of the display area, for example, the area size of the display area may include the size of the display screen of the computer device; the preset content parameters may include the size of the content elements in the content to be displayed, and the size of the content elements may be, for example, font size, line width, etc. The preset content parameters may be parameters set by the user or default parameters.

[0065] In step S201, there are multiple ways to receive a content display request, as shown in Example 1 and Example 2 below:

[0066] Example 1, for example, a computer device may display a content display interface, which includes multiple candidate contents to be displayed; in response to a selection operation on the candidate contents to be displayed, the content to be displayed is determined from the candidate contents to be displayed, and a content display request for the content to be displayed is generated.

[0067] Among them, the method of step "generating a content display request for the content to be displayed" can be: according to the content identifier of the content to be displayed, query the display layout parameters of the content to be displayed in the historical layout parameter setting record; when the display layout parameters exist, extract the display layout parameters of the content to be displayed, and generate a content display request according to the display layout parameters; when the display layout parameters do not exist, obtain the default candidate display layout parameters, and use the candidate display layout parameters as the display layout parameters; generate a content display request according to the display layout parameters.

[0068] Among them, the method of the step "querying the display layout parameters of the content to be displayed in the historical layout parameter setting record according to the content identification of the content to be displayed" can be: when the current time reaches the preset time threshold, query the display layout parameters of the content to be displayed in the historical layout parameter setting record according to the content identification of the content to be displayed.

[0069] There may be many types of content to be displayed, such as e-books, tweets, etc. For example, when the content to be displayed is an e-book, the computer device is a smart phone as an example. Figure 3 As shown, the smart phone can display a display area through the client, and the display area can be a content display interface. The content display interface can include multiple candidate e-books, such as Figure 3 The user can click on the candidate e-books to make the smart phone respond to the selection operation on the candidate e-books and determine the e-book to be displayed from the candidate e-books. For example, the e-book to be displayed selected by the user is Figure 3 The smartphone then generates a content display request for the electronic book to be displayed.

[0070] After generating a content display request, the smartphone can obtain the node layout information of the electronic book to be displayed through steps S202 to S205 described below in this application, and then display the electronic book to be displayed in the display area based on the node layout information.

[0071] Among them, Figure 4 As shown, before the electronic book to be displayed is displayed in the display area, the display area may present loading information. Of course, before the electronic book to be displayed is displayed in the display area, the display area may not present loading information. Then, the electronic book to be displayed may be displayed in the display area as shown in FIG. Figure 5 shown.

[0072] Example 2: For example, the content requesting device sends a display request for the content to be displayed to the computer device; the computer device receives the content display request sent by the content requesting device.

[0073] The content requesting device and the computer device are different devices. In this case, the computer device and the content requesting device can be set in the same local area network, so that the content requesting device can quickly obtain the node layout information through the computer device through the following steps S202 to S204, and then the content requesting device can display the content to be displayed in the display area on the content requesting device.

[0074] S202: Obtain a node set corresponding to the content to be displayed.

[0075] The node set includes nodes converted from each content element in the content to be displayed. The nodes in the node set may be data nodes used to enable a device such as a computer device to draw the content to be displayed in a display area. The nodes may include nodes of multiple node types, for example, the node types may include content node types, line break node types, and blank node types, and accordingly, the nodes may include content nodes of content node types, line break nodes of line break node types, and blank nodes of blank node types.

[0076] A content node may refer to a node used to draw actual content in a display area, wherein the actual content may include but is not limited to text and images in the content to be displayed. A line break node may refer to a node used to draw a line break of actual content in a display area. A blank node may refer to a node used to draw a blank area in a display area.

[0077] In step S202, the method for obtaining the node set corresponding to the content to be displayed can be, for example: obtaining historical content display records, searching the historical content display records for the target historical display records of the content to be displayed; based on the query results, generating a node corresponding to each content element in the content to be displayed to obtain a node set.

[0078] The historical content display record may be a record of content display by a device such as a computer device or the above-mentioned content request device within a historical time, wherein the content to be displayed may belong to content. The content element may refer to an element constituting the content to be processed, such as text, image, symbol, etc.

[0079] The method of step “obtaining historical content display records” can be: extracting historical content display records from the cloud, or a local computer device, or a content requesting device.

[0080] There are many ways to perform the step of "generating a node corresponding to each content element in the content to be displayed based on the query result to obtain a node set", such as the first and second methods:

[0081] Method 1: Based on the query result, a node corresponding to each content element in the content to be displayed is generated. The method of obtaining the node set can be as shown in step S1 to step S2:

[0082] Step S1: When there is no target historical display record, obtain the content element of the content to be displayed.

[0083] Among them, the method of the step "obtaining content elements of the content to be displayed" can be: obtaining the content format of the content to be displayed; when the content format is the target content format, directly extracting the content elements from the content to be displayed; when the content format is not the content format, converting the content format of the content to be displayed to obtain the content to be displayed in the target content format; directly extracting the content elements from the content to be displayed in the target content format.

[0084] Among them, the step of "converting the content format of the content to be displayed into the target content format" can be: taking the content to be displayed as the content to be processed; searching for the format tag in the content to be processed; extracting the target content from the content to be processed according to the format tag, and taking the target content as the content to be displayed in the target content format.

[0085] Here, the content to be displayed is an e-book as an example. For example, when the content format of the e-book is in txt format, the content elements can be directly extracted from the e-book; when the content format of the e-book is not in txt format, for example, when the content format of the e-book is in html format, the e-book needs to be stripped of html format tags to obtain the target content in plain text.

[0086] Step S2: Convert the content elements into nodes to obtain a node set corresponding to the content to be displayed.

[0087] In step S2, the content elements are converted into nodes, and the method of obtaining the node set corresponding to the content to be displayed can be as shown in steps S21 to S22:

[0088] Step S21: Identify the element type of each content element in the content to be displayed, and obtain node parameters corresponding to the element type.

[0089] Among them, the element type may include space type, number type, Latin character type, line break type, dash type, start punctuation type, other punctuation types, and non-Latin character types. Among them, a content element of space type may refer to a content element that is a space; a content element of number type may refer to a content element that is an Arabic numeral; a content element of Latin character type may refer to a content element that is Latin, such as English, German, etc.; a content element of line break type may refer to a content element that is a line break symbol; a content element of dash type may refer to a content element that is a dash; a content element of start punctuation type may refer to a content element that is a start punctuation mark, which is a punctuation mark indicating the beginning of a paragraph of content, such as the leading quotation mark """ of a double quotation mark and the leading quotation mark "《" of a book title; a content element of other punctuation type may refer to a content element that is not a line break mark, a start punctuation mark, a dash, etc., and a content element of other punctuation type may include but is not limited to a comma, a period, a double quotation mark, and a semicolon. A content element of non-Latin character type may refer to a content element that is not Latin, such as Chinese, Japanese, Korean, etc.

[0090] The method of the step of "identifying the element type of each content element in the content to be displayed" can be as shown in steps S211 to S212:

[0091] Step S211: convert the format of the content elements in the content to be displayed to obtain target content elements in a target format.

[0092] Among them, the present application can use a format conversion tool to convert the format of the content elements in the content to be displayed to obtain the target content elements in the target format. Specifically, the step of "converting the format of the content elements in the content to be displayed to obtain the target content elements in the target format" can be: using the format conversion tool to obtain the encoding corresponding to the content elements in the content to be displayed, and converting the content elements according to the encoding corresponding to the content elements to obtain the target content elements in the target format.

[0093] Step S212: Determine the element type corresponding to the target content element according to the element attribute information of the target content element, and use the element type corresponding to the target content element as the element type corresponding to the content element.

[0094] Among them, the step of "determining the element type corresponding to the target content element according to the element attribute information of the target content element" can be: obtaining the correspondence between the preset element attribute information and the element type; and determining the element type corresponding to the target content element from the correspondence according to the element attribute information of the target content element.

[0095] The element attribute information may refer to information that can be used to describe the characteristics of the target content element. For example, when the content to be displayed is a Chinese e-book, the element attribute information may be used to describe the Chinese characteristics of the target content element; when the content to be displayed is a Korean e-book, the element attribute information may be used to describe the Korean characteristics of the target content element. The element attribute information may include encoding information of the target element content.

[0096] The step of "obtaining node parameters corresponding to the element type" may be performed by: obtaining the association relationship between the preset element type and the node parameters; and extracting the node parameters corresponding to the element type according to the association relationship.

[0097] The node parameters may include but are not limited to the node identification and the node sequence information.

[0098] Step S22: Generate nodes corresponding to the content elements based on the node parameters to obtain a node set corresponding to the content to be displayed.

[0099] In step S22, based on the node parameters, the nodes corresponding to the content elements are generated to obtain the node set corresponding to the content to be displayed. The method can be: based on the node parameters, the nodes corresponding to the content elements are generated; when the node is a node of the target node type, the node layout parameters corresponding to the node are obtained, and the node layout parameters are associated with the node to obtain the node carrying the node layout parameters; the node carrying the node layout parameters is used as the node corresponding to the content element; according to the node corresponding to the content element, a node set corresponding to the content to be displayed is constructed.

[0100] The target node type may include a line break node type and a space node type.

[0101] The node layout parameters may refer to parameters for layout of nodes in a display area, for example, the node layout parameters may include a penalty value and a penalty coefficient.

[0102] In step S22, based on the node parameters, nodes corresponding to the content elements are generated to obtain a node set corresponding to the content to be displayed. The method may also be: based on the node parameters, nodes corresponding to the content elements are generated; and based on the nodes corresponding to the content elements, a node set corresponding to the content to be displayed is constructed.

[0103] When constructing a node set corresponding to the content to be displayed, the present application may also add nodes to the node set. For example, when the target content elements include target content elements of a preset element type, the target content elements are sorted to obtain a target content element sequence; the target content element sequence is segmented to obtain an element segmentation, wherein the element segmentation includes a plurality of target content elements arranged in sequence in a sorting order; according to the sorting order of the target content elements in the element segmentation, a node of a preset node type is set in the element segmentation; the node typesetting parameters of the node of the preset node type are obtained; the node typesetting parameters are bound to the preset node type to obtain a target binding node; according to the target binding node, the node set is updated to obtain a target updated node set; and the target updated node set is used as the node set corresponding to the content to be displayed. The preset node type may be a line break node type.

[0104] The following will take the content to be displayed as an e-book as an example to explain the first method. For example, a computer device can be provided with a preprocessing module to implement the first method. Figure 6 As shown, the preprocessing module 41 includes a type identification module 411 , a node generation module 412 , a special character processing module 413 and a word segmentation module 414 .

[0105] Among them, the type identification module 411 can at least be used to identify the element type of each content element; the node generation module 412 can at least be used to generate nodes corresponding to the content elements; the special character processing module 413 can at least be used to process special target content elements; and the word segmentation module 414 can at least be used to segment the target content element sequence of the target content element. The details are described below.

[0106] The present application obtains the content elements of the content to be displayed through the type identification module 411, and then performs format conversion on the content elements in the content to be displayed to obtain the target content elements of the target format. Next, the target content elements are sorted to obtain a target content element sequence; then, according to the element attribute information of the target content elements in the target content element sequence, the element type corresponding to the target content element is determined; the element type corresponding to the target content element is used as the element type corresponding to the content element; and the node parameter corresponding to the element type is obtained.

[0107] Specifically, the type recognition module 411 can convert the content elements corresponding to the plain text into target content elements in the utf-8 format, so as to obtain target content elements of multiple element types. Among them, the element type of the target content element and the element type of the content element can be the same. Based on this, the target content elements can include target content elements of the space type, target content elements of the number type, target content elements of the Latin character type, target content elements of the line break type, target content elements of the dash type, target content elements of the start punctuation type, target content elements of other punctuation types, and target content elements of the non-Latin character type.

[0108] Specifically, for example, when the target content element sequence includes "numbers", "Latin characters", and "non-Latin characters", this application can determine the element type corresponding to the target content element according to the element attribute information of the target content element, and then can also cut the target content element sequence into target content element subsequences based on the element type. For example, the target content element sequence "123abc一二三" will be cut into three target content element subsequences: "123", "abc", and "一二三".

[0109] If there are elements other than "numbers", "Latin characters", and "non-Latin characters" in the target content element sequence, there will be different processing methods. For example, when the target content element is a "line break", according to the element attribute information of the target content element, determine that the element type of the target content element is the line break type, so that the node generation module 412 can generate a line break node with a penalty value of negative infinity based on the node parameters, so that the content to be displayed is line-wrapped; when the target content element is a "dash", according to the element attribute information of the target content element, determine that the element type of the target content element is the dash type, so that the node generation module 412 can generate a line break node with a penalty value of positive infinity, a drawing node of a dash, and a line break node with a smaller penalty value based on the node parameters; when the target content element is a "start punctuation", according to the element attribute information of the target content element, determine that the element type of the target content element is the start punctuation type, so that the node generation module 412 can generate a line break node with a penalty value of positive infinity based on the node parameters, ensuring that there will be no line breaks between the "other punctuation" from before the line break node to the "Latin characters" or "non-Latin characters". For example, in "他说:“”", there should be no line breaks between "说" and the previous quotation mark.

[0110] This application generates nodes corresponding to the content elements through the node generation module 412 based on the node parameters, so as to obtain a node set corresponding to the content to be displayed.

[0111] Specifically, the nodes in the node set generated by the node generation module 412 may include nodes of three node types, such as content nodes of a content node type, line break nodes of a line break node type, and blank nodes of a blank node type.

[0112] Among them, a blank node may refer to a node used to draw a blank area in the display area. The blank area may need to be stretched or shrunk or need to occupy the remaining part of a line according to different actual situations. Based on this, the present application can set node layout parameters for the blank node, such as setting the width coefficient, stretching index and shrinking index. The width coefficient can represent the ratio of the width of the blank area to the width of the space character; the larger the stretching index, the more the blank node can be stretched within an acceptable range; the larger the shrinking index, the more the blank node can be shrunk within an acceptable range. Among them, the width coefficient, stretching index and shrinking index can all be set to default values.

[0113] Among them, the line break node may refer to a node used to draw a line break for the actual content in the display area. The present application may set node typesetting parameters for the line break node, such as an additional width coefficient and a penalty coefficient. Among them, the additional width coefficient refers to the coefficient used when the content to be displayed includes English words, and the English words need to be interrupted and an additional hyphen needs to be added at the interruption; if the content to be displayed is Chinese, no hyphen is required, in this case the additional width coefficient can be set to 0. Among them, the penalty coefficient represents the penalty value that needs to be accumulated at the interruption. The higher the penalty value, the less interruption this interruption can have, and vice versa. When the penalty coefficient is positive infinity, it means that interruption is prohibited at the interruption, and when the penalty coefficient is negative infinity, it means that interruption must be made at this interruption. Among them, the interruption may include line break nodes and blank nodes.

[0114] The present application may also use a word segmentation module 414 to segment the target content element sequence of the target content element to add a new node to the node set.

[0115] Specifically, the present application can sort the target content elements through the word segmentation module 414 to obtain a target content element sequence; segment the target content element sequence to obtain an element word segmentation, wherein the element word segmentation includes a plurality of target content elements arranged in sequence in a sorting order; according to the sorting order of the target content elements in the element word segmentation, set a line break node of a line break node type in the element word segmentation; obtain the node typesetting parameters of the node of the line break node type; bind the node typesetting parameters to a preset node type to obtain a target bound node; according to the target bound node, update the node set to obtain a target updated node set; and use the target updated node set as the node set corresponding to the content to be displayed.

[0116] Specifically, when the target content elements include target content elements of Latin character type, the present application can sort the target content elements through the word segmentation module 414 to obtain a target content element sequence; segment the target content element sequence to obtain element segmentation, that is, words corresponding to the Latin character type; then, the word segmenter is used to obtain the syllable position information of the word based on the sorting order of each letter in the word. When the length of the word is greater than 4 and at the syllable position, a line break node is added. If the word has multiple syllables and the first syllable has only 2 letters, the penalty coefficient of the first syllable for the line break node will be relatively high, so as to avoid line breaks when the reader can hardly see the whole word.

[0117] The present application can process special target content elements through the special character processing module 413. For example, when it is detected that the element attribute information of the target content element is the same as the preset element attribute information, the candidate node typesetting parameters and candidate node parameters corresponding to the target content element are obtained; based on the candidate node typesetting parameters and the candidate node parameters, a node carrying the candidate node typesetting parameters is generated; based on the node carrying the candidate node typesetting parameters, a node set is updated to obtain a candidate update node set; and the candidate update node set is used as the node set.

[0118] For example, when the "." symbol is detected to represent a function call, a penalty node with a penalty coefficient of positive infinity is added after the "." to avoid interruption here; when the "'s" possessive symbol or ": / / " is detected, spaces or interruptions are avoided in the middle of the "'s" or ": / / ", etc.

[0119] Method 2: Based on the query result, a node corresponding to each content element in the content to be displayed is generated. The method for obtaining the node set may be: when there is a target historical display record, a node set corresponding to the content to be displayed is extracted from a preset cache space.

[0120] It should be noted here that the node set obtained by method one can be cached in a preset cache space, so that when the content to be displayed is loaded next time, that is, there is a target historical display record, the node set corresponding to the content to be displayed can be extracted from the preset cache space.

[0121] For the second method, the method of the step of "extracting a node set corresponding to the content to be displayed from the preset cache space" may be: extracting a node set corresponding to the content to be displayed from the preset cache space according to the content identifier of the content to be displayed.

[0122] The preset cache space may be a cache space in a local computer device or a cache space in a local content requesting device.

[0123] It can be understood here that the present application can directly extract the node set corresponding to the content to be displayed from the preset cache space, and can avoid generating a node set in such a way. This can improve the efficiency of obtaining the node set, and can also improve the subsequent layout efficiency of the nodes, thereby improving the display efficiency of the content to be displayed.

[0124] Based on method 2, the present application can also adopt another method to quickly display the content to be displayed, for example, extracting historical display layout parameters from a preset cache space; when the display layout parameters are the same as the historical display layout parameters, extracting the historical node layout information of the content to be displayed from the preset cache space; based on the historical node layout information, displaying the content to be displayed in the display area.

[0125] The historical display layout parameters may be display layout parameters within a historical period.

[0126] Among them, when the display layout parameters are the same as the historical display layout parameters, it means that the content to be displayed has been displayed within the historical time, and the historical display layout parameters have not been changed. Based on this, the historical node layout information of the content to be displayed can be extracted from the preset cache space to directly display the content to be displayed, avoiding layout of the content to be displayed again, thereby improving the display efficiency of the content to be displayed.

[0127] It should be noted here that the present application can store the node set and the historical node layout information in the same preset cache space, or in different preset cache spaces.

[0128] Here, the example of storing the node set and the historical node layout information in different preset cache spaces is used for explanation. For example, the preset cache space includes a node cache space and a layout information cache space.

[0129] This application can use the cache module of the computer device to cache the node set and historical node layout information. Figure 6 As shown, the cache module 42 may include a node cache module 421 , an information detection module 422 , a node deserialization module 423 , a layout information cache module 424 and a parameter detection module 425 .

[0130] (I) With respect to the node cache space, the present application can reduce the overhead of the node cache space. For example, when the cache module of the present application obtains the node set, the node set can be serialized and stored in the node cache space through the node cache module 421, that is, stored in the node cache space in a fixed order, wherein the node cache space can be a disk space. When the present application serializes and stores the node set in the node cache space through the node cache module 421, the node identifier corresponding to the node and the identifier of the node typesetting parameter corresponding to the node are not stored, but the parameter values ​​of the node typesetting parameters corresponding to the node are stored in a fixed order, which can reduce the overhead of the node cache space. For example, when the node is a content node, the node typesetting parameters of the node include width. In this case, the width value of the content node is stored in the node cache space in a fixed order; when the node is a blank node, the node typesetting parameters of the node include width coefficient, stretch index and shrink index. In this case, the width coefficient value, stretch index value and shrink index value of the blank node are stored in the node cache space in a fixed order.

[0131] Since the nodes are generated based on the order of content elements in the content to be displayed, based on this, the node cache module 421 does not need to store content elements or position information of content elements in the node cache space. It only needs to use one byte of the node cache space to store the position difference between adjacent nodes. Among them, when the node is the starting node, the position difference of the node is recorded as 0.

[0132] It should be noted here that in many scenarios, the node layout parameters of different nodes can be the same, for example, the width values ​​of different content nodes can be the same, and the stretching index values ​​and shrinking index values ​​of different blank nodes are the same. Based on this, the node cache module 421 can first write the most frequently appearing node layout parameters into the node cache space, and then use one byte to record whether the node layout parameters of the node are the same as the most frequent node layout parameters. In this way, the occurrence of duplicate data in the node cache space can be minimized.

[0133] Based on the above, this application can greatly reduce the storage overhead of disk space. Compared with the existing common serialization methods, we can get the following results: the serialization method of this application can reduce about 86.4% of the disk space compared with the Json serialization method; the serialization method of this application can reduce about 40.8% of the disk space compared with the ProtoBuf serialization method.

[0134] It should be noted here that, since the parameter values ​​of the serialized generated nodes are compact and no additional node version information can be inserted, a unified node version information is written at the beginning of the parameter value file. Based on this, when a node set is read in the node cache space, the present application can first determine whether the node version information stored therein is consistent with the current node version information carried by the content display request through the information detection module 422; when the node version information is inconsistent with the current node version information, it is necessary to re-acquire the node set in the manner of method one.

[0135] When the node version information is consistent with the current node version information, the present application may read the parameter values ​​in a fixed order through the node deserialization module 423 to obtain a node set.

[0136] (ii) With respect to the layout information cache space, the present application can store the historical node layout information in the layout information cache space through the layout information cache module 424. The present application also stores the historical display layout parameters corresponding to the historical node layout information in the layout information cache space through the layout information cache module 424, to prevent the inability to quickly display the content to be displayed when the display layout parameters and the historical display layout parameters are changed by the reader.

[0137] Based on this, when the content to be displayed is opened again, the present application can extract the historical display layout parameters in the preset cache space through the parameter detection module 425; compare the historical display layout parameters with the display layout parameters; when the display layout parameters are the same as the historical display layout parameters, extract the historical node layout information of the content to be displayed from the preset cache space, so that the content to be displayed can be displayed in the display area based on the historical node layout information.

[0138] It can be understood here that the present application caches the historical node layout information, which can greatly reduce the loading delay of the content to be displayed when it is not opened for the first time. If the user has not changed the settings, that is, the display layout parameters have not changed, the time consumption of opening the content to be displayed for the first time can be reduced by about 95.3%; if the user has changed the settings, but because the node set is cached, based on this, the time consumption of opening the content to be displayed for the first time can be reduced by about 53.5% compared with the first time opening the content to be displayed.

[0139] S203: According to the display layout parameter, at least one node is screened out from the node set to obtain a candidate node set, and the nodes of the candidate node set are pruned to obtain an identification node set.

[0140] The candidate node set may include nodes that are initially screened out and used to arrange the content to be displayed in different areas in the area to be displayed. Specifically, the candidate node set may include nodes that are initially screened out and used to arrange the content to be displayed in different areas in the area to be displayed.

[0141] Among them, the identification node set may include multiple identification nodes, and the identification node belongs to a node, wherein the identification node can be a node used to identify the division position of the content to be displayed in the area to be displayed. Specifically, the identification node can be a node used to identify the line break position of the content to be displayed in the area to be displayed.

[0142] It can be understood here that if the display content is directly divided into areas such as line breaks according to some nodes in the candidate node set, there may be a lot of line breaks, resulting in poor display effect of the content to be displayed in the display area. Based on this, the present application prunes the nodes in the candidate node set to discard some invalid nodes in the candidate nodes, so as to improve the display effect and display efficiency of the content to be displayed in the display area.

[0143] In step S203, at least one node is screened out from the node set according to the display layout parameters, and the candidate node set can be obtained by: sorting the nodes in the node set to obtain the sorting result, and obtaining the target sorting range in the sorting result; determining the nodes in the target sorting range in the node set; and screening out at least one node from the nodes in the target sorting range according to the node type and the display layout parameters of the node to obtain the candidate node set.

[0144] The nodes in the target sorting range may include some nodes in the node set, or all nodes in the node set.

[0145] Among them, the step of "filtering at least one node from the nodes in the target sorting range according to the node type and display layout parameters of the node to obtain a candidate node set" can be as follows: according to the node type of the node, filter out nodes whose node type is the set node type from the target sorting range; according to the display layout parameters, filter out at least one node from the nodes of the set node type to obtain a candidate node set.

[0146] The set node type may include a line break node type and a space node type.

[0147] Among them, the step of "filtering out at least one node from the nodes of the set node type according to the display layout parameters to obtain a candidate node set" can be as follows: judging whether the nodes of the set node type meet the preset requirements according to the display layout parameters; if the nodes of the set node type meet the preset requirements, extracting the nodes that meet the preset requirements, and constructing a candidate node set based on the nodes that meet the preset requirements.

[0148] Among them, the step of "determining whether the nodes of the set node type meet the preset requirements based on the display layout parameters" can be: according to the sorting order of the nodes, among the nodes of the preset node type, extract the first node whose sorting order is the preset sorting order, and the second node whose sorting order is after the preset sorting order; determine the target node distance between the first node and the second node, and determine whether the nodes of the set node type meet the preset requirements based on the target node distance and the display layout parameters.

[0149] Among them, the step of "determining whether the node of the set node type meets the preset requirements based on the target node distance and the display layout parameters" can be: mapping the target node distance to obtain the mapped distance; if the mapped distance is less than the display layout parameters, it is determined that the node of the set node type meets the preset requirements; if the mapped distance is greater than or equal to the display layout parameters, it is determined that the node of the set node type does not meet the preset requirements.

[0150] In step S203, the nodes of the candidate node set are pruned to obtain the identification node set in the manner shown in steps S31 to S33:

[0151] Step S31: sort the nodes in the node set to obtain a sorting result, and based on the sorting result, determine a target node in a preset sorting range in the node set.

[0152] Among them, the target node of the preset sorting range may include a node in the node set whose sorting order is after the initialization node, wherein the initialization node may belong to a node in the candidate node set, for example, the initialization node is the first node in the candidate node set, wherein the first node can be used to identify the starting position of the content to be displayed on the display area.

[0153] The sorting result may include the sequence information of each node in the node set. Since the nodes in the candidate node set are derived from the nodes in the node set, accordingly, when a node is selected from the node set as a node in the candidate node set, the node has the sequence information of the node in the node set. For example, the sequence information of node A in the node set is the second in the sorting order. When node A belongs to the node in the candidate node set, node A also has the sequence information of the second in the sorting order.

[0154] In step S31, the step of "determining the target nodes in the preset sorting range in the node set based on the sorting results" can be: determining the initialization node in the candidate node set; obtaining the target sorting order of the initialization node in the sorting result according to the serialization information corresponding to the initialization node; and extracting the target nodes in the preset sorting range in the node set according to the target sorting order.

[0155] The step of "extracting target nodes of a preset sorting range from the node set according to the target sorting order" may be: determining nodes of a preset sorting range from the node set according to the target sorting order; extracting nodes of candidate node types according to the node types of the nodes of the preset sorting range, and using the nodes of the candidate node types as target nodes. The candidate node types may include line break node types and space node types.

[0156] Among them, the step of "determining the nodes in the preset sorting range in the node set according to the target sorting order" can be as follows: according to the target sorting order, judging whether there are nodes in the node set whose sorting order is within the preset sorting range; when there are nodes whose sorting order is within the preset sorting range, determining the nodes in the preset sorting range in the node set.

[0157] Step S32: Based on the target node, select candidate nodes with preset sorting positions from the nodes in the candidate node set.

[0158] In step S32, the step of "selecting candidate nodes of preset sorting positions from nodes in the candidate node set based on the target node" may be performed by selecting candidate nodes of preset sorting positions from nodes in the candidate node set based on sequence information of the target node.

[0159] The candidate node of the preset sorting position may refer to a node in the candidate node set whose sorting order is before the target node.

[0160] Step S33: determine the node distance between the target node and the candidate node, and prune the nodes of the candidate node set according to the display layout parameter and the node distance to obtain the identification node set.

[0161] Among them, the step of "determining the node distance between the target node and the candidate node" can be: according to the sorting result, the number of nodes between the target node and the candidate node in the node set is calculated; the node number and the preset node layout parameters are integrated to obtain the node distance.

[0162] The nodes between the target node and the candidate node may use the same preset node layout parameters such as line width. Based on this, the node distance may be obtained by fusing the number of nodes and the preset node layout parameters.

[0163] Among them, the step of "pruning the nodes of the candidate node set according to the display layout parameters and the node distance to obtain the identification node set" can be as follows: based on the display layout parameters and the node distance, the target nodes are classified to obtain the node type; when the node type is different from the preset node type, the nodes of the candidate node set are pruned to obtain the identification node set.

[0164] The node types include valid node types and invalid node types, wherein the valid node types may refer to the types of nodes that the target node can be used as in the candidate node set; the invalid node types may refer to the types of nodes that the target node cannot be used as in the candidate node set. The preset node types may refer to valid node types.

[0165] Among them, the step of "classifying the target nodes based on the display layout parameters and the node distance to obtain the node type" can be as follows: fusing the display layout parameters and the node distance to obtain the fused parameters; when the fused parameters are not within the preset parameter range, determining that the node type is different from the preset node type; when the fused parameters are within the preset parameter range, determining that the node type is the same as the preset node type.

[0166] The fused parameter may refer to a stretching ratio. When the display layout parameter includes a line width, a calculation strategy for the stretching ratio may be to divide the node distance by the line width.

[0167] Among them, when the node type is different from the preset node type, the step of "pruning the nodes of the candidate node set to obtain the identification node set" can be: determining the actual layout parameters between the target node and the candidate node based on the node distance; when the parameter value of the actual layout parameter is greater than the parameter value of the display layout parameter, deleting the candidate node from the candidate node set to obtain the identification node set.

[0168] The actual typesetting parameters may include an actual line width between the target node and the candidate node.

[0169] Among them, the step of "determining the actual layout parameters between the target node and the candidate node based on the node distance" can be: obtaining the preset parameters of the node; mapping the node distance according to the preset parameters to obtain the actual layout parameters between the target node and the candidate node.

[0170] The step of "deleting the candidate node from the candidate node set to obtain the identification node set" may be performed by: deleting the candidate node from the candidate node set to obtain the target node set; and screening out at least one node from the target node set to obtain the identification node set.

[0171] Among them, the step of "filtering out at least one node in the target node set to obtain an identified node set" can be: fusing the typesetting parameter values ​​of the node typesetting parameters of the nodes in the target node set to obtain fused typesetting parameter values; and filtering out at least one node in the target node set based on the fused typesetting parameter values ​​to obtain an identified node set.

[0172] Among them, when the value of the post-fusion typesetting parameter is the smallest, the node corresponding to the minimum post-fusion typesetting parameter value is extracted from the target node set, and the identification node set is constructed according to the node corresponding to the minimum post-fusion typesetting parameter value.

[0173] Among them, after the step of "classifying the target nodes based on display layout parameters and position parameters to obtain node types", the present application can also update the candidate node set. The updating method can, for example, be: when the node type is the same as the preset node type, obtain the node layout parameters corresponding to the target node, and bind the node layout parameters to the target node to obtain the bound target node; according to the bound target node, update the candidate node set to obtain the updated node set, and use the updated node set as the candidate node set.

[0174] The node layout parameters may adopt default values, wherein the node layout parameters may include a penalty coefficient and an additional width coefficient.

[0175] The step of "updating the candidate node set according to the bound target node to obtain the updated node set" may be performed by adding the bound target node to the candidate node set to obtain the updated node set.

[0176] Here, the content to be displayed is an e-book as an example, and the step of step S203 "pruning the nodes of the candidate node set to obtain the identification node set" and the update of the candidate node set are explained, such as Figure 7 Specifically, as shown in step S701 to step S717:

[0177] S701. Sort the nodes in the node set to obtain a sorting result.

[0178] S702: Determine an initialization node in the candidate node set.

[0179] S703: Obtain a target sorting order of the initialization node in the sorting result according to the serialization information corresponding to the initialization node.

[0180] S704: According to the target sorting order, determine whether there is a node in the node set whose sorting order is within a preset sorting range.

[0181] When there are nodes whose sorting order is within the preset sorting range, step S705 is executed; when there are no nodes whose sorting order is within the preset sorting range, step S715 is executed.

[0182] S705: Determine nodes within a preset sorting range in the node set.

[0183] S706: According to the node types of the nodes in the preset sorting range, determine whether there is a node whose node type is a candidate node type in the nodes in the preset sorting range.

[0184] When there are nodes whose node type is the candidate node type in the nodes in the preset sorting range, step S707 is executed; when there are no nodes whose node type is the candidate node type in the nodes in the preset sorting range, step S704 is executed.

[0185] S707: Use the node of the candidate node type as the target node.

[0186] S708 . Based on the target node, select candidate nodes with preset sorting positions from the nodes in the candidate node set.

[0187] S709: Determine the node distance between the target node and the candidate node.

[0188] S710: Classify the target node based on the display layout parameter and the node distance to obtain the node type.

[0189] S711. Determine whether the node type is the same as the preset node type.

[0190] When the node type is different from the preset node type, step S712 is executed; when the node type is the same as the preset node type, step S716 is executed.

[0191] S712: Determine actual layout parameters between the target node and the candidate nodes according to the node distance.

[0192] S713. Determine whether the parameter value of the actual typesetting parameter is greater than the parameter value of the display typesetting parameter.

[0193] When the parameter value of the actual typesetting parameter is greater than the parameter value of the display typesetting parameter, execute step S714; when the parameter value of the actual typesetting parameter is less than or equal to the parameter value of the display typesetting parameter, return to execute step S706.

[0194] S714: Delete the candidate node from the candidate node set to obtain a target node set.

[0195] S715. Filter out at least one node from the target node set to obtain an identification node set.

[0196] S716. Obtain node layout parameters corresponding to the target node, and bind the node layout parameters to the target node to obtain the bound target node.

[0197] S717. Update the candidate node set according to the bound target node to obtain an updated node set, and use the updated node set as the candidate node set.

[0198] It can be understood here that the present application can update the candidate node set or obtain the identification node set through the initially obtained candidate node set; at the same time, the present application can discard some invalid nodes, such as deleting candidate nodes, to achieve the effect of pruning acceleration, thereby improving typesetting efficiency and the display of the content to be displayed. The overall algorithm complexity of node pruning in the candidate node set in the present application is O(mn), where m refers to the average number of characters in a line of content to be displayed, and n refers to the total number of nodes. Since the algorithm will eventually consider the overall post-fusion typesetting parameter value such as the total penalty value, and the penalty value can be composed of a stretch coefficient and an additional penalty value for the line break node, the final output identification node set will be the choice with the lowest overall stretch ratio, so that the display effect of the content to be displayed in the display area can be improved.

[0199] S204: Based on the identified node set, layout the nodes in the node set in a display area corresponding to the display layout parameter to obtain node layout information.

[0200] The node layout information refers to the layout information of the node in the display area. For example, when the content to be displayed is an e-book, the e-book is divided into multiple pages, and the node layout information may include the node coordinates of the node corresponding to the start position of each page of the e-book and the node coordinates of the node corresponding to the end position when the e-book is displayed in the display area, as well as the node coordinates corresponding to each page of the e-book and the size information of each page of the e-book.

[0201] In step S204, based on the identified node set, the nodes in the node set are laid out in the display area corresponding to the display layout parameter, and the manner of obtaining the node layout information may be as shown in steps S41 to S42:

[0202] Step S41: based on the identified node set, split the node set to obtain node subsets.

[0203] Based on the above, in the step of "segmenting the node set based on the identification node set to obtain node subsets", the method can be: using the identification nodes in the identification node set as segmentation nodes; and segmenting the node set based on the segmentation nodes to obtain node subsets.

[0204] Among them, each node in the node set can have corresponding sequence information. Since the identification node set is derived from the node set, accordingly, when the node is screened out from the node set to serve as the identification node in the identification node set, the identification node has its own sequence information in the node set. For example, the sequence information of node B in the node set is the seventh in sorting order. When node B belongs to the identification node, node B also has the sequence information of the seventh in sorting order.

[0205] Based on the above, when the identification node is used as a split node, the step of "splitting the node set based on the split node to obtain a node subset" can be: according to the sequence information of the split node, the node corresponding to the split node is intercepted in the node set; according to the split node and the node corresponding to the split node, a node subset is constructed.

[0206] Step S42: Layout the nodes in the node subset in the display area corresponding to the display layout parameter to obtain node layout information.

[0207] Among them, the step of "laying out the nodes in the node subset in the display area corresponding to the display layout parameters to obtain the node layout information" can be as follows: according to the display layout parameters, determining the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters; based on the sequence information of the nodes in the node subset, calculating the node coordinates of the nodes in the node subset in the display sub-area, and generating the node layout information according to the node coordinates.

[0208] The sequence information of the nodes in the node subset may be mapped to the display sub-region to obtain the node coordinates of the nodes in the node subset.

[0209] Among them, the step of "determining the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters based on the display layout parameters" can be done by: obtaining the display parameters corresponding to the node subset, and fusing the display layout parameters and the display parameters to obtain target fused parameters; based on the target fused parameters, determining the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters.

[0210] Here, the display layout parameters include the height of the display area, and the display parameters include the target height corresponding to the node subset. The target height may include the row height of the content to be displayed corresponding to the node subset, and the baseline height of the content to be displayed corresponding to the node subset.

[0211] The present application can obtain a candidate height by subtracting a target height corresponding to a node subset from the height of the display area, so as to fuse the display layout parameters and the display parameters, and obtain the target fused parameters, namely the candidate height.

[0212] Among them, the step of "determining the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters based on the target fusion parameters" can be done by: judging whether the target fusion parameters are greater than or equal to the preset parameter threshold; when the target fusion parameters are greater than or equal to the preset parameter threshold, determining the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters.

[0213] Here, the content to be displayed is an e-book as an example to further explain step S204. Figure 4 As shown, the typesetting module 43 of the present application may be used to execute step S204. Step S203 may also be executed by the typesetting module 43 described above.

[0214] For example, for step S41, the present application divides the node set corresponding to the electronic book into node subsets based on the identification node set, wherein the node subset can be characterized as a node sequence corresponding to each line of content in the electronic book. Then, for step S41, please refer to the following steps S801 to S808:

[0215] Among them, the display layout parameter is the height of the display area, and the display parameter is the target height corresponding to the node subset.

[0216] S801. Determine the remaining height of the display area according to the height of the display area.

[0217] Among them, when the node sequence has corresponding coordinates in the display area, the target node sequence is the sequence with corresponding coordinates in the display area, and the remaining height is the height of the display area minus the target height corresponding to the target node sequence; when the node sequence does not have a corresponding target node sequence in the display area, the remaining height is the height of the area.

[0218] S802: Determine whether there is a node sequence.

[0219] Among them, the present application can arrange the node sequence in sequence according to the sequence information of the nodes in the node sequence.

[0220] When the node sequence exists, step S803 is executed; when the node sequence does not exist, the process ends.

[0221] S803: Obtain the target height corresponding to the node sequence.

[0222] S804: Fuse the height of the display area and the target height to obtain a candidate height.

[0223] S805: Determine whether the candidate height is greater than or equal to a preset parameter threshold.

[0224] When the candidate height is greater than or equal to the preset parameter threshold, it means that the display area can still accommodate the to-be-displayed content corresponding to the node sequence. In this case, step S806 can be executed; when the candidate height is less than the preset parameter threshold, it means that the current display area cannot accommodate the to-be-displayed content corresponding to the node sequence. In this case, the layout of the next display area can be started, and the next display area can be used as the display area, and the process returns to execute step S801.

[0225] S806: Based on the candidate heights, determine a display sub-area corresponding to the node sequence in the display area corresponding to the display layout parameter.

[0226] S807 . Calculate node coordinates of nodes in the node sequence in the display sub-area based on the sequence information of the nodes in the node subset.

[0227] S808. Generate node layout information according to the node coordinates.

[0228] Before step S808, the present application may also determine whether a preset node needs to be added at the end of the node sequence. When a preset node needs to be added at the end of the node sequence, the preset node is added to the node sequence, and the node coordinates of the preset node are calculated in the display sub-area; based on this, step S808 may specifically be: generating node layout information according to the node coordinates of the nodes in the node sequence and the node coordinates of the preset node. When a preset node does not need to be added at the end of the node sequence, the steps are continued according to the original process.

[0229] It can be understood here that the present application can implement paging of the content to be displayed through steps S801 to S808, and implement paging by determining whether the display area can currently accommodate the content to be displayed corresponding to the node sequence.

[0230] It should also be noted that when generating node typesetting information, the node typesetting information is used as historical node typesetting information. Figure 6 The layout information cache module 424 shown stores the historical node layout information in the layout information cache space.

[0231] S205: Display the content to be displayed in the display area according to the node layout information.

[0232] The display area may be a display page, or may be an area in a display page.

[0233] In step S205, according to the node layout information, the method of displaying the content to be displayed in the display area can be: in the content to be displayed, obtain the content element corresponding to each node in the node set; based on the node layout information, render the content element in the display area to display the content to be displayed in the display area.

[0234] Based on the above, when the present application displays the content to be displayed in the display area, the present application can improve the display effect of the content to be displayed. Fig. 9 As shown, compared with the display effect of the prior art, the present application can greatly improve the aesthetics, reduce the possibility of excessive stretching and unevenness, and make the arrangement of text more in line with human reading logic.

[0235] The embodiment of the present application can receive a content display request, the content display request includes display layout parameters of the content to be displayed; obtain a node set corresponding to the content to be displayed, the node set includes nodes converted from each content element in the content to be displayed; according to the display layout parameters, filter out at least one node in the node set to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identification node set; based on the identification node set, layout the nodes in the node set in the display area corresponding to the display layout parameters to obtain node layout information; according to the node layout information, display the content to be displayed in the display area. Since the embodiment of the present application can obtain a node set of the content to be displayed, it can filter out at least one node in the node set based on the display layout parameters included in the content display request to obtain a candidate node set. On this basis, the present application also prunes the candidate node set. In this way, the present application can quickly layout the nodes in the node set based on the identification node set obtained by pruning, so that the node layout information can be obtained based on the layout, and the content to be displayed can be quickly displayed in the display area to improve the display efficiency of the content.

[0236] According to the method described in the above embodiment, the following is further described in detail with examples.

[0237] In this embodiment, the content display device is specifically integrated into a computer device, and the computer device is a terminal.

[0238] like Fig.10 As shown, a content display method, the specific process is shown in S901 to S916:

[0239] S901. The terminal receives a content display request.

[0240] The content display request includes display layout parameters of the content to be displayed.

[0241] For step S901, the terminal may display a content display interface including a plurality of candidate contents to be displayed; in response to a selection operation on the candidate contents to be displayed, determine the contents to be displayed from the candidate contents to be displayed, and generate a content display request for the contents to be displayed.

[0242] S902: The terminal obtains historical content display records, searches for target historical display records of content to be displayed in the historical content display records, and obtains query results.

[0243] S903: The terminal determines whether there is a target history display record based on the query result.

[0244] When there is a target history display record, execute step S904; when there is no target history display record, execute step S905.

[0245] S904: The terminal extracts a node set corresponding to the content to be displayed from a preset cache space.

[0246] S905: The terminal obtains content elements of the content to be displayed.

[0247] For step S905, the terminal can obtain the content format of the content to be displayed; when the content format is the target content format, directly extract the content elements from the content to be displayed; when the content format is not the content format, convert the content format of the content to be displayed to obtain the content to be displayed in the target content format; directly extract the content elements from the content to be displayed in the target content format.

[0248] S906: The terminal converts the content elements into nodes, and obtains a node set corresponding to the content to be displayed.

[0249] For step S906, the terminal can identify the element type of each content element in the content to be displayed, and obtain the node parameters corresponding to the element type; based on the node parameters, generate the node corresponding to the content element to obtain the node set corresponding to the content to be displayed.

[0250] Among them, for the step "based on the node parameters, generate the nodes corresponding to the content elements to obtain the node set corresponding to the content to be displayed": the terminal can generate the nodes corresponding to the content elements based on the node parameters; when the node is a node of the target node type, obtain the node layout parameters corresponding to the node, and associate the node layout parameters with the node to obtain the node carrying the node layout parameters; use the node carrying the node layout parameters as the node corresponding to the content element; and construct a node set corresponding to the content to be displayed according to the node corresponding to the content element.

[0251] S907: The terminal caches the node set in a preset cache space.

[0252] S908: The terminal extracts historical display layout parameters from a preset cache space.

[0253] S909: The terminal determines whether the display layout parameters are the same as the historical display layout parameters.

[0254] When the display layout parameters are the same as the historical display layout parameters, execute step S910; when the display layout parameters are different from the historical display layout parameters, execute step S912.

[0255] S910. The terminal extracts historical node layout information of the content to be displayed from a preset cache space.

[0256] S911. The terminal displays the content to be displayed in the display area based on the historical node layout information.

[0257] S912: The terminal selects at least one node from the node set according to the display layout parameter to obtain a candidate node set.

[0258] For step S912, the terminal can sort the nodes in the node set, obtain the sorting result, and obtain the target sorting range in the sorting result; determine the nodes in the target sorting range in the node set; and filter out at least one node from the nodes in the target sorting range according to the node type and display layout parameters of the node to obtain a candidate node set.

[0259] S913: The terminal prunes the nodes of the candidate node set to obtain an identification node set.

[0260] For step S913, the terminal can sort the nodes in the node set to obtain the sorting result, and based on the sorting result, determine the target node of the preset sorting range in the node set; based on the target node, filter out the candidate node of the preset sorting position in the nodes of the candidate node set; determine the node distance between the target node and the candidate node, and prune the nodes of the candidate node set according to the display layout parameters and the node distance to obtain the identification node set.

[0261] S914. The terminal typeset the nodes in the node set in a display area corresponding to the display typesetting parameter based on the identified node set to obtain node typesetting information.

[0262] For step S914, the terminal may segment the node set based on the identified node set to obtain node subsets; and layout the nodes in the node subset in the display area corresponding to the display layout parameter to obtain node layout information.

[0263] Among them, for the step of "layouting the nodes in the node subset in the display area corresponding to the display layout parameters to obtain node layout information", the terminal can determine the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters according to the display layout parameters; calculate the node coordinates of the nodes in the node subset in the display sub-area based on the sequence information of the nodes in the node subset, and generate the node layout information according to the node coordinates.

[0264] S915. The terminal stores the node layout information in a preset cache space.

[0265] S916. The terminal displays the content to be displayed in the display area according to the node layout information.

[0266] For step 916, the terminal may obtain content elements corresponding to each node in the node set in the content to be displayed; based on the node layout information, render the content elements in the display area to display the content to be displayed in the display area.

[0267] The embodiment of the present application can receive a content display request, the content display request includes display layout parameters of the content to be displayed; obtain a node set corresponding to the content to be displayed, the node set includes nodes converted from each content element in the content to be displayed; according to the display layout parameters, filter out at least one node in the node set to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identification node set; based on the identification node set, layout the nodes in the node set in the display area corresponding to the display layout parameters to obtain node layout information; according to the node layout information, display the content to be displayed in the display area. Since the embodiment of the present application can obtain a node set of the content to be displayed, at least one node can be filtered out from the node set based on the display layout parameters included in the content display request to obtain a candidate node set. On this basis, the present application also prunes the candidate node set. In this way, the present application can quickly layout the nodes in the node set based on the identification node set obtained by pruning, so that the node layout information can be obtained based on the layout, and the content to be displayed can be quickly displayed in the display area to improve the display efficiency of the content.

[0268] In order to better implement the above method, an embodiment of the present application also provides a content display device, which can be integrated into a computer device, such as a server or a terminal. The terminal may include a tablet computer, a laptop computer and / or a personal computer.

[0269] For example, Fig.11As shown, the content display device may include a receiving unit 301, an acquiring unit 302, a screening unit 303, a typesetting unit 304 and a display unit 305, as follows:

[0270] (1) receiving unit 301;

[0271] The receiving unit 301 may be configured to receive a content display request, wherein the content display request includes display layout parameters of the content to be displayed.

[0272] (2) Acquisition unit 302;

[0273] The acquisition unit 302 may be configured to acquire a node set corresponding to the content to be displayed, wherein the node set includes a node converted from each content element in the content to be displayed.

[0274] In some application embodiments, the acquisition unit 302 can be used to acquire historical content display records, and query the target historical display records of the content to be displayed in the historical content display records; based on the query results, generate a node corresponding to each content element in the content to be displayed to obtain a node set.

[0275] In some application embodiments, the acquisition unit 302 can be used to extract a node set corresponding to the content to be displayed from a preset cache space when the target historical display record exists; when the target historical display record does not exist, obtain the content elements of the content to be displayed, and convert the content elements into nodes to obtain the node set corresponding to the content to be displayed.

[0276] In some application embodiments, the acquisition unit 302 can be used to identify the element type of each content element in the content to be displayed, and obtain the node parameters corresponding to the element type; based on the node parameters, generate the node corresponding to the content element to obtain the node set corresponding to the content to be displayed.

[0277] In some application embodiments, the acquisition unit 302 can be used to convert the format of the content element in the content to be displayed to obtain a target content element in a target format; determine the element type corresponding to the target content element according to the element attribute information of the target content element, and use the element type corresponding to the target content element as the element type corresponding to the content element.

[0278] (3) screening unit 303;

[0279] The screening unit 303 may be configured to screen out at least one node from the node set according to the display layout parameter to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identification node set.

[0280] In some application embodiments, the screening unit 303 can be used to sort the nodes in the node set to obtain a sorting result, and based on the sorting result, determine a target node in a preset sorting range in the node set; based on the target node, screen out candidate nodes in a preset sorting position from the nodes in the candidate node set; determine the node distance between the target node and the candidate node, and prune the nodes of the candidate node set according to the display layout parameters and the node distance to obtain an identified node set.

[0281] In some application embodiments, the screening unit 303 can be used to classify the target node based on the display layout parameters and the node distance to obtain a node type; when the node type is different from a preset node type, the nodes of the candidate node set are pruned to obtain an identified node set.

[0282] In some application embodiments, the screening unit 303 can be used to determine the actual layout parameters between the target node and the candidate node based on the node distance; when the parameter value of the actual layout parameter is greater than the parameter value of the display layout parameter, the candidate node is deleted from the candidate node set to obtain an identified node set.

[0283] In some application embodiments, the screening unit 303 can be used to fuse the display layout parameters and the node distance to obtain fused parameters; when the fused parameters are not within the preset parameter range, it is determined that the node type is different from the preset node type; when the fused parameters are within the preset parameter range, it is determined that the node type is the same as the preset node type.

[0284] (4) typesetting unit 304;

[0285] The layout unit 304 may be configured to layout the nodes in the node set in a display area corresponding to the display layout parameter based on the identified node set to obtain node layout information.

[0286] In some application embodiments, the layout unit 304 can be used to segment the node set based on the identified node set to obtain a node subset; and layout the nodes in the node subset in the display area corresponding to the display layout parameters to obtain node layout information.

[0287] In some application embodiments, the layout unit 304 can be used to determine, in the display area corresponding to the display layout parameters, a display sub-area corresponding to the node subset; based on sequence information of the nodes in the node subset, calculate the node coordinates of the nodes in the node subset in the display sub-area, and generate the node layout information based on the node coordinates.

[0288] In some application embodiments, the layout unit 304 can be used to obtain the display parameters corresponding to the node subset, and fuse the display layout parameters and the display parameters to obtain target fused parameters; based on the target fused parameters, determine the display sub-area corresponding to the node subset in the display area corresponding to the display layout parameters.

[0289] (5) Display unit 305;

[0290] The display unit 305 may be configured to display the content to be displayed in the display area according to the node layout information.

[0291] In some application embodiments, the display unit 305 can be used to extract historical display layout parameters in the preset cache space; when the display layout parameters are the same as the historical display layout parameters, extract the historical node layout information of the content to be displayed from the preset cache space; based on the historical node layout information, display the content to be displayed in the display area.

[0292] In some application embodiments, the display unit 305 can be used to obtain the content element corresponding to each node in the node set in the content to be displayed; based on the node layout information, the content element is rendered in the display area to display the content to be displayed in the display area.

[0293] In some application embodiments, such as Fig.12 As shown, the content display device may further include an updating unit 306. The updating unit 306 may be specifically used to obtain the node layout parameters corresponding to the target node when the node type is the same as the preset node type, and bind the node layout parameters to the target node to obtain a bound target node; according to the bound target node, update the candidate node set to obtain an updated node set, and use the updated node set as the candidate node set.

[0294] As can be seen from the above, the receiving unit 301 of the embodiment of the present application can be used to receive a content display request, wherein the content display request includes display layout parameters of the content to be displayed; the obtaining unit 302 can be used to obtain a node set corresponding to the content to be displayed, wherein the node set includes nodes converted from each content element in the content to be displayed; the filtering unit 303 can be used to filter out at least one node from the node set according to the display layout parameters to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identified node set; the layout unit 304 can be used to layout the nodes in the node set in the display area corresponding to the display layout parameters based on the identified node set to obtain node layout information; the display unit 305 can be used to display the content to be displayed in the display area according to the node layout information. Since the embodiment of the present application can obtain the node set of the content to be displayed, it is possible to screen out at least one node in the node set based on the display layout parameters included in the content display request to obtain a candidate node set. On this basis, the present application also prunes the candidate node set. In this way, the present application can quickly layout the nodes in the node set based on the identified node set obtained by pruning, so that the node layout information can be obtained based on the layout, and the content to be displayed can be quickly displayed in the display area to improve the display efficiency of the content.

[0295] The present application also provides an electronic device, such as Fig.13 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present invention, specifically:

[0296] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Fig.13 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0297] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the electronic device and processes data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0298] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0299] The electronic device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0300] The electronic device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0301] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:

[0302] A content display request is received, wherein the content display request includes display layout parameters of the content to be displayed; a node set corresponding to the content to be displayed is obtained, wherein the node set includes nodes converted from each content element in the content to be displayed; according to the display layout parameters, at least one node is screened out from the node set to obtain a candidate node set, and the nodes of the candidate node set are pruned to obtain an identification node set; based on the identification node set, the nodes in the node set are laid out in a display area corresponding to the display layout parameters to obtain node layout information; according to the node layout information, the content to be displayed is displayed in the display area.

[0303] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0304] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0305] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute any content display method provided in the embodiment of the present application.

[0306] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0307] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0308] Since the instructions stored in the computer-readable storage medium can execute the steps in any content display method provided in the embodiments of the present application, the beneficial effects that can be achieved by any content display method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0309] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementations provided in the above embodiments.

[0310] The above is a detailed introduction to a content display method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A content display method, characterized in that: include: receiving a content display request, wherein the content display request includes display layout parameters of content to be displayed; Acquire a node set corresponding to the content to be displayed, wherein the node set includes a node converted from each content element in the content to be displayed; According to the display layout parameter, at least one node is selected from the node set to obtain a candidate node set, and the nodes of the candidate node set are pruned to obtain an identification node set; Based on the identified node set, the nodes in the node set are laid out in a display area corresponding to the display layout parameter to obtain node layout information; The content to be displayed is displayed in the display area according to the node layout information.

2. The content display method according to claim 1, characterized in that: The obtaining of the node set corresponding to the content to be displayed includes: Acquire historical content display records, and query the historical content display records for target historical display records of the content to be displayed; Based on the query result, a node corresponding to each content element in the content to be displayed is generated to obtain a node set.

3. The content display method according to claim 2, characterized in that: The step of generating a node corresponding to each content element in the content to be displayed based on the query result to obtain a node set includes: When the target historical display record exists, extracting a node set corresponding to the content to be displayed from a preset cache space; When the target historical display record does not exist, the content elements of the content to be displayed are acquired, and the content elements are converted into nodes to obtain a node set corresponding to the content to be displayed.

4. The content display method according to claim 3, characterized in that: The converting the content elements into nodes to obtain a node set corresponding to the content to be displayed includes: Identifying the element type of each content element in the content to be displayed, and acquiring node parameters corresponding to the element type; Based on the node parameters, nodes corresponding to the content elements are generated to obtain a node set corresponding to the content to be displayed.

5. The content display method according to claim 4, characterized in that: The identifying the element type of each content element in the content to be displayed includes: Converting the content element in the content to be displayed to obtain a target content element in a target format; According to the element attribute information of the target content element, the element type corresponding to the target content element is determined, and the element type corresponding to the target content element is used as the element type corresponding to the content element.

6. The content display method according to claim 3, characterized in that: After extracting the node set corresponding to the to-be-displayed content from the preset cache space, the method further includes: Extracting historical display layout parameters from the preset cache space; When the display layout parameter is the same as the historical display layout parameter, extracting the historical node layout information of the content to be displayed from the preset cache space; Based on the historical node layout information, the to-be-displayed content is displayed in the display area.

7. The content display method according to claim 1, characterized in that: The step of pruning the nodes of the candidate node set to obtain the identification node set includes: Sorting the nodes in the node set to obtain a sorting result, and based on the sorting result, determining a target node in a preset sorting range in the node set; Based on the target node, select candidate nodes of preset sorting positions from the nodes in the candidate node set; The node distance between the target node and the candidate node is determined, and the nodes of the candidate node set are pruned according to the display layout parameter and the node distance to obtain an identification node set.

8. The content display method according to claim 7, characterized in that: The step of pruning the nodes of the candidate node set according to the display layout parameter and the node distance to obtain the identification node set includes: Based on the display layout parameter and the node distance, the target node is classified to obtain a node type; When the node type is different from the preset node type, the nodes of the candidate node set are pruned to obtain an identified node set.

9. The content display method according to claim 8, characterized in that: The step of pruning the nodes of the candidate node set to obtain the identification node set includes: Determining actual layout parameters between the target node and the candidate node according to the node distance; When the parameter value of the actual layout parameter is greater than the parameter value of the display layout parameter, the candidate node is deleted from the candidate node set to obtain an identified node set.

10. The content display method according to claim 8, characterized in that: The target node is classified based on the display layout parameter and the node distance to obtain the node type, including: Fusing the display layout parameter and the node distance to obtain a fused parameter; When the fused parameter is not within the preset parameter range, determining that the node type is different from the preset node type; When the fused parameter is within the preset parameter range, it is determined that the node type is the same as the preset node type.

11. The content display method according to claim 8, characterized in that: After classifying the target node based on the display layout parameter and the node distance to obtain the node type, the method further includes: When the node type is the same as the preset node type, obtaining node layout parameters corresponding to the target node, and binding the node layout parameters to the target node to obtain a bound target node; The candidate node set is updated according to the bound target node to obtain an updated node set, and the updated node set is used as the candidate node set.

12. The display method according to claim 1, characterized in that: The step of laying out the nodes in the node set in the display area corresponding to the display layout parameter based on the identified node set to obtain node layout information includes: Based on the identified node set, the node set is segmented to obtain node subsets; The nodes in the node subset are laid out in a display area corresponding to the display layout parameter to obtain node layout information.

13. The display method according to claim 12, characterized in that: The step of arranging the nodes in the node subset in the display area corresponding to the display layout parameter to obtain the node layout information includes: According to the display layout parameter, determining a display sub-area corresponding to the node subset in a display area corresponding to the display layout parameter; Based on the sequence information of the nodes in the node subset, the node coordinates of the nodes in the node subset are calculated in the display sub-area, and the node layout information is generated according to the node coordinates.

14. The display method according to claim 13, characterized in that: The determining, according to the display layout parameter, a display sub-area corresponding to the node subset in a display area corresponding to the display layout parameter, comprises: Obtaining display parameters corresponding to the node subset, and fusing the display layout parameters with the display parameters to obtain target fused parameters; Based on the target fused parameters, a display sub-region corresponding to the node subset is determined in a display region corresponding to the display layout parameters.

15. The display method according to claim 1, characterized in that: The step of displaying the content to be displayed in the display area according to the node layout information includes: In the content to be displayed, obtaining a content element corresponding to each node in the node set; Based on the node layout information, the content element is rendered in the display area to display the content to be displayed in the display area.

16. A content display device, characterized in that: include: A receiving unit, configured to receive a content display request, wherein the content display request includes display layout parameters of the content to be displayed; An acquisition unit, configured to acquire a node set corresponding to the content to be displayed, wherein the node set includes a node converted from each content element in the content to be displayed; A screening unit, configured to screen out at least one node from the node set according to the display layout parameter to obtain a candidate node set, and prune the nodes of the candidate node set to obtain an identified node set; A layout unit, configured to layout the nodes in the node set in a display area corresponding to the display layout parameter based on the identified node set, to obtain node layout information; A display unit is used to display the content to be displayed in the display area according to the node layout information.

17. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the content display method according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the content display method according to any one of claims 1 to 15.

19. A computer program product, characterized in that The computer program product stores a computer program, and the computer program is suitable for being loaded by a processor to execute the content display method according to any one of claims 1 to 15.