Text content display processing method and device, equipment and storage medium

By copying and processing the text nodes of the target page, displaying the text content based on the preset number of rows, and determining whether the expansion control needs to be displayed, the problem of redrawing and flickering in the existing technology is solved, and the display effect of the display page is improved.

CN120030982APending Publication Date: 2025-05-23BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311560615.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the display page of multi-line text content, the prior art directly calculates the display abnormality of redrawing flickering by directly calculating the text node, which affects the display effect of the display page.

Method used

By node copying the text nodes of the target page, generating a copy of the text nodes, and displaying the text content based on the preset number of rows, we judge whether the expanded control needs to be displayed, and avoid the redraw flickering problem caused by direct calculation.

Benefits of technology

It effectively avoids the display abnormality of redraw flickering, and improves the display effect of displaying pages with multiple lines of text content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030982A_ABST
    Figure CN120030982A_ABST
Patent Text Reader

Abstract

The invention provides a text content display processing method and device, equipment and a storage medium, and the method comprises the steps: responding to a display triggering operation for a target page, carrying out node copying on a text node of the target page, and obtaining a copy text node corresponding to the text node, and displaying the text content in the text node on the target page based on a preset line number threshold value, and when determining that the total line number of the text content in the copy text node is greater than the preset line number threshold value, adding and displaying a preset expansion control on the target page for the text content in the text node. In response to entering the target page, the real character node is copied, the character content is displayed based on the preset line number threshold value, and whether the expansion control needs to be displayed on the target page or not is calculated based on the copy character node; the problem of abnormal display of redrawing flicker caused by direct calculation based on real character nodes in an existing scheme can be avoided, and the display effect of a display page of multi-line character content is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a display processing method, device, equipment and storage medium for text content. Background Art

[0002] Currently, on a media content display page, for displaying multiple lines of text content, an expand button and a collapse button are usually required, wherein the expand button is used to trigger the expansion display of the multiple lines of text content, and the collapse button is used to trigger the collapse display of the multiple lines of text content.

[0003] In the relevant implementation scheme, after entering the display page of multiple lines of text content, when calculating whether the text content exceeds the specified line, it is usually calculated directly based on the text nodes on the page. This causes a display abnormality problem of redrawing and flickering after entering the display page that needs to display the expansion button, affecting the display effect of the display page of multiple lines of text content. Summary of the invention

[0004] In order to solve the above technical problem, an embodiment of the present disclosure provides a method for displaying text content.

[0005] In a first aspect, the present disclosure provides a method for displaying text content, the method comprising:

[0006] In response to a display trigger operation for a target page, a text node of the target page is copied to obtain a copy text node corresponding to the text node, and the text content in the text node is displayed on the target page based on a preset line number threshold; wherein the copy text node and the text node are at a different display level, and the transparency of the copy text node is zero;

[0007] Determine whether the total number of lines of text content in the copy text node is greater than the preset line number threshold;

[0008] If it is determined that the total number of lines is greater than the preset line number threshold, a preset expansion control is added and displayed on the target page for the text content in the text node; wherein the preset expansion control is used to trigger the expansion display of the text content in the text node.

[0009] In an optional implementation manner, if it is determined that the total number of rows is greater than the preset row number threshold, the method further includes:

[0010] Determine whether the text display length of the last line of text content in the copy text node is greater than a preset length value; wherein the preset length value is determined based on a single-line displayable length and a preset display length of a folding control;

[0011] If the text display length of the last line is greater than the preset length value, the next line adjacent to the last line is determined as the display position of the preset folding control; wherein the preset folding control is used to trigger the folding display of the text content in the text node.

[0012] In an optional implementation manner, the method further includes:

[0013] If the text display length of the last line is not greater than the preset length value, the last line is determined as the display position of the preset folding control.

[0014] In an optional implementation manner, the method further includes:

[0015] In response to a triggering operation on the preset expansion control on the target page, the text content in the text node is expanded and displayed, and based on the display position of the preset collapse control, the preset collapse control is displayed on the target page for the text content in the text node.

[0016] In an optional implementation manner, before determining whether the text display length of the last line of text content in the copy text node is greater than a preset length value, the method further includes:

[0017] The displayable length of the single line is determined based on the number of words corresponding to the line with the most words in the text content in the copy text node.

[0018] In an optional implementation manner, the method further includes:

