CN111400998A - Text display method and device, electronic equipment and readable storage medium - Google Patents

Text display method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111400998A
CN111400998A CN202010158606.3A CN202010158606A CN111400998A CN 111400998 A CN111400998 A CN 111400998A CN 202010158606 A CN202010158606 A CN 202010158606A CN 111400998 A CN111400998 A CN 111400998A
Authority
CN
China
Prior art keywords
text
target
width
display
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010158606.3A
Other languages
Chinese (zh)
Other versions
CN111400998B (en
Inventor
邹建锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010158606.3A priority Critical patent/CN111400998B/en
Publication of CN111400998A publication Critical patent/CN111400998A/en
Application granted granted Critical
Publication of CN111400998B publication Critical patent/CN111400998B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to a text display method, a text display device, an electronic device and a readable storage medium, wherein a target line of a target text in a text display area can be determined through the display width and the display height of the text display area, if the first position of the last character of the target line is not matched with the second position of the last character in the target text, which indicates that the target text cannot be completely displayed in the text display area, a truncation starting position is automatically determined according to the first width of a user-defined truncation text, the second width of the target text in the target line and the display width, namely, the truncation position can be flexibly selected according to the first width of the user-defined truncation text, so that automatic addition of the truncation text can be realized without manually setting a truncation mode and searching the truncation position, and the target text after the truncation starting position is replaced by the truncation text for display, the target text may be displayed in match with the text display area.

Description

Text display method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of text display technologies, and in particular, to a text display method and apparatus, an electronic device, and a readable storage medium.
Background
With the rapid development of internet technology, a plurality of app applications for information and news appear, and people can look up information such as real-time news and social hotspots around the world through the app applications. However, the screen size of the terminal device is limited, and in order to display more pieces of information on the screen, the size of the display area for each piece of information is generally specified, and therefore, in the display area, there is a case where the information is incompletely displayed, and in this case, generally, a truncated text "… full text" is added at the end of the display area to replace the content that cannot be displayed in the display area.
At present, a truncation mode needs to be manually set and a truncation position needs to be searched to add a truncation text, and the addition mode is complicated and inflexible, and cannot meet the display requirement of information.
Disclosure of Invention
In view of this, embodiments of the present application at least provide a text display method and apparatus, an electronic device, and a readable storage medium, which can flexibly select a truncation position according to a customized width of a truncated text, and implement automatic addition of the truncated text.
The application mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a text display method, where the display method includes:
determining a target line of a target text in a text display area based on the display width and the display height of the text display area, wherein the target line is the last line of the target text displayed in the text display area;
determining a first position of the target text corresponding to the last character of the target line, and acquiring a second position corresponding to the last character in the target text;
if the first position is not matched with the second position, determining a truncation starting position for adding the truncated text to the target line according to a first width of the truncated text, a second width of the target text positioned on the target line and a display width of the text display area;
and replacing the target text behind the truncation initial position with the truncation text.
In one possible embodiment, the determining a target line of target text in the text display area based on the display width and the display height of the text display area includes:
acquiring preset font types, font sizes, line intervals and non-text sizes;
and determining the target line of the target text in the text display area according to the preset font type, the font size, the line spacing, the non-text size, the display width and the display height.
In a possible implementation manner, if the first position does not match the second position, determining a truncation start position for adding the truncated text to the target line according to a first width of the truncated text, a second width of the target text located in the target line, and a display width of the text display area includes:
if the first position is not matched with the second position, adding the first width and the second width to obtain a target width; the second width comprises a text width and a non-text width of the target text of the target line;
and if the target width is less than or equal to the display width, determining a position which is behind the first position and adjacent to the first position as a truncation starting position for adding the truncation text to the target line.
In a possible implementation, the display method further comprises determining the second width according to the following steps:
acquiring target content of the target text of the target line;
determining whether the target content contains non-text content or not based on a preset non-text content library;
if the target content comprises the non-text content, determining the non-text width of the non-text content, and determining the width sum of the non-text width and the text width as the second width;
and if the target content does not contain the non-text content, determining the text width as the second width.
In one possible implementation, the display method further includes:
if the target width is larger than the display width, removing at least one last character of the target text in the target line;
and when the target width after the at least one character is removed is smaller than or equal to the display width, determining a position which is adjacent to the first position after the at least one character is removed as a truncation starting position for adding the truncated text to the target line.
In a possible implementation manner, before the replacing the target text after the truncation starting position with the truncated text, the display method further includes:
judging whether a line feed character exists at the truncation starting position;
if a line break exists at the truncation starting position, the line break is removed.
In a possible implementation manner, after the determining a first position of the target text corresponding to a last character of the target line and acquiring a second position corresponding to the last character of the target text, the display method further includes:
and if the first position is matched with the second position, the truncated text is not added, and the whole content of the target text is displayed on the text display area.
In a second aspect, an embodiment of the present application further provides a display device for text, where the display device includes:
the device comprises a first determination module, a second determination module and a display module, wherein the first determination module is used for determining a target line of a target text in a text display area based on the display width and the display height of the text display area, and the target line is the last line of the target text displayed in the text display area;
the second determining module is used for determining a first position of the target text corresponding to the last character of the target line and acquiring a second position corresponding to the last character in the target text;
a third determining module, configured to determine, if the first position does not match the second position, a truncation starting position at which the truncated text is added to the target line according to a first width of the truncated text, a second width of the target text located in the target line, and a display width of the text display area;
and the replacing module is used for replacing the target text after the truncation starting position with the truncated text.
In a possible implementation manner, the first determining module is further configured to determine a target line of the target text in the text display area according to the following steps:
acquiring preset font types, font sizes, line intervals and non-text sizes;
and determining the target line of the target text in the text display area according to the preset font type, the font size, the line spacing, the non-text size, the display width and the display height.
In one possible implementation, the third determining module includes:
the generating unit is used for adding the first width and the second width to obtain a target width if the first position is not matched with the second position; the second width comprises a text width and a non-text width of the target text of the target line;
a first determining unit, configured to determine, if the target width is less than or equal to the display width, a position that is after the first position and adjacent to the first position as a truncation start position at which the truncated text is added to the target line.
In a possible implementation, the third determining module further comprises a second determining unit; the second determining unit is configured to determine the second width according to the following steps:
acquiring target content of the target text of the target line;
determining whether the target content contains non-text content or not based on a preset non-text content library;
if the target content comprises the non-text content, determining the non-text width of the non-text content, and determining the width sum of the non-text width and the text width as the second width;
and if the target content does not contain the non-text content, determining the text width as the second width.
In one possible implementation, the third determining module further includes:
the removing unit is used for removing at least one last character of the target text in the target line if the target width is larger than the display width;
a third determining unit, configured to determine, when the target width after the at least one character is removed is smaller than or equal to the display width, a position after the first position after the at least one character is removed and adjacent to the first position as a truncation start position at which the truncated text is added to the target line.
In one possible embodiment, the display device further includes:
the judging module is used for judging whether a line feed character exists at the truncation starting position;
and the rejecting module is used for rejecting the line break character if the line break character exists at the truncation starting position.
In one possible implementation, the display device further includes a display module:
and the display module is used for not adding the truncated text and displaying all contents of the target text on the text display area if the first position is matched with the second position.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate with each other through the bus when the electronic device is operated, and the machine-readable instructions are executed by the processor to perform the steps of the text display method according to the first aspect or any one of the possible implementation manners of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the text display method according to the first aspect or any one of the possible implementation manners of the first aspect are performed.
In the embodiment of the application, the target line of the target text in the text display area can be determined through the display width and the display height of the text display area, if the first position of the last character of the target line is not matched with the second position of the last character in the target text, it is indicated that the target text cannot be completely displayed in the text display area, automatically determining a truncation start position according to the customized first width of the truncated text, the second width of the target text positioned on the target line and the display width, namely, the truncation position can be flexibly selected according to the first width of the user-defined truncation text, so that automatic addition of the truncation text can be realized without manually setting a truncation mode and searching the truncation position, and the truncated text is adopted to replace the target text after the truncation initial position for display, so that the target text can be displayed in a matching text display area.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a text display method provided in an embodiment of the present application;
FIG. 2 is a flow chart illustrating another method for displaying text provided by an embodiment of the present application;
3a, 3b show schematic diagrams of displaying target text in a text display area;
FIG. 4 is a functional block diagram of a text display apparatus according to an embodiment of the present application;
FIG. 5 is a functional block diagram of the third determination block of FIG. 4;
fig. 6 is a second functional block diagram of a text display device according to an embodiment of the present application;
fig. 7 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Description of the main element symbols:
in the figure: 400-display of text; 410-a first determination module; 420-a second determination module; 430-a third determination module; 431-a generating unit; 432-first determining unit; 433 — a second determination unit; 434-a culling unit; 435-a third determination unit; 440-a replacement module; 450-a judgment module; 460-a culling module; 470-a display module; 700-an electronic device; 710-a processor; 720-a memory; 730-bus.
Detailed Description
To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and that steps without logical context may be performed in reverse order or concurrently. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
To enable those skilled in the art to utilize the present disclosure, the following embodiments are presented in conjunction with a specific application scenario, "text display," which will enable those skilled in the art to apply the general principles defined herein to other embodiments and application scenarios without departing from the spirit and scope of the present disclosure.
The method, apparatus, electronic device or computer-readable storage medium described in the embodiments of the present application may be applied to any scenario where text display is required, and the embodiments of the present application do not limit specific application scenarios, and any scheme using the text display method and apparatus provided in the embodiments of the present application is within the scope of the present application.
It is worth noting that before the application is provided, a truncation mode needs to be set manually and a truncation position needs to be searched for adding the truncated text, and the adding mode is complicated and inflexible, and cannot meet the display requirement of information.
In view of the above problems, in the embodiment of the present application, a target line of a target text in a text display area may be determined by a display width and a display height of the text display area, and if a first position of a last character of the target line does not match a second position of the last character in the target text, which indicates that the target text cannot be completely displayed in the text display area, a truncation starting position may be automatically determined according to a first width of a user-defined truncated text, a second width of the target text located in the target line, and the display width, that is, a truncation position may be flexibly selected according to the first width of the user-defined truncated text, so that automatic addition of the truncated text may be implemented without manually setting a truncation mode and searching the truncation position, and the target text after the truncation starting position is replaced with the truncated text for display, the target text may be displayed in match with the text display area.
For the convenience of understanding of the present application, the technical solutions provided in the present application will be described in detail below with reference to specific embodiments.
Fig. 1 is a flowchart of a text display method according to an embodiment of the present application. As shown in fig. 1, a method for displaying a text provided in an embodiment of the present application includes the following steps:
s101: and determining a target line of a target text in the text display area based on the display width and the display height of the text display area, wherein the target line is the last line of the target text displayed in the text display area.
In the implementation of the application, with the rapid development of the internet technology, a plurality of app applications for information and news appear, and people can view information such as real-time news and social hotspots around the world through the app applications. However, the screen size of the terminal device is limited, and in order to display more pieces of information on the limited screen, the size of the text display area of each piece of information, that is, the display width and the display height of the text display area, is generally specified.
Here, each piece of information may be a target text, and after the size of the text display area for displaying the target text is obtained, that is, after the display width and the display height of the text display area are obtained, a target line on which the target text can be displayed on the text display area is determined, where the target line is a last line of the target text displayed on the text display area. Here, if the text display area can accommodate the entire contents of the target text, the target lines are determined collectively according to the size of the text display area and the amount of the contents of the target text; if the text display area can not hold the whole content of the target text, only part of the content of the target text can be displayed in the text display area, and the target line is determined according to the size of the text display area.
The display width of the text display area is generally preset, and may be set based on an interface of the app application program or based on an interaction scene in the app application program.
Further, a method for determining a target line of a target text in a text display area is explained, that is, the step S101 of determining the target line of the target text in the text display area based on the display width and the display height of the text display area includes the following steps:
acquiring preset font types, font sizes, line intervals and non-text sizes; and determining the target line of the target text in the text display area according to the preset font type, the font size, the line spacing, the non-text size, the display width and the display height.
In specific implementation, after the display width and the display height of the text display area are determined, a target line of the target text in the text display area can be determined according to a preset font type, a font size, a line spacing and a non-text size, wherein the target line is a last line of the target text displayed in the text display area. Here, the preset font type, size of font size, line space, and non-text size may be the font type, size of font size, line space, and non-text size in the target text, may also be the preset font type, size of font size, line space, and non-text size displayed in the text display area, and may also be preset according to a scene in the app application program or a corresponding interface, and the like.
S102: and determining a first position of the target text corresponding to the last character of the target line, and acquiring a second position corresponding to the last character in the target text.
In the specific implementation, after the target line of the target text in the text display area is determined, according to the text content of the target text, the last character in the target line in the target text is determined, the first position of the last character in the target text is determined, and the second position of the last character in the target text is obtained, that is, the first position of the last character in the target line in the target text and the second position of the last character in the entire text are respectively determined. Here, each character in the target text is position-coded, and thus, the position of each character can be known.
Further, the determining the first position of the target text corresponding to the last character of the target line in step S102 includes the following steps:
acquiring the content corresponding to the target line from the target text; and determining the first position of the last character in the target line according to the content corresponding to the target line.
In a specific implementation, after a target line of the target text in the text display area is determined, the content in the target line is obtained from the target text, the last character in the content in the target line is determined from the content in the target line, and further, the first position of the last character in the content in the target line is determined.
S103: and if the first position is not matched with the second position, determining a truncation starting position for adding the truncated text to the target line according to the first width of the truncated text, the second width of the target text positioned on the target line and the display width of the text display area.
In a specific implementation, if the first position of the last character in the target line in the target text does not match the second position of the last character in the entire text, i.e., the position of the target text in the last character in the target line is encoded, unlike the position encoding of the last character in the target text, indicating that the two characters are different characters, that is, the target text cannot be displayed in the text display area completely, and the target text can be displayed in the text display area only partially, and at this time, truncated text may be added at the end of the text display area to replace the target text after the truncation start position, where, based on the sum of the width of the first width of the truncated text and the width of the second width of the target text of the target line, and the size relation with the display width of the text display area to determine the truncation starting position for adding the truncated text on the target line.
It should be noted that, whether the truncated text is to be displayed is determined by finding the first position of the last character in the content of the target line and determining whether the character is the last character of the whole target text, and if the character is the last character of the whole target text, the truncated text is not displayed, otherwise, the truncated text is displayed; here, the content of the target line is the content of the last line in the text display area.
Specifically, each character in the target text has a position code, and therefore, the position of each character can be known, so that, in determining whether the last character in the text content of the target line is the last character in the full text of the target text, instead of comparing whether two characters are the same, the second position of the last character in the full text of the target text is determined by the text length of the full text of the target text, for example, the full text length is 100, the second position of the last character in the full text of the target text is the code 99 (the code is generally encoded from 0), and in step S102, the first position of the last character of the target line is determined, the first position is the code 23, whether the code 99 is equal to the code 23, if equal, it is determined that the first position of the last character in the target line in the target text is the same as the second position of the last character in the whole text, otherwise, it is different.
Here, the content of the truncated text may be set by a user, and the truncated text may be, for example, ". full text", so that the width of the truncated text may also be set by a user, and a hyperlink may be made on the truncated text, and when the ". once.full text" is clicked, the user may jump to another interface displaying the entire content of the target text.
Further, the first position of the last character of the target line in the target text and the second position of the last character of the whole text are the same, that is, the first position and the second position are the same, and for this case, that is, if the first position and the second position match, the truncated text is not added, and the whole content of the target text is displayed on the text display area.
In the specific implementation, if the first position of the last character in the target line in the target text is the same as the second position of the last character in the whole text, it is indicated that the two characters are the characters at the same position, that is, the target text can be completely displayed in the text display area, and at this time, the whole content of the target text can be directly displayed in the text display area without adding a truncated text in the text display area.
S104: and replacing the target text behind the truncation initial position with the truncation text.
In the specific implementation, after the first position of the last character of the target line in the target text is determined to be different from the second position of the last character of the whole text, it is indicated that the two characters are not the characters at the same position, that is, the target text cannot be completely displayed in the text display area, a truncated text is added at the end of the text display area, and after the truncation starting position of the truncated text added at the content corresponding to the target line is determined, the content in the target text after the truncation starting position is replaced by the truncated text, and further, part of the content and the truncated text in the target text are displayed in the text display area.
Generally, under a Core Text framework, a position of adding a truncated Text can be automatically identified, but for an IOS mobile operating system of a mobile terminal, an IOS development mostly uses an object-oriented programming language (OC), and the Core Text framework provides a Text layout and rendering interface in a C language API manner, the C language and the OC language are two different languages, so that the difficulty of a maintenance program of a programmer is high by using the Core Text framework. The Text Kit framework (Text layout tool) is friendly to IOS OC developers, and is particularly embodied in that the Text Kit framework encapsulates a Core Text framework, an object-oriented OC language API which is more friendly to developers is provided externally, and the maintenance cost is lower, so that the Text layout at an IOS end is generally laid out by using the Text Kit framework, but the Text Kit framework does not support automatic creation truncation, and the adding mode is tedious and inflexible, but needs manual adding. Therefore, under the IOS mobile operating system, the method provided by the application can be adopted, the truncated Text can be added in a user-defined mode under the Text Kit framework, and the truncated Text can be displayed at a proper position at the tail of the display content correctly.
In the embodiment of the application, the target line of the target text in the text display area can be determined through the display width and the display height of the text display area, if the first position of the last character of the target line is not matched with the second position of the last character in the target text, it indicates that the target text cannot be completely displayed in the text display area, automatically determining a truncation start position according to the customized first width of the truncated text, the second width of the target text positioned on the target line and the display width, namely, the truncation position can be flexibly selected according to the first width of the user-defined truncation text, so that automatic addition of the truncation text can be realized without manually setting a truncation mode and searching the truncation position, and the truncated text is adopted to replace the target text after the truncation initial position for display, so that the target text can be displayed in a matching text display area.
Fig. 2 is a flowchart of another text display method according to an embodiment of the present disclosure. As shown in fig. 2, a method for displaying a text provided in an embodiment of the present application includes the following steps:
s201: and determining a target line of a target text in the text display area based on the display width and the display height of the text display area, wherein the target line is the last line of the target text displayed in the text display area.
S202: and determining a first position of the target text corresponding to the last character of the target line, and acquiring a second position corresponding to the last character in the target text.
S203: if the first position is not matched with the second position, adding the first width and the second width to obtain a target width; the second width includes a text width and a non-text width of the target text of the target line.
In a specific implementation, if the first position of the last character of the target line in the target text is not matched with the second position of the last character of the entire text, which indicates that the target text cannot be completely displayed in the text display area, and the target text can only be partially displayed in the text display area, a truncated text may be added at the end of the text display area, specifically, the addition position of the truncated text, that is, the truncation starting position, needs to be determined first, and the first width of the truncated text and the second width of the target text located in the target line are added first to obtain the target width, where the content of the target text includes, but is not limited to, text content and non-text content, where the non-text content may be an emoticon, and when the second width of the target text located in the target line is specifically calculated, the text widths of the text content corresponding to the target line are respectively obtained, and the non-text width in the non-text content corresponding to the target line, so that the second width of the target text in the target line is equal to the sum of the text width and the non-text width.
Further, the step of determining the second width of the target text on the target line is explained, specifically, the second width of the target text on the target line is determined according to the following steps:
acquiring target content of the target text of the target line; determining whether the target content contains non-text content or not based on a preset non-text content library; if the target content comprises the non-text content, determining the non-text width of the non-text content, and determining the width sum of the non-text width and the text width as the second width; and if the target content does not contain the non-text content, determining the text width as the second width.
In the specific implementation, the target content of the target text in the target row is obtained first, and then the non-text content and the text content are identified from the target content, where a non-text content library may be preset in advance, a large number of non-texts are stored in the non-text content library, when the non-text content is identified from the target content, the non-text in the non-text content library may be directly matched with each symbol in the target content, if the target content contains the non-text in the non-text content library, the non-text width of the non-text content is determined, the text width of the text content in the target content is determined according to the font type, the size of the word number and the number of the word, and the sum of the text width and the width of the non-text width is determined as the second width of the target text in the target row; and if the target content has no non-text content, directly determining the text width as the second width.
S204: and if the target width is less than or equal to the display width, determining a position which is behind the first position and adjacent to the first position as a truncation starting position for adding the truncation text to the target line.
In a specific implementation, if the first width of the truncated text and the second width of the target text in the target line are added to obtain a target width smaller than or equal to the display width, it indicates that the display width does not exceed the display width of the text display area after the addition of the truncated text after the target content corresponding to the target line, that is, the target content corresponding to the target line to which the truncated text is added can still be normally displayed in the text display area, and at this time, a position adjacent to the first position after the first position is directly determined as a truncation start position at which the truncated text is added to the target line.
It should be noted that, for a case that the target text cannot be completely displayed in the text display area and the target width is less than or equal to the display width, it is indicated that the target content corresponding to the target line may be the content of the last line of a certain section in the target text, so that there is a case where the first width of the truncated text and the second width of the target text corresponding to the target line are added to obtain the target width less than or equal to the display width.
Further, of course, in addition to the case where the first width and the second width of the truncated text are added to make the target width smaller than or equal to the display width, where the second width is the width of the target text located on the target line, there is also a case where the first width and the second width of the truncated text are added to make the target width larger than the display width, and for this case, the following description is made:
if the target width is larger than the display width, removing at least one last character of the target text in the target line; and when the target width after the at least one character is removed is smaller than or equal to the display width, determining a position which is adjacent to the first position after the at least one character is removed as a truncation starting position for adding the truncated text to the target line.
In a specific implementation, if the first width and the second width of the truncated text are added to obtain a target width greater than the display width, it is indicated that the target width exceeds the display width of the text display area after the truncated text is added to the target line, that is, after the truncated text is added, the target text and the truncated text corresponding to the target line cannot be normally displayed in the text display area together, at this time, a last character of the target text in the target line may be removed, and if the target width after the character is removed is less than or equal to the display width, a position after the first position after the character is removed and adjacent to the first position is determined as a truncation starting position for adding the truncated text to the target line; and if the target width after the character is removed is still larger than the display width, continuously removing the last character corresponding to the target line at present until the target width after the character is removed is smaller than or equal to the display width, and determining the truncation starting position of the text to be added.
S205: and replacing the target text behind the truncation initial position with the truncation text.
Further, in the case where a line break is present at the truncation start position, if the truncated text is directly added at the truncation start position, the truncated text is present in a line below the target line due to the presence of the line break, and the text display area displays the target line at the maximum, so that the truncated text cannot be displayed in the text display area. Before replacing the target text after the truncation starting position with the truncated text in step S205, the method further includes the following steps:
judging whether a line feed character exists at the truncation starting position; if a line break exists at the truncation starting position, the line break is removed.
In the specific implementation, after the truncation initial position of adding the truncated text to the target line is determined, whether a line break exists at the truncation initial position is judged, if the line break exists at the truncation initial position, the line break is removed, the target text after the truncation initial position is replaced by the truncated text, and partial text content and the truncated text in the target text are displayed in a text display area; and if the line feed character does not exist at the truncation starting position, directly replacing the target text after the truncation starting position with the truncation text, and displaying part of text content and the truncation text in the target text in the text display area.
The descriptions of steps S201, S202, and S205 may refer to the descriptions of steps S101, S102, and S104, and the same technical effect can be achieved, and therefore, no further explanation is provided.
3a, 3b show schematic diagrams of displaying target text in a text display area; fig. 3a shows a schematic diagram of a target text after adding a truncated text ". text", displayed in a text display area, and an interface of an information app application includes a text display area and a picture display area; fig. 3b is a schematic diagram illustrating the display of the target text in the full-text display area, where a hyperlink is added to the ". multidot.text" in fig. 3a, and after the user clicks the ". multidot.text", the user can jump to the interface displaying the full-text of the target text, that is, the full-text display area in fig. 3b can display the entire content of the target text.
In an example, with reference to fig. 3a and 3b, an implementation process of a text display method provided in the present application is illustrated, and includes the following steps:
step a: determining a target behavior 3 of a target text in a text display area;
step b: the target text corresponding to the target line is' good scene,
Figure BDA0002404952280000171
numerous and numerous;
step c: the last character of the target text corresponding to the target line is "No", and it is determined that "No" corresponds to the last character of the entire target text "! "do not match, so, need to show the truncation text" in the text display area.
Step d: calculating the sum of a first width of a truncated text ". multidot.text" and a second width of a target text positioned on a target line, namely a target width, and judging whether the target width exceeds the display width of a text display area; wherein the second width comprises a text width and a non-text width of the target text of the target line, wherein the non-text is identified as
Figure BDA0002404952280000172
Step e: judging whether a line break character exists at the end of the target text corresponding to the target line, wherein the line break character does not exist, and the line break condition does not need to be considered;
step f: if the target width exceeds the display width of the text display area, a suitable position needs to be found and a truncated text is added, the position of the last character of the target text of the target line is found forward, and the process is circulated until the target width after the truncated text is added is found not to exceed the display width, and the position is determined as the truncation starting position of the added truncated text;
' in the good wind and light,
Figure BDA0002404952280000181
full text ";
' in the good wind and light,
Figure BDA0002404952280000182
full text ";
...
' in the good wind and light,
Figure BDA0002404952280000183
full text ";
step g: until a truncation starting position for correctly displaying the truncation text is found, the content in the target text after the truncation starting position is replaced by the truncation text in the position, namely, the content corresponding to the target line is in 'good scene',
Figure BDA0002404952280000184
full text ".
In the embodiment of the application, the target line of the target text in the text display area can be determined through the display width and the display height of the text display area, if the first position of the last character of the target line is not matched with the second position of the last character in the target text, it indicates that the target text cannot be completely displayed in the text display area, automatically determining a truncation start position according to the customized first width of the truncated text, the second width of the target text positioned on the target line and the display width, namely, the truncation position can be flexibly selected according to the first width of the user-defined truncation text, so that automatic addition of the truncation text can be realized without manually setting a truncation mode and searching the truncation position, and the truncated text is adopted to replace the target text after the truncation initial position for display, so that the target text can be displayed in a matching text display area.
Based on the same application concept, a text display device corresponding to the text display method provided by the embodiment is also provided in the embodiment of the present application, and as the principle of solving the problem of the device in the embodiment of the present application is similar to the text display method provided by the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 4 to 6, fig. 4 is a functional block diagram of a text display device 400 according to an embodiment of the present application; FIG. 5 illustrates a functional block diagram of the third determination module 430 of FIG. 4; fig. 6 shows a second functional block diagram of a text display apparatus 400 according to an embodiment of the present application.
As shown in fig. 4, the text display apparatus 400 includes:
a first determining module 410, configured to determine, based on a display width and a display height of a text display area, a target line of a target text in the text display area, where the target line is a last line of the target text displayed in the text display area;
a second determining module 420, configured to determine a first position of the target text corresponding to a last character of the target line, and obtain a second position corresponding to the last character in the target text;
a third determining module 430, configured to determine, if the first position does not match the second position, a truncation starting position at which the truncated text is added to the target line according to a first width of the truncated text, a second width of the target text located in the target line, and a display width of the text display area;
a replacing module 440, configured to replace the target text after the truncation starting position with the truncated text.
In a possible implementation, as shown in fig. 4, the first determining module 410 is further configured to determine a target line of the target text in the text display area according to the following steps:
acquiring preset font types, font sizes, line intervals and non-text sizes;
and determining the target line of the target text in the text display area according to the preset font type, the font size, the line spacing, the non-text size, the display width and the display height.
In one possible implementation, as shown in fig. 5, the third determining module 430 includes:
a generating unit 431, configured to add the first width and the second width to obtain a target width if the first position does not match the second position; the second width comprises a text width and a non-text width of the target text of the target line;
a first determining unit 432, configured to determine, if the target width is less than or equal to the display width, a position that is adjacent to the first position after the first position as a truncation starting position for adding the truncated text to the target line.
In a possible implementation, as shown in fig. 5, the third determining module 430 further includes a second determining unit 433; the second determining unit 433 is configured to determine the second width according to the following steps:
acquiring target content of the target text of the target line;
determining whether the target content contains non-text content or not based on a preset non-text content library;
if the target content comprises the non-text content, determining the non-text width of the non-text content, and determining the width sum of the non-text width and the text width as the second width;
and if the target content does not contain the non-text content, determining the text width as the second width.
In a possible implementation, as shown in fig. 5, the third determining module 430 further includes:
a removing unit 434, configured to remove at least one last character of the target text in the target line if the target width is greater than the display width;
a third determining unit 435, configured to, when the target width after the at least one character is removed is smaller than or equal to the display width, determine a position after the first position after the at least one character is removed and adjacent to the first position as a truncation starting position where the truncated text is added to the target line.
In a possible implementation, as shown in fig. 6, the text display apparatus 400 further includes:
a judging module 450, configured to judge whether a line break exists at the truncation starting position;
a culling module 460, configured to cull a line break if the line break exists at the truncation starting position.
In one possible implementation, as shown in fig. 6, the text display apparatus 400 further includes a display module 470:
the display module 470 is configured to, if the first position matches the second position, not add the truncated text, and display the entire content of the target text on the text display area.
In the embodiment of the application, the target line of the target text in the text display area can be determined through the display width and the display height of the text display area, if the first position of the last character of the target line is not matched with the second position of the last character in the target text, it indicates that the target text cannot be completely displayed in the text display area, automatically determining a truncation start position according to the customized first width of the truncated text, the second width of the target text positioned on the target line and the display width, namely, the truncation position can be flexibly selected according to the first width of the user-defined truncation text, so that automatic addition of the truncation text can be realized without manually setting a truncation mode and searching the truncation position, and the truncated text is adopted to replace the target text after the truncation initial position for display, so that the target text can be displayed in a matching text display area.
Based on the same application concept, referring to fig. 7, a schematic structural diagram of an electronic device 700 provided in the embodiment of the present application includes: a processor 710, a memory 720 and a bus 730, wherein the memory 720 stores machine-readable instructions executable by the processor 710, when the electronic device 700 is operated, the processor 710 communicates with the memory 720 through the bus 730, and the machine-readable instructions are executed by the processor 710 to perform the steps of the text display method according to any of the above embodiments.
In particular, the machine readable instructions, when executed by the processor 710, may perform the following:
determining a target line of a target text in a text display area based on the display width and the display height of the text display area, wherein the target line is the last line of the target text displayed in the text display area;
determining a first position of the target text corresponding to the last character of the target line, and acquiring a second position corresponding to the last character in the target text;
if the first position is not matched with the second position, determining a truncation starting position for adding the truncated text to the target line according to a first width of the truncated text, a second width of the target text positioned on the target line and a display width of the text display area;
and replacing the target text behind the truncation initial position with the truncation text.
In the embodiment of the application, the target line of the target text in the text display area can be determined through the display width and the display height of the text display area, if the first position of the last character of the target line is not matched with the second position of the last character in the target text, it is indicated that the target text cannot be completely displayed in the text display area, automatically determining a truncation start position according to the customized first width of the truncated text, the second width of the target text positioned on the target line and the display width, namely, the truncation position can be flexibly selected according to the first width of the user-defined truncation text, so that automatic addition of the truncation text can be realized without manually setting a truncation mode and searching the truncation position, and the truncated text is adopted to replace the target text after the truncation initial position for display, so that the target text can be displayed in a matching text display area.
Based on the same application concept, the embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the text display method provided by the above embodiment are performed.
Specifically, the storage medium can be a general storage medium, such as a removable disk, a hard disk, or the like, and when a computer program on the storage medium is executed, the method for displaying the text can be executed, and the truncated position can be flexibly selected according to the width of the user-defined truncated text, so as to implement automatic addition of the truncated text.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A display method of a text, the display method comprising:
determining a target line of a target text in a text display area based on the display width and the display height of the text display area, wherein the target line is the last line of the target text displayed in the text display area;
determining a first position of the target text corresponding to the last character of the target line, and acquiring a second position corresponding to the last character in the target text;
if the first position is not matched with the second position, determining a truncation starting position for adding the truncated text to the target line according to a first width of the truncated text, a second width of the target text positioned on the target line and a display width of the text display area;
and replacing the target text behind the truncation initial position with the truncation text.
2. The method according to claim 1, wherein the determining a target line of target text in the text display area based on the display width and the display height of the text display area comprises:
acquiring preset font types, font sizes, line intervals and non-text sizes;
and determining the target line of the target text in the text display area according to the preset font type, the font size, the line spacing, the non-text size, the display width and the display height.
3. The method according to claim 1, wherein if the first position does not match the second position, determining a truncation start position for adding the truncated text to the target line according to a first width of the truncated text, a second width of the target text located in the target line, and a display width of the text display area comprises:
if the first position is not matched with the second position, adding the first width and the second width to obtain a target width; the second width comprises a text width and a non-text width of the target text of the target line;
and if the target width is less than or equal to the display width, determining a position which is behind the first position and adjacent to the first position as a truncation starting position for adding the truncation text to the target line.
4. The display method according to claim 3, further comprising determining the second width according to the steps of:
acquiring target content of the target text of the target line;
determining whether the target content contains non-text content or not based on a preset non-text content library;
if the target content comprises the non-text content, determining the non-text width of the non-text content, and determining the width sum of the non-text width and the text width as the second width;
and if the target content does not contain the non-text content, determining the text width as the second width.
5. The display method according to claim 3, further comprising:
if the target width is larger than the display width, removing at least one last character of the target text in the target line;
and when the target width after the at least one character is removed is smaller than or equal to the display width, determining a position which is adjacent to the first position after the at least one character is removed as a truncation starting position for adding the truncated text to the target line.
6. The display method according to claim 1, wherein before the replacing the target text after the truncation start position with the truncated text, the display method further comprises:
judging whether a line feed character exists at the truncation starting position;
if a line break exists at the truncation starting position, the line break is removed.
7. The display method according to claim 1, wherein after determining a first position of the target text corresponding to a last character of the target line and obtaining a second position of the target text corresponding to the last character, the display method further comprises:
and if the first position is matched with the second position, the truncated text is not added, and the whole content of the target text is displayed on the text display area.
8. A display device for text, the display device comprising:
the device comprises a first determination module, a second determination module and a display module, wherein the first determination module is used for determining a target line of a target text in a text display area based on the display width and the display height of the text display area, and the target line is the last line of the target text displayed in the text display area;
the second determining module is used for determining a first position of the target text corresponding to the last character of the target line and acquiring a second position corresponding to the last character in the target text;
a third determining module, configured to determine, if the first position does not match the second position, a truncation starting position at which the truncated text is added to the target line according to a first width of the truncated text, a second width of the target text located in the target line, and a display width of the text display area;
and the replacing module is used for replacing the target text after the truncation starting position with the truncated text.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operating, the machine-readable instructions being executable by the processor to perform the steps of the method of displaying text according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method for displaying text according to any one of claims 1 to 7.
CN202010158606.3A 2020-03-09 2020-03-09 Text display method and device, electronic equipment and readable storage medium Active CN111400998B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010158606.3A CN111400998B (en) 2020-03-09 2020-03-09 Text display method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010158606.3A CN111400998B (en) 2020-03-09 2020-03-09 Text display method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111400998A true CN111400998A (en) 2020-07-10
CN111400998B CN111400998B (en) 2023-09-26

Family

ID=71430586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010158606.3A Active CN111400998B (en) 2020-03-09 2020-03-09 Text display method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111400998B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326458A (en) * 2021-05-31 2021-08-31 山东云缦智能科技有限公司 Processing method for multi-line text truncation display based on Javascript
CN113378511A (en) * 2021-06-09 2021-09-10 北京百度网讯科技有限公司 Page display method and device, electronic equipment and storage medium
WO2023078175A1 (en) * 2021-11-04 2023-05-11 北京字跳网络技术有限公司 Text display method and apparatus, device, and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7165264B1 (en) * 2001-07-26 2007-01-16 Digeo, Inc. Client-side tool for splitting or truncating text strings for interactive television
TW201214152A (en) * 2010-09-29 2012-04-01 Hon Hai Prec Ind Co Ltd System and method for multi-line text view with auto wrap and cutting
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN103886025A (en) * 2014-02-22 2014-06-25 小米科技有限责任公司 Method and device for displaying pictures in webpage
US20150135052A1 (en) * 2013-11-04 2015-05-14 Palantir Technologies Inc. Space-optimized display of multi-column tables
US20150170391A1 (en) * 2010-04-19 2015-06-18 Tactile World Ltd. Intelligent display system and method
CN105159868A (en) * 2015-09-01 2015-12-16 广东欧珀移动通信有限公司 Text display method and system
WO2017166756A1 (en) * 2016-04-01 2017-10-05 乐视控股(北京)有限公司 Text truncating and uploading methods and apparatuses, and electronic device
CN107391105A (en) * 2017-06-07 2017-11-24 北京五八信息技术有限公司 Text method for drafting and device
US20180018302A1 (en) * 2016-07-15 2018-01-18 Sap Se Intelligent text reduction for graphical interface elements
US20180018303A1 (en) * 2016-07-15 2018-01-18 Sap Se Design time user interface with intelligent text reduction
CN108710601A (en) * 2018-05-14 2018-10-26 广州腾讯科技有限公司 A kind of text display method and its equipment, storage medium, electronic equipment
CN110020289A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 Text display method, device and equipment in a kind of browser

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7165264B1 (en) * 2001-07-26 2007-01-16 Digeo, Inc. Client-side tool for splitting or truncating text strings for interactive television
US20150170391A1 (en) * 2010-04-19 2015-06-18 Tactile World Ltd. Intelligent display system and method
TW201214152A (en) * 2010-09-29 2012-04-01 Hon Hai Prec Ind Co Ltd System and method for multi-line text view with auto wrap and cutting
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
US20150135052A1 (en) * 2013-11-04 2015-05-14 Palantir Technologies Inc. Space-optimized display of multi-column tables
CN103886025A (en) * 2014-02-22 2014-06-25 小米科技有限责任公司 Method and device for displaying pictures in webpage
CN105159868A (en) * 2015-09-01 2015-12-16 广东欧珀移动通信有限公司 Text display method and system
WO2017166756A1 (en) * 2016-04-01 2017-10-05 乐视控股(北京)有限公司 Text truncating and uploading methods and apparatuses, and electronic device
US20180018302A1 (en) * 2016-07-15 2018-01-18 Sap Se Intelligent text reduction for graphical interface elements
US20180018303A1 (en) * 2016-07-15 2018-01-18 Sap Se Design time user interface with intelligent text reduction
CN107391105A (en) * 2017-06-07 2017-11-24 北京五八信息技术有限公司 Text method for drafting and device
CN110020289A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 Text display method, device and equipment in a kind of browser
CN108710601A (en) * 2018-05-14 2018-10-26 广州腾讯科技有限公司 A kind of text display method and its equipment, storage medium, electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱明东: "一种扩展的Android文本显示控件实现", 软件导刊, vol. 01, no. 14 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326458A (en) * 2021-05-31 2021-08-31 山东云缦智能科技有限公司 Processing method for multi-line text truncation display based on Javascript
CN113378511A (en) * 2021-06-09 2021-09-10 北京百度网讯科技有限公司 Page display method and device, electronic equipment and storage medium
CN113378511B (en) * 2021-06-09 2023-07-25 北京百度网讯科技有限公司 Page display method and device, electronic equipment and storage medium
WO2023078175A1 (en) * 2021-11-04 2023-05-11 北京字跳网络技术有限公司 Text display method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
CN111400998B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
CN111400998A (en) Text display method and device, electronic equipment and readable storage medium
US8887089B2 (en) System and method for generating a file peek ahead user interface
CN106325688B (en) Text processing method and device
KR101994499B1 (en) Hyperlink destination visibility
CN112866790A (en) Video playing method and system
CN105224540A (en) Page composing method and device
CN107077515B (en) Display control device, display control method, and display control medium
CN109815243B (en) Structured storage method and device during document interface modification
CN113094046B (en) Method, device and terminal for developing product page
CN114417226A (en) Page generation method, display method, device, electronic equipment and storage medium
CN107146098B (en) Advertisement operation configuration method and equipment
CN103136166A (en) Method and device for font determination
CN112052647A (en) Document editing method and device, electronic equipment and readable storage medium
CN114237560A (en) Data storage method, storage device, electronic equipment and storage medium
CN110321125B (en) Data configuration method and device for cells and readable storage medium
CN110263310B (en) Data graph generation method and device and computer readable storage medium
CN113987106A (en) Electronic book bookmark adding method, electronic equipment and storage medium
CN106815249B (en) Vertical text advertisement filtering method and device
CN110263303B (en) Method and device for tracing text modification history
CN111225005B (en) Push content generation method and device, electronic equipment and computer storage medium
CN112329407A (en) Method and device for adding data in table and electronic equipment
US11330338B2 (en) Method and system of displaying video comments, computing device, and readable storage medium
CN114911534B (en) Page information extraction method, setting method, device, electronic equipment and medium
CN107256179B (en) Screen saver display method and device and electronic equipment
CN111259621B (en) Cloud font display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.