[0019] In response to a triggering operation on the preset collapse control on the target page, the text content in the text node is folded and displayed, and the preset expansion control is displayed on the target page for the text content in the text node.

[0020] In an optional implementation manner, before displaying the preset expansion control for the text content in the text node on the target page, the method further includes:

[0021] Based on the preset row number threshold, a display position of the preset expansion control is determined.

[0022] In an optional implementation, in response to the display triggering operation on the target page, copying the text node of the target page to obtain the copy text node corresponding to the text node includes:

[0023] In response to a display triggering operation on a target page, obtaining text content and placeholder attribute information in a text node of the target page;

[0024] Based on the text content and placeholder attribute information in the text node, a copy text node corresponding to the text node is generated.

[0025] In a second aspect, the present disclosure provides a display processing device for text content, the device comprising:

[0026] A first display module is used for, in response to a display trigger operation for a target page, performing node replication on a text node of the target page to obtain a copy text node corresponding to the text node, and displaying text content in the text node on the target page based on a preset line number threshold; wherein the copy text node and the text node are at a different display level, and the transparency of the copy text node is zero;

[0027] A first determination module is used to determine whether the total number of lines of text content in the copy text node is greater than the preset line number threshold;

[0028] The second determination module is used to determine that when the total number of lines is greater than the preset line number threshold, a preset expansion control is added and displayed for the text content in the text node on the target page; wherein the preset expansion control is used to trigger the expansion display of the text content in the text node.

[0029] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.

[0030] In a fourth aspect, the present disclosure provides a text content display processing device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0031] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.

[0032] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:

[0033] The disclosed embodiment provides a method for displaying and processing text content. First, in response to a display trigger operation for a target page, a node copy is performed on a text node of the target page to obtain a copy text node corresponding to the text node, and the text content in the text node is displayed on the target page based on a preset line number threshold, wherein the copy text node and the text node are at different display levels, and the transparency of the copy text node is zero. It is determined whether the total number of lines of the text content in the copy text node is greater than the preset line number threshold. If it is determined that the total number of lines is greater than the preset line number threshold, a preset expansion control is added on the target page for the text content in the text node, wherein the preset expansion control is used to trigger the expansion display of the text content in the text node. In the disclosed embodiment, in response to entering the target page, a real text node is copied, and the text content is displayed based on a preset line number threshold, and whether the expansion control needs to be displayed on the target page is calculated based on the copy text node, which can avoid the display abnormality problem of redrawing flickering caused by direct calculation based on the real text node in the existing solution, and improve the display effect of the display page of multiple lines of text content. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0036] Figure 1 A flowchart of a method for displaying text content provided by an embodiment of the present disclosure;

[0037] Figure 2 A schematic diagram of a target page provided by an embodiment of the present disclosure;

[0038] Figure 3 A schematic diagram of another target page provided by an embodiment of the present disclosure;

[0039] Figure 4 A schematic diagram of another target page provided by an embodiment of the present disclosure;

[0040] Figure 5 A schematic diagram of the structure of a text content display processing device provided by an embodiment of the present disclosure;

[0041] Figure 6 A schematic diagram of the structure of a text content display processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0042] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0043] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0044] Currently, on a media content display page, for displaying multiple lines of text content, an expand button and a collapse button are usually required, wherein the expand button is used to trigger the expansion display of the multiple lines of text content, and the collapse button is used to trigger the collapse display of the multiple lines of text content.

[0045] In the relevant implementation scheme, after entering the display page of multiple lines of text content, when calculating whether the text content exceeds the specified line, it is usually calculated directly based on the text nodes on the page. This causes a display abnormality problem of redrawing and flickering after entering the display page that needs to display the expansion button, affecting the display effect of the display page of multiple lines of text content.

[0046] In one implementation, after entering the display page of multi-line text content, first display all of the multi-line text content on the display page, and directly calculate whether the text content exceeds the specified line based on the text nodes on the display page. If it exceeds the specified line, update all of the multi-line text content displayed on the display page to only display the text content of the specified line (such as only displaying the first two lines), and add a display expansion control after the currently displayed text content to trigger the expansion and display of all multi-line text content. However, the above implementation method will cause the display abnormality problem of redrawing flickering, affecting the display effect of the display page of multi-line text content.

[0047] To this end, the embodiment of the present disclosure provides a method for displaying and processing text content. Specifically, first, in response to a display trigger operation for a target page, a node copy is performed on the text node of the target page to obtain a copy text node corresponding to the text node, and the text content in the text node is displayed on the target page based on a preset line number threshold, wherein the copy text node and the text node are at different display levels, and the transparency of the copy text node is zero, and it is determined whether the total number of lines of the text content in the copy text node is greater than the preset line number threshold. If it is determined that the total number of lines is greater than the preset line number threshold, a preset expansion control is added on the target page for the text content in the text node, wherein the preset expansion control is used to trigger the expansion display of the text content in the text node. In the embodiment of the present disclosure, in response to entering the target page, a real text node is copied, and the text content is displayed based on a preset line number threshold, and whether the expansion control needs to be displayed on the target page is calculated based on the copy text node, which can avoid the display abnormality problem of redrawing flickering caused by direct calculation based on the real text node in the existing solution, and improve the display effect of the display page of multiple lines of text content.

[0048] Specifically, the present disclosure provides a method for displaying text content. Figure 1 , is a flow chart of a method for displaying text content provided by an embodiment of the present disclosure, the method specifically comprising:

[0049] S101: In response to a display trigger operation for a target page, copy a text node of the target page to obtain a copy text node corresponding to the text node, and display the text content in the text node on the target page based on a preset line number threshold.

[0050] Among them, the copy text node and the text node are at different display levels, and the transparency of the copy text node is zero.

[0051] The text content display processing method provided by the embodiment of the present disclosure may be applied to a client, for example, the client may include a client deployed on a smart phone, a client deployed on a tablet computer, etc.

[0052] In the embodiment of the present disclosure, the target page may be any media content display page, wherein text content is displayed on the target page.

[0053] The text content on the target page may be carried by a text node, and the text node may belong to a page structure tree corresponding to the target page.

[0054] In the embodiment of the present disclosure, by copying the text node on the target page, a copy text node corresponding to the text node is obtained. Node copying includes copying the placeholder attribute information of the text node, copying the text content in the text node, etc.

[0055] Specifically, when a display trigger operation for a target page is received, the text content and placeholder attribute information in the text node of the target page are obtained, and based on the text content and placeholder attribute information in the text node, a copy text node corresponding to the text node is generated to complete the node copying of the text node.

[0056] The display triggering operation of the target page may include any operation that triggers the display of the target page. This embodiment of the present disclosure does not impose any limitation on this.

[0057] The placeholder attribute information may include the font, font size, character spacing, font weight, line spacing, and distance from both sides of the screen of the text content in the text node.

[0058] Among them, the transparency of the copy text node is zero, that is, it is displayed on the target page but the user cannot see the text content in the copy text node. In addition, the copy text node and the corresponding text node on the target page are at different display levels, that is, the text node and the copy text node are displayed at different levels on the target page and do not affect the display of each other.

[0059] In the implementation of the present disclosure, when a display trigger operation for a target page is received, the text content of the text node is also displayed on the target page according to a preset line number threshold, that is, the text content in the real text node is displayed.

[0060] The preset line number threshold is a preset maximum number of lines for controlling the display of text content when entering the target page, that is, after entering the target page, the number of lines of text content displayed for the first time on the target page must be less than or equal to the preset line number threshold. For example, assuming that the preset line number threshold is 2, if the total number of lines of text content is 10, the first two lines of text content can be directly displayed after entering the target page, that is, the 10 lines of text content are folded and displayed by default.

[0061] S102: Determine whether the total number of lines of text content in the copy text node is greater than the preset line number threshold.

[0062] In an optional implementation, after copying the text node on the target page to obtain the corresponding copy text node, the total number of lines of text content in the copy text node is first calculated to determine whether to fold and display the text content.

[0063] If it is determined that the total number of lines of the copy text node is not greater than the preset line number threshold, all text content in the text node is displayed on the target page without displaying expansion controls and collapse controls.

[0064] S103: If it is determined that the total number of lines is greater than the preset line number threshold, a preset expansion control is added and displayed for the text content in the text node on the target page.

[0065] The preset expansion control is used to trigger the expansion display of the text content in the text node.

[0066] Specifically, the display position and display style of the preset expansion control can be set based on demand, and the embodiments of the present disclosure do not impose any limitation on this.

[0067] like Figure 2 As shown, it is a schematic diagram of a target page provided by an embodiment of the present disclosure. When it is determined that the total number of lines of the copy text node is greater than the preset line number threshold, it means that the text content in the real text node corresponding to the copy text node needs to be folded and displayed. For this purpose, a preset expansion control 201 is added for the text content in the text node on the target page.

[0068] In an optional implementation, a preset expansion control is added and displayed at the last position of the folded text content on the target page.

[0069] In addition, for text nodes whose total number of lines of text content is greater than a preset line number threshold, the display position of the corresponding collapse control on the target page is also calculated based on the copy text node corresponding to the text node.

[0070] In an optional implementation, based on determining that the total number of lines of the copy text node is greater than a preset line number threshold, it is also necessary to determine whether the text display length of the last line of the text content in the copy text node is greater than a preset length value.

[0071] The preset length value is determined based on the displayable length of a single line and the display length of the preset collapsed control.

[0072] In the disclosed embodiment, the single-line displayable length can be determined by the number of words corresponding to the line with the most words in the text content of the copy text node. In other words, the number of words in the line with the most words in the copy text node is used as the single-line displayable length of the copy text node.

[0073] In an optional implementation, after copying the text node of the target page to obtain a copy text node, the number of words in each line of the text content in the copy text node is obtained, and then the number of words in each line is compared to determine the line with the largest number of words, and the number of words corresponding to the line with the largest number of words is used as the displayable length of a single line.

[0074] In the disclosed embodiment, the preset length value is determined based on the displayable length of a single line and the display length of the preset retractable control. Specifically, the display length of the preset retractable control can be a placeholder character of the preset retractable control, which is usually 4 characters. The displayable length of a single line is the maximum number of characters that can be displayed in a single line. The preset length value is determined by subtracting the displayable length of a single line from the display length of the preset retractable control. In other words, the preset length value is the maximum number of characters that can be displayed in the last line excluding the display length of the preset retractable control.

[0075] If the displayed length of the last line of text in the text content calculated based on the copy text node is greater than the preset length value, it means that the last line cannot display the preset collapse control, and the next line next to the last line can be determined as the display position of the preset collapse control. In other words, the number of characters displayed in the last line of the text content exceeds the preset length value, and the next line next to the last line is used to display the preset collapse control.

[0076] The preset collapse control is used to trigger the folding display of the text content in the text node.

[0077] like Figure 3 , which is a schematic diagram of another target page provided by an embodiment of the present disclosure. A preset folding control 301 is displayed on the target page, and the display position of the preset folding control 301 is in the next row of the last row.

[0078] If the text display length of the last line of the text content in the text node is not greater than the preset length value, it means that the last line can display the preset collapse control, and the last line is determined as the display position of the preset collapse control. In other words, the number of words in the last line of the text content does not exceed the preset length value, and the preset collapse control can be displayed using the last line, that is, the preset collapse control and the last line of text are displayed on the same line.

[0079] like Figure 4 , which is a schematic diagram of another target page provided by an embodiment of the present disclosure. A preset retracting control 401 is displayed on the target page, and the display position of the preset retracting control 401 is displayed in the last line of the text display.

[0080] In the disclosed embodiment, whether the text display length of the last line in the text content is greater than a preset length value is determined based on the copy text node, thereby determining the display position of the preset collapse control. The display position of the collapse control on the target page can be determined in advance so that when the user triggers the expansion control, the collapse control can be displayed in time.

[0081] In the display processing method of text content provided by the embodiment of the present disclosure, first, in response to the display trigger operation for the target page, the text node of the target page is copied to obtain the copy text node corresponding to the text node, and the text content in the text node is displayed on the target page based on the preset line number threshold, wherein the copy text node and the text node are at different display levels, and the transparency of the copy text node is zero, and it is determined whether the total number of lines of the text content in the copy text node is greater than the preset line number threshold. If it is determined that the total number of lines is greater than the preset line number threshold, a preset expansion control is added on the target page for the text content in the text node, wherein the preset expansion control is used to trigger the expansion display of the text content in the text node. In the embodiment of the present disclosure, in response to entering the target page, the real text node is copied, and the text content is displayed based on the preset line number threshold, and whether the expansion control needs to be displayed on the target page is calculated based on the copy text node, which can avoid the display abnormality problem of redrawing flickering caused by direct calculation based on the real text node in the existing scheme, and improve the display effect of the display page of multiple lines of text content.

[0082] In actual applications, after determining that the total number of lines of text content in the copy text node is greater than the preset line number threshold and determining the display position of the preset collapse control, if a trigger operation for a preset expansion control on the target page is received, the text content in the text node is expanded and displayed, and based on the predetermined display position of the preset collapse control, the preset collapse control is displayed for the text content in the text node on the target page.

[0083] In addition, when a trigger operation for a preset collapse control on a target page is received, the text content in the displayed text node is folded, and a preset expansion control is displayed on the target page for the text content in the text node. Before the preset expansion control is displayed on the target page for the text content in the text node, the display position of the preset expansion control needs to be determined based on a preset line number threshold. Assuming that the preset line number threshold is 2, the display position of the preset expansion control is the last position of the second line.

[0084] Based on the above method embodiment, the present disclosure also provides a text content display processing device, referring to Figure 5 , is a structural diagram of a text content display processing device provided by an embodiment of the present disclosure, the device comprising:

[0085] The first display module 501 is used for, in response to a display trigger operation for a target page, performing node replication on a text node of the target page, obtaining a copy text node corresponding to the text node, and displaying text content in the text node on the target page based on a preset line number threshold; wherein the copy text node and the text node are at a different display level, and the transparency of the copy text node is zero;

[0086] The first determination module 502 is used to determine whether the total number of lines of text content in the copy text node is greater than the preset line number threshold;

[0087] The second determination module 503 is used to determine that when the total number of lines is greater than the preset line number threshold, add a preset expansion control for the text content in the text node on the target page; wherein the preset expansion control is used to trigger the expansion display of the text content in the text node.

[0088] In an optional implementation manner, the second determining module further includes:

[0089] A first determination submodule is used to determine whether the text display length of the last line of text content in the copy text node is greater than a preset length value; wherein the preset length value is determined based on a single-line displayable length and a preset display length of a folding control;

[0090] The second determination submodule is used to determine the next line adjacent to the last line as the display position of the preset folding control when the text display length of the last line is greater than the preset length value; wherein the preset folding control is used to trigger the folding display of the text content in the text node.

[0091] In an optional implementation, the device further includes:

[0092] The third determining module is used to determine the last line as the display position of the preset folding control when the text display length of the last line is not greater than the preset length value.

[0093] In an optional implementation, the device further includes:

[0094] A third display module is used to expand and display the text content in the text node in response to a triggering operation on the preset expansion control on the target page, and to display the preset collapse control on the target page for the text content in the text node based on the display position of the preset collapse control.

[0095] In an optional implementation, the device further includes:

[0096] The fourth determination module is used to determine the displayable length of the single line based on the number of words corresponding to the line with the most words in the text content in the copy text node.

[0097] In an optional implementation, the device further includes:

[0098] The fourth display module is used to fold and display the text content in the text node in response to the triggering operation of the preset collapse control on the target page, and display the preset expansion control for the text content in the text node on the target page.

[0099] In an optional implementation, the device further includes:

[0100] The fifth determining module is used to determine the display position of the preset expansion control based on the preset row number threshold.

[0101] In an optional implementation, the first display module includes a copy module, including:

[0102] An acquisition submodule, configured to acquire text content and placeholder attribute information in a text node of a target page in response to a display trigger operation on the target page;

[0103] A generation submodule is used to generate a copy text node corresponding to the text node based on the text content and placeholder attribute information in the text node.

[0104] In the display processing device of text content provided by the embodiment of the present disclosure, first, in response to the display trigger operation for the target page, the text node of the target page is copied to obtain the copy text node corresponding to the text node, and the text content in the text node is displayed on the target page based on the preset line number threshold, wherein the copy text node and the text node are at different display levels, and the transparency of the copy text node is zero, and it is determined whether the total number of lines of the text content in the copy text node is greater than the preset line number threshold, and if it is determined that the total number of lines is greater than the preset line number threshold, a preset expansion control is added on the target page for the text content in the text node, wherein the preset expansion control is used to trigger the expansion display of the text content in the text node. In the embodiment of the present disclosure, in response to entering the target page, the real text node is copied, and the text content is displayed based on the preset line number threshold, and whether the expansion control needs to be displayed on the target page is calculated based on the copy text node, which can avoid the display abnormality problem of redrawing flickering caused by direct calculation based on the real text node in the existing scheme, and improve the display effect of the display page of multiple lines of text content.

[0105] In addition to the above-mentioned method and apparatus, the embodiments of the present disclosure further provide a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device implements the display processing method of text content described in the embodiments of the present disclosure.

[0106] The embodiment of the present disclosure further provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the display processing method of text content described in the embodiment of the present disclosure is implemented.

[0107] In addition, the present disclosure also provides a text content display processing device, see Figure 6 As shown, it may include:

[0108] Processor 601, memory 602, input device 603 and output device 604. The number of processors 601 in the text content display processing device can be one or more. Figure 6 In some embodiments of the present disclosure, the processor 601, the memory 602, the input device 603 and the output device 604 may be connected via a bus or other means, wherein: Figure 6 The example of connecting through bus is taken in the following.

[0109] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing of the text content display processing device by running the software programs and modules stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 602 can include a high-speed random access memory, and can 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. The input device 603 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the text content display processing device.

[0110] Specifically in this embodiment, the processor 601 will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 will run the applications stored in the memory 602, thereby realizing the various functions of the above-mentioned text content display processing device.

[0111] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0112] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for displaying text content, It is characterized in that The method comprises: In response to a display trigger operation for a target page, a text node of the target page is copied to obtain a copy text node corresponding to the text node, and the text content in the text node is displayed on the target page based on a preset line number threshold; wherein the copy text node and the text node are at a different display level, and the transparency of the copy text node is zero; Determine whether the total number of lines of text content in the copy text node is greater than the preset line number threshold; If it is determined that the total number of lines is greater than the preset line number threshold, a preset expansion control is added and displayed on the target page for the text content in the text node; wherein the preset expansion control is used to trigger the expansion display of the text content in the text node.

2. The method according to claim 1, It is characterized in that If it is determined that the total number of rows is greater than the preset row number threshold, the method further includes: Determine whether the text display length of the last line of text content in the copy text node is greater than a preset length value; wherein the preset length value is determined based on a single-line displayable length and a preset display length of a folding control; If the text display length of the last line is greater than the preset length value, the next line adjacent to the last line is determined as the display position of the preset folding control; wherein the preset folding control is used to trigger the folding display of the text content in the text node.

3. The method according to claim 2, It is characterized in that The method further comprises: If the text display length of the last line is not greater than the preset length value, the last line is determined as the display position of the preset folding control.

4. The method according to claim 2 or 3, It is characterized in that The method further comprises: In response to a triggering operation on the preset expansion control on the target page, the text content in the text node is expanded and displayed, and based on the display position of the preset collapse control, the preset collapse control is displayed on the target page for the text content in the text node.

5. The method according to claim 2 or 3, It is characterized in that Before determining whether the text display length of the last line of the text content in the copy text node is greater than a preset length value, the method further includes: The displayable length of the single line is determined based on the number of words corresponding to the line with the most words in the text content in the copy text node.

6. The method according to claim 4, It is characterized in that The method further comprises: In response to a triggering operation on the preset collapse control on the target page, the text content in the text node is folded and displayed, and the preset expansion control is displayed on the target page for the text content in the text node.

7. The method according to claim 6, It is characterized in that Before displaying the preset expansion control for the text content in the text node on the target page, the method further includes: Based on the preset row number threshold, a display position of the preset expansion control is determined.

8. The method according to claim 1, It is characterized in that In response to the display triggering operation on the target page, copying the text node of the target page to obtain a copy text node corresponding to the text node includes: In response to a display triggering operation on a target page, obtaining text content and placeholder attribute information in a text node of the target page; Based on the text content and placeholder attribute information in the text node, a copy text node corresponding to the text node is generated.

9. A display processing device for text content, It is characterized in that The device comprises: A first display module is used for, in response to a display trigger operation for a target page, performing node replication on a text node of the target page to obtain a copy text node corresponding to the text node, and displaying text content in the text node on the target page based on a preset line number threshold; wherein the copy text node and the text node are at a different display level, and the transparency of the copy text node is zero; A first determination module is used to determine whether the total number of lines of text content in the copy text node is greater than the preset line number threshold; The second determination module is used to determine that when the total number of lines is greater than the preset line number threshold, a preset expansion control is added and displayed for the text content in the text node on the target page; wherein the preset expansion control is used to trigger the expansion display of the text content in the text node.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 8.

11. A display processing device for text content, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.