Text display method and text display device
By pre-storing the association relationship between target characters and target display parameters on mobile terminals such as mobile phones, and inputting target characters in the text editing interface automatically applies corresponding display parameters, solving the problem of cumbersome operation of setting text display parameters in the prior art, realizing the A more coherent and efficient text editing experience.
Patent Information
- Application Number
- CN202111120215.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-09-24
AI Technical Summary
In the prior art, setting text display parameters on mobile terminals such as mobile phones requires switching back and forth between the text display parameter setting interface and the text editing interface, resulting in cumbersome operation process.
By pre-storing the association between the target characters and the target display parameters, when entering the target characters in the text editing interface, the corresponding target display parameters are automatically determined and applied, and the display parameters of the text content are directly adjusted in the text editing interface.
The operation process of setting text display parameters is simplified, and the number of times users switch between different interfaces is reduced, making text editing operations more coherent and efficient.
Smart Images

Figure CN113807058B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a text display method and a text display device. Background Art
[0002] In the related art, for text display parameters on mobile terminals such as mobile phones, users can adjust the text display parameters during the text editing process or after the text editing is completed. However, in the related art, the adjustment of text display parameters usually requires switching back and forth between the text display parameter setting interface and the text editing interface, resulting in a cumbersome operation process. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a text display method and a text display device, which can simplify the operation process of setting text display parameters.
[0004] In order to solve the above technical problems, this application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a text display method, the method comprising:
[0006] In the case of displaying the text editing interface, receiving a first input, wherein the first input is used to input a target character;
[0007] According to the target character, determining a target display parameter corresponding to the target character;
[0008] The target text content is displayed according to the target display parameter, wherein the target text content is the text content input after receiving the target character, or the text content selected before receiving the target character.
[0009] In a second aspect, an embodiment of the present application provides a text display device, including:
[0010] A first input module, configured to receive a first input when the text editing interface is displayed, wherein the first input is used to input a target character;
[0011] A first determination module, configured to determine a target display parameter corresponding to the target character according to the target character;
[0012] The first display module is used to display target text content according to the target display parameter, wherein the target text content is text content input after receiving the target character, or text content selected before receiving the target character.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0016] In an embodiment of the present application, when a text editing interface is displayed, a first input is received, the first input being used to input a target character; based on the target character, a target display parameter corresponding to the target character is determined; and a target text content is displayed according to the target display parameter, wherein the target text content is the text content input after receiving the target character, or the text content selected before receiving the target character. In this way, the display parameters of the target text content can be adjusted according to the target character input by the user in the text editing interface. Compared with the technical solution in the related art, which requires switching back and forth between the text editing interface and the text display parameter setting interface in order to adjust the display parameters of the text content in the text editing interface by operating in the text display parameter setting interface, the embodiment of the present application simplifies the operation process of setting text display parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flowchart of a text display method provided by an embodiment of the present application;
[0018] Figure 2a is a schematic diagram of a first window control in an embodiment of the present application;
[0019] Figure 2b is a schematic diagram of a natural language processing mode control in an embodiment of the present application;
[0020] Figure 3a is a schematic diagram of dividing the text in the text editing interface into N paragraphs in an embodiment of the present application;
[0021] Figure 3b is a schematic diagram of dividing the text in the text editing interface into M sentences in an embodiment of the present application;
[0022] Figure 3cis a schematic diagram of dividing the text in the text editing interface into L words in an embodiment of the present application;
[0023] Figure 4 is a structural schematic diagram of a text display device provided in an embodiment of the present application;
[0024] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0025] Figure 6 It is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] The executor of the text display method provided in the embodiment of the present application can be: a mobile terminal such as a mobile phone, a tablet computer, a smart watch, for example: applied to the memo, note or text message editing functions on the mobile phone to adjust the display parameters such as font, font color, background color, text size, text bold, text italicization, etc. of the text content such as notes or text messages.
[0029] In the related art, the text display parameters on mobile terminals such as mobile phones are usually set in the following two ways:
[0030] 1. By switching back and forth between the text display parameter setting interface and the text editing interface, during the process of editing text content, the display parameters of the text subsequently entered in the text editing interface can be adjusted through touch operations in the text display parameter setting interface.
[0031] 2. After completing the text input, select the text content in the text editing interface through touch input such as long pressing, and adjust the display parameters of the selected text content through touch operations in the text display parameter setting interface. This method also requires switching back and forth between the text display parameter setting interface and the text editing interface, and also requires selection operations on the text that needs to be edited.
[0032] From the above, it can be seen that no matter which method is used to set the text display parameters, it is necessary to switch back and forth between the text display parameter setting interface and the text editing interface to adjust the format of the text content in the text editing interface, which interrupts the text editing operation process.
[0033] In the embodiment of the present application, by pre-storing the association relationship between the target characters and the target display parameters, the user only needs to input the target characters in the text editing interface to determine the target display parameters based on the association relationship between the target characters and the target display parameters, thereby displaying the target text content according to the target display parameters. There is no need to switch back and forth between the text display parameter setting interface and the text editing interface, which makes the text editing operation more coherent, thereby simplifying the operation process of setting the text display parameters.
[0034] Of course, the execution subject of the text display method provided in the embodiment of the present application can also be other electronic devices such as computers, which is not specifically limited here. For the sake of convenience, in the following embodiments, the execution subject of the text display method provided in the embodiment of the present application is a mobile phone, and the text display method provided in the memo function of the mobile phone is specifically used as an example to illustrate the text display method provided in the embodiment of the present application, which does not constitute a specific limitation here.
[0035] The text display method, text display device, electronic device and computer-readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0036] See also Figure 1 The text display method provided in the embodiment of the present application may include the following steps:
[0037] Step 101: When a text editing interface is displayed, a first input is received, where the first input is used to input a target character.
[0038] In a specific implementation, the text editing interface may be an interface capable of text editing, such as a text message editing interface or a note editing interface. The target characters may include one or more of letters, numbers, special characters, etc. For example, the letter B may be pre-associated with the display parameter "bold font", the letter R may be pre-associated with the display parameter "red font", and different display parameters may be associated with different characters.
[0039] The first input may include a character input operation performed in the text editing interface, for example, performing a touch operation on a touch keyboard in the text editing interface to input a target character in the text editing interface.
[0040] Optionally, in order to distinguish the target character from the text content in the text editing interface, the text content and the target character can be displayed in different display areas or display boxes, or special symbols (such as space, @, ^ and other special symbols) can be used to separate the target character from the text content.
[0041] Step 102: Determine a target display parameter corresponding to the target character according to the target character.
[0042] In a specific implementation, the association relationship between the target character and the target display parameter may be pre-stored, so that when the target character is received, the display parameter associated with the target character may be determined as the target display parameter.
[0043] Optionally, the association relationship between the target character and the target display parameter may be preset by the user, or may be a default setting in the electronic device that executes the text display method provided in the embodiment of the present application. Where the association relationship between the target character and the target display parameter is a default setting in the electronic device that executes the text display method provided in the embodiment of the present application, the electronic device may output a prompt message in any manner such as a display or a voice report package, so as to inform the user through the prompt message: the association relationship between the target character and the target display parameter.
[0044] Step 103: Display target text content according to the target display parameters, wherein the target text content is text content input after receiving the target character, or text content selected before receiving the target character.
[0045] In an optional embodiment, the target text content is the text content entered after receiving the target character, which can be understood as: the text content entered in the text editing interface within a preset time (for example, 1 minute or 2 minutes, etc.) after entering the target character; or the text content arranged after the target character in the text editing interface.
[0046] Among them, when the target text content is the text content arranged after the target character in the text editing interface, the target text content and the target character are both text contents entered in the text editing box, and a target termination symbol can be entered at the end of the target text content, so that other text contents arranged after the target termination symbol in the text editing interface are no longer displayed according to the target display parameters. For example: the text content between the target character and the target termination symbol in the text editing interface is displayed according to the target display parameters, and the other text contents arranged after the target termination symbol are displayed according to the default display parameters (for example: black, size 5, Fangsong, etc. default display parameters).
[0047] Of course, in order to make the text contents other than the target text contents in the text editing interface no longer be displayed according to the target display parameters, the following method may also be used:
[0048] Displaying a default format button in the text editing interface;
[0049] When the input of the target text content is completed, receiving a touch input to the display default format button;
[0050] In response to the touch input, the target display parameter is adjusted to a default display parameter.
[0051] In this way, after the target display parameters are adjusted to the default display parameters, the text content newly input into the text editing interface will be displayed according to the default display parameters.
[0052] As another optional implementation, before receiving the first input, the method further includes:
[0053] receiving a second input;
[0054] In response to the second input, displaying a first setting interface;
[0055] Receiving a third input in the first setting interface;
[0056] In response to the third input, the target character is associated with the target display parameter.
[0057] In a specific implementation, the second input and the third input may respectively include one or more of the touch operations such as click, long press, double click, and re-press, and the second input is used to trigger the display of the first setting interface, which can be understood as: a setting interface for the association relationship between the target character and the target display parameter. For example: multiple alternative display parameters are displayed in the first setting interface, and each alternative display parameter corresponds to a character input box control. When the user enters a character in the character input box control corresponding to the target alternative display parameter, the association relationship between the character and the target alternative display parameter is determined. For another example: when the display parameter is: the character R is entered in the character input box control corresponding to the red text, the character R can be associated with the red text. In this way, in the subsequent text editing process, if the target character entered by the user includes R, the target text content can be displayed in red font.
[0058] Of course, in actual applications, the target character may include multiple characters, and each character corresponds to a display parameter. In this case, the target text content will be displayed according to the display parameters corresponding to all characters included in the target character. For example, assuming that the target character is: BIR4, where B is associated with the bold font display parameter, I is associated with the italic font display parameter, R is associated with the red font display parameter, and 4 is associated with the size 4 font display parameter, the target text content will be displayed in bold, italic, and in red size 4 font.
[0059] It should be noted that the special characters in the above target characters are exemplified by numbers and uppercase letters. However, in actual applications, the above target characters may also include lowercase letters, special symbols and other characters, which are not listed here one by one.
[0060] In this implementation manner, the association relationship between the target character and the target display parameter is preset by the user, and the association relationship between the target character and the target display parameter can be personalized according to the user's personal habits and preferences.
[0061] It is worth pointing out that the association relationship between the target character and the target display parameter can be, in addition to the above-mentioned one-character-to-one-display-parameter association relationship, also a one-character-to-multiple-optional-display-parameters association relationship. For example, for commonly used colors: red, yellow, a one-to-one association relationship between the character and the display parameter can be set (for example, red is associated with the character R (or lowercase letter r), and yellow is associated with the character Y (or lowercase letter y)). For uncommon colors, that is, any other optional colors besides the above-mentioned red and yellow are various. At this time, these various font color display parameters can be associated with the same character, so that when the user enters the character, the function options corresponding to the various font color display parameters associated with the character can be displayed, so that the user can select the required font color from them.
[0062] For example: Figure 2a As shown, if the user wants to select an uncommon font color, the user can input a target character C (or lowercase letter c), which is associated with multiple uncommon font colors. In response to the user input of C, the following is displayed: Figure 2a The first window control 21 shown includes a color block 211 corresponding to each uncommon font color. When a user clicks one of the color blocks 211, the color displayed by the color block is selected as the target font color to display the target text content according to the target font color. It is worth noting that the first window control 21 can be displayed in any of the display modes such as floating display in the text editing interface or full screen display, and after displaying the first window control 21, the first window control 21 can be closed by clicking the non-color area in the first window control 21 or the return key.
[0063] As an optional implementation manner, when the target character is pre-associated with at least two candidate display parameters, determining the target display parameter corresponding to the target character according to the target character includes:
[0064] In response to the first input, displaying a first window control, wherein the first window control includes function options corresponding one-to-one to the at least two candidate display parameters;
[0065] receiving a fourth input of a target function option, wherein the function options corresponding one-to-one to the at least two candidate display parameters include the target function option;
[0066] In response to the fourth input, the candidate display parameter corresponding to the target function option is determined as the target display parameter.
[0067] In a specific implementation, when the at least two alternative display parameters are alternative colors, the function option may include a color block of the same color as the corresponding alternative color; when the at least two alternative display parameters are alternative fonts, the function option may include text of the same font as the corresponding alternative font. In this way, it is convenient for users to intuitively select the target function option.
[0068] It is worth noting that the at least two alternative display parameters mentioned above also include: other display parameters with multiple values such as text size or text spacing. In this regard, the above-mentioned function options may include text with the same size as the corresponding alternative text size, or the function options may include text content, and the text spacing between the text content is the same as the corresponding text spacing. The types of at least two alternative display parameters and the expression methods of the function options for the corresponding alternative display parameters are not enumerated one by one.
[0069] In addition, the fourth input mentioned above may include one or more touch inputs such as clicking, long pressing, sliding, double-clicking, etc. on the target function option, which is not specifically limited here.
[0070] In this embodiment, a character can be associated with at least two alternative display parameters, and when the character is input in the first input, a first window control can be displayed to allow the user to select an alternative display parameter as the target display parameter. This can avoid the need to set a corresponding character for each value or option for a display parameter type with multiple values or multiple options, thereby greatly reducing the number of characters corresponding to all display parameters and greatly alleviating the complexity of users remembering and using the association between characters and display parameters.
[0071] As an optional implementation, before step 101, the text display method further includes:
[0072] Performing natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text;
[0073] Displaying character input box controls corresponding one to one to the at least two parts of text;
[0074] Among them, the first input is used to input the target character in the target character input box control, the target text content includes the partial text corresponding to the target character input box control, and the character input box controls corresponding one-to-one to the at least two partial texts include the target character input box control.
[0075] It is worth mentioning that the text in the above text editing interface can be the target text content pre-selected by the user, or the entire text content that has been input in the text editing interface.
[0076] In one embodiment, after completing the text input in the text editing interface, you can enter the text content selection mode through input operations such as long pressing. At this time, you can select the target text content that needs to be formatted by moving the cursor and other inputs, and after selecting the target text content, perform the above-mentioned natural language processing on the selected target text content to divide the target text content into at least two parts of text, and display character input box controls corresponding to the at least two parts of text.
[0077] In another embodiment, after completing the text input in the text editing interface, the above-mentioned natural language processing can be performed on the entire text content in the text editing interface to divide the entire text content in the text editing interface into at least two parts of text, and display character input box controls corresponding to the at least two parts of text.
[0078] In a specific implementation, the above-mentioned natural language processing can perform text semantic comparison, text format recognition and other processing on the text in the text editing interface, thereby dividing the text in the text editing interface into at least two parts according to the processing results.
[0079] For example: divide the same title and the text under the title into one part, divide the text in the same text paragraph into one part, divide the text in the same text sentence into one part, or divide the text in the same word into one part, etc.
[0080] In one embodiment, the character input box controls corresponding to the at least two parts of text can be displayed in a centralized manner in the second window, and each character input box control in the second window has identification information of the corresponding part of text. In this way, when it is necessary to adjust the format of a part of text or some parts of text, the characters corresponding to the required display parameters can be input into the character input box control corresponding to the part of text.
[0081] For example: Figure 3aAs shown, the text content in the text editing interface 20 is divided into three paragraphs, and each paragraph has its own paragraph number. A second window 22 is displayed in suspension in the text editing interface 20, and the second window 22 includes three character input box controls 221 corresponding to the three paragraphs. After inputting the target character: BIR4 in the character input box control 221 corresponding to the first paragraph (i.e., the sentence with the paragraph number "1"), click the OK button 23, then the second window 22 can be closed, and the text in the first paragraph can be displayed according to the display parameters corresponding to the target character: BIR4 (i.e., bold text, italic text, red font, size 4 font), and the display parameters of the second and third paragraphs can maintain the default display parameters.
[0082] Furthermore, when a preset touch input (eg, single-click touch input) is received for a target paragraph number, the paragraph content corresponding to the target paragraph number can be located / jumped to display the paragraph content corresponding to the target paragraph number in the text editing interface.
[0083] Similarly, if Figure 3b As shown, in the case where the text content in the text editing interface 20 is divided into 4 sentences, and each sentence has its own sentence number, a second window 22 is displayed floatingly in the text editing interface 20, and the second window 22 includes 4 character input box controls 221 corresponding to the 4 sentences. After inputting the target character: BIR4 in the character input box control 221 corresponding to the first sentence (i.e., the sentence with the sentence number "1"), click the OK button 23, then the second window 22 can be closed, and the text in the first sentence can be displayed according to the display parameters corresponding to the target character: BIR4 (i.e., bold text, italic text, red font, size 4 font), and the display parameters of the second to fourth sentences can maintain the default display parameters.
[0084] Furthermore, when a preset touch input (eg, single-click touch input) is received for a target sentence number, the sentence content corresponding to the target sentence number can be located / jumped to so as to display the sentence content corresponding to the target sentence number in the text editing interface.
[0085] In another embodiment, the character input box controls corresponding to the at least two parts of text can be displayed close to the corresponding parts of text. Figure 3cAs shown, the text content in the text editing interface 20 is divided into 7 words, and a character input box control 27 corresponding to the word is displayed below each word. After the user enters the target character: BIR4 in the character input box control 27 below the word "receive", the word "receive" can be displayed according to the display parameters corresponding to the target character: BIR4 (i.e., bold text, italic text, red font, size 4 font), and the display parameters of other word segments can maintain the default display parameters.
[0086] In a specific implementation, a user can select different natural language processing modes to adjust the format of text in a paragraph, or adjust the format of text in a sentence, or adjust the format of only a segmented word. For ease of explanation, the following embodiments take the at least two parts of text including at least two paragraphs, at least two sentences, or at least two segmented words as an example to illustrate the natural language processing mode.
[0087] In one embodiment, a natural language processing mode control is displayed on the text editing interface, and the natural language processing mode is switched according to the number of times the user touches the natural language processing mode control.
[0088] For example: Figure 2b As shown, a natural language processing mode control 24 is displayed on the text editing interface 20. When the user clicks the natural language processing mode control 24, the text content 201 in the text editing interface 20 is divided into at least two parts of text according to the paragraphs in which they are located, that is, the following is displayed: Figure 3a When the user double-clicks the natural language processing mode control 24, the text content in the text editing interface 20 is divided into at least two parts of text according to the sentences in which they are located, that is, the display is as follows Figure 3b When the user clicks the natural language processing mode control 24 three times in a row, the text content in the text editing interface 20 is divided into at least two parts of text according to the respective word segments, that is, the display is as follows Figure 3c The interface shown.
[0089] In another embodiment, when the natural language processing mode is turned on, the text content in the text editing interface 20 can be divided into at least two parts of text according to the paragraphs they are in by default, and when the user performs a preset operation on a paragraph (for example, long pressing the paragraph number), the text content in the paragraph is divided into at least two parts of text according to the sentences they are in; even when the user performs a preset operation on a sentence (for example, long pressing the sentence number), the text content in the sentence is divided into at least two parts of text according to the word segments they are in.
[0090] Optionally, the performing natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text includes:
[0091] Display natural language processing mode controls;
[0092] receiving a fifth input to the natural language processing mode control;
[0093] In response to the fifth input, performing a first natural language processing on the text in the text editing interface to divide the text in the text editing interface into N paragraphs, where N is an integer greater than 1;
[0094] In the case where the at least two parts of text include at least two sentences, the method further includes:
[0095] receiving a sixth input of a target paragraph, wherein the N paragraphs include the target paragraph;
[0096] In response to the sixth input, performing a second natural language processing on the target paragraph to divide the target paragraph into M sentences, where M is an integer greater than 1;
[0097] In the case where the at least two parts of text include at least two participles, the method further includes:
[0098] receiving a seventh input of a target sentence, wherein the M sentences include the target sentence;
[0099] In response to the seventh input, a third natural language processing is performed on the target sentence to divide the target sentence into L tokens, where L is an integer greater than 1.
[0100] In a specific implementation, the fifth input, the sixth input and the seventh input may respectively include one or more of touch inputs such as click, long press, double click, etc.
[0101] Specifically, Figure 2b and Figure 3a As shown, the fifth input may be a touch input to the natural language processing mode control 24. In response to the fifth input, the text in the text editing interface 20 may be divided into N paragraphs, and N paragraph numbers 25 may be displayed to identify the N paragraphs by the paragraph numbers 25. The first natural language processing may be understood as: determining the segmentation position of the text content according to the segmentation format of the text content in the text editing interface, such as the format of the paragraph spacing, the first line indentation, etc., so as to divide the paragraphs based on the segmentation position.
[0102] like Figure 3a and Figure 3bAs shown, the sixth input may be a touch input of the text content in the target paragraph or the paragraph number 25 of the target paragraph. In response to the sixth input, the target paragraph may be divided into M sentences, and M sentence numbers 26 may be displayed to identify the M sentences by the sentence numbers 26. The second natural language processing may be understood as: according to the sentence format of the text content in the text editing interface, for example, detecting the position of a period "." and a semicolon ";", and dividing the sentences based on the position of the period or semicolon.
[0103] like Figure 3b and Figure 3c As shown, the seventh input may be a touch input of the text content in the target sentence or the sentence number 26 of the target sentence. In response to the seventh input, the target sentence may be divided into L word segments, and L character input box controls 27 are displayed in the display area corresponding to the L word segments, so as to distinguish the character input box controls of the L word segments through different display areas. The third natural language processing may be understood as: semantic recognition of the text content in the text editing interface to split a complete sentence into at least two word segments, wherein each word segment may include one or more characters, or the word segment may also include punctuation marks.
[0104] Compared with the implementation method of switching the natural language processing mode according to the number of times the user touches the natural language processing mode control, this implementation method can accurately determine the text content that needs to be formatted according to the user's operation on the paragraph, sentence, and word segmentation. In the case where a large amount of text content is included in the text editing interface, it is not necessary to display the sentence number of each sentence or display the character input box control in the display area corresponding to each word segmentation, but only display the sentence number of the sentence in the target paragraph operated by the user through the sixth input, or only display the character input box control corresponding to the word segmentation in the target sentence operated by the user through the seventh input, thereby avoiding the problem that the user is difficult to find the text content that needs to be formatted from a large number of sentence numbers or a large number of character input box controls corresponding to word segmentations.
[0105] Furthermore, the display of the character input box control corresponding one-to-one to the at least two parts of text includes:
[0106] In the case where the at least two parts of text include L word segments, displaying L character input box controls in L display areas corresponding to the L word segments;
[0107] In a case where the at least two parts of text include X paragraphs or sentences, X text numbers are displayed in X display areas corresponding to the X paragraphs or sentences, and a second window is displayed, wherein the second window includes X character input box controls corresponding to the X text numbers, and X is an integer greater than 1.
[0108] It should be noted that the L display areas corresponding to the L segmented words can be understood as: each segmented word has its own corresponding display area, and the display area can be displayed close to its corresponding segmented word, for example: Figure 3c As shown, at the lower side of the word segment, near the display area of the word segment, the character input box control 27 corresponding to the word segment is displayed. In this way, each word segment can be displayed in correspondence with its corresponding character input box control, so that it is convenient for the user to find the character input box control corresponding to the word segment that needs to be formatted in a large number of character input box controls.
[0109] In addition, the above-mentioned display of X text numbers in the X display areas corresponding to the X paragraphs or sentences and displaying the second window can assign a number to each paragraph or sentence divided after natural language processing, and display each number and its corresponding character input box control in the second window. In this way, when it is necessary to adjust the format of the target text content, the user can intuitively identify the number corresponding to the target text content, find the character input box control corresponding to the number in the second window, and enter the target character in the character input box control, thereby achieving the format adjustment of the target text content.
[0110] like Figure 3a and Figure 3b As shown, this embodiment can display the character input box controls 211 corresponding to each paragraph or sentence in the second window 21 without changing the text structure of the text content in the text editing interface 20, and through the one-to-one correspondence between the paragraph number or sentence number and the character input box control, the user can clearly know the character input box control corresponding to each paragraph or sentence, so as to input the target characters in the character input box control 211 corresponding to the paragraph or sentence that needs to be formatted, thereby accurately adjusting the format of the target paragraph or target sentence.
[0111] As an optional implementation manner, when the target text content is text content input after receiving the target character, the method further includes:
[0112] An input target start character and a target end character are received, wherein the target text content is located between the target start character and the target end character.
[0113] The above-mentioned target start character and target end character can be preset special symbols, for example: the target start character is "<", and the target end character is " / >". In this way, during text editing in the text editing interface, if you need to set the format of the target text content, you can insert "<" before the target text content and insert " / >" after the target text content to define the target text content that needs to be displayed according to the target display parameters. For the text content not between "<" and " / >", it can be displayed according to the default display parameters.
[0114] Of course, in actual applications, you can also enter “<” and “ / >” first, and then enter the target text content between “<” and “ / >”, or, enter them in the order of “<”, target text content and “ / >”. There is no specific limitation on the timing of entering “<”, target text content and “ / >”.
[0115] The difference between this embodiment and the previous optional embodiment is that in the previous optional embodiment, it is necessary to perform natural language processing on the text content in the text editing interface to divide the text content into at least two parts, and display character input box controls corresponding to the at least two parts of text, and then input the target character in the target character input box control to determine the part of the text corresponding to the target character input box control as the target text content; while in this embodiment, directly inputting the target start character and the target end character in the process of editing the text content can select the target text content that needs to be formatted, thereby further improving the fluency of the text editing process.
[0116] Furthermore, the target character may also be located between the target start character and the target end character. For example, in the text editing interface, input: <bir4xxxxx / > , the target text content "xxxxx" is displayed according to the display parameters corresponding to the target character BIR4 (i.e., bold text, italic text, red font, size 4 font).
[0117] In this embodiment, given that the target character and the target text content are both located between the target start symbol and the target end symbol, in order to avoid confusing the target text content with the characters in the target character, one or more special characters may be interposed between the target character and the target text content, for example: a symbol "^" or two space characters, etc., so as to distinguish the target text content from the target character by identifying the one or more special characters, thereby improving the reliability of the text display method.
[0118] Of course, in addition to entering the target character between the target start character and the target end character as mentioned above, the target character can also be entered in other display areas or windows. For example, when the target text content is defined by the target start character and the target end character, the target character can be entered in the character input box control that is displayed in a floating manner. No specific limitation is made here.
[0119] In actual applications, the target characters may include at least two conflicting characters. For example, if the character R is associated with a red font and the character Y is associated with a yellow font, if the target characters include the letters R and Y, which are associated with different color fonts, then the target characters include two conflicting characters. In this case, the problem of being unable to accurately determine the target display parameters due to the target characters including two conflicting characters can be overcome in the following manner:
[0120] Method 1
[0121] In the case where the target characters include at least two conflicting characters, the first character among the at least two conflicting characters is taken as a valid character, and the other characters among the at least two conflicting characters except the first character are taken as invalid characters, thereby determining that the target display parameters include display parameters corresponding to the valid characters.
[0122] Method 2
[0123] In the case that the target characters include at least two conflicting characters, prompt information is output to prompt the user to re-input the target characters, or to delete the conflicting characters in the target characters.
[0124] It should be noted that the text display method provided in the embodiment of the present application can be executed by a text display device or a control module in the text display device for executing the text display method. In the embodiment of the present application, the text display device provided in the embodiment of the present application is described by taking the text display device executing the loading text display method as an example.
[0125] See also Figure 4 , a text display device 400 provided in an embodiment of the present application may include:
[0126] A first input module 401 is used to receive a first input when the text editing interface is displayed, where the first input is used to input a target character;
[0127] A first determination module 402, configured to determine a target display parameter corresponding to the target character according to the target character;
[0128] The first display module 403 is used to display target text content according to the target display parameter, wherein the target text content is the text content input after receiving the target character, or the text content selected before receiving the target character.
[0129] Optionally, the text display device 400 further includes:
[0130] A second input module, used for receiving a second input;
[0131] A second display module, configured to display a first setting interface in response to the second input;
[0132] A third input module, used for receiving a third input in the first setting interface;
[0133] The associating module is used to associate the target character with the target display parameter in response to the third input.
[0134] Optionally, when the target character is pre-associated with at least two candidate display parameters, the first determining module 402 includes:
[0135] A first display unit, configured to display a first window control in response to the first input, wherein the first window control includes function options corresponding one-to-one to the at least two candidate display parameters;
[0136] a first input unit, configured to receive a fourth input of a target function option, wherein the function options corresponding one-to-one to the at least two candidate display parameters include the target function option;
[0137] The first determining unit is configured to determine, in response to the fourth input, a candidate display parameter corresponding to the target function option as a target display parameter.
[0138] Optionally, the text display device 400 further includes:
[0139] A first processing module, configured to perform natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text;
[0140] A third display module, used for displaying character input box controls corresponding one to one to the at least two parts of text;
[0141] Among them, the first input is used to input the target character in the target character input box control, the target text content includes the partial text corresponding to the target character input box control, and the character input box controls corresponding one-to-one to the at least two partial texts include the target character input box control.
[0142] Optionally, the at least two parts of text include: at least two paragraphs, at least two sentences or at least two participles.
[0143] Optionally, the first processing module includes:
[0144] a second display unit, for displaying a natural language processing mode control;
[0145] a second input unit, configured to receive a fifth input to the natural language processing mode control;
[0146] a first processing unit, configured to perform a first natural language processing on the text in the text editing interface in response to the fifth input, so as to divide the text in the text editing interface into N paragraphs, where N is an integer greater than 1;
[0147] In the case where the at least two parts of text include at least two sentences, the text display device 400 further includes:
[0148] a fourth input module, configured to receive a sixth input of a target paragraph, wherein the N paragraphs include the target paragraph;
[0149] a second processing module, configured to perform a second natural language processing on the target paragraph in response to the sixth input, so as to divide the target paragraph into M sentences, where M is an integer greater than 1;
[0150] In the case where the at least two parts of text include at least two participles, the text display device 400 further includes:
[0151] a fifth input module, configured to receive a seventh input of a target sentence, wherein the M sentences include the target sentence;
[0152] The third processing module is used to perform a third natural language processing on the target sentence in response to the seventh input, so as to divide the target sentence into L word segments, where L is an integer greater than 1.
[0153] Optionally, the third display module is specifically used for:
[0154] In the case where the at least two parts of text include L word segments, displaying L character input box controls in L display areas corresponding to the L word segments;
[0155] In a case where the at least two parts of text include X paragraphs or sentences, X text numbers are displayed in X display areas corresponding to the X paragraphs or sentences, and a second window is displayed, wherein the second window includes X character input box controls corresponding to the X text numbers, and X is an integer greater than 1.
[0156] Optionally, when the target text content is text content input after receiving the target character, the text display device 400 further includes:
[0157] The sixth input module is used to receive an input target start symbol and a target end symbol, wherein the target text content is located between the target start symbol and the target end symbol.
[0158] The text display device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0159] The text display device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0160] The text display device provided in the embodiment of the present application can achieve Figure 1 The various processes implemented by the illustrated method embodiment can achieve the same beneficial effects, and will not be described again here to avoid repetition.
[0161] Optional, such as Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501, a memory 502, and a program or instruction stored in the memory 502 and executable on the processor 501. When the program or instruction is executed by the processor 501, each process of the above-mentioned text display method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0162] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0163] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0164] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610.
[0165] Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0166] The user input unit 607 is used to receive a first input when the display unit 606 displays the text editing interface, where the first input is used to input a target character;
[0167] The processor 610 is used to determine a target display parameter corresponding to the target character according to the target character;
[0168] The display unit 606 is further configured to display target text content according to the target display parameters, wherein the target text content is text content input after receiving the target character, or text content selected before receiving the target character.
[0169] Optionally, before executing the step of receiving the first input, the user input unit 607 is further configured to receive a second input;
[0170] The display unit 606 is further configured to display a first setting interface in response to the second input;
[0171] The user input unit 607 is further used to receive a third input in the first setting interface;
[0172] The processor 610 is further configured to associate the target character with the target display parameter in response to the third input.
[0173] Optionally, in a case where the target character is pre-associated with at least two candidate display parameters, the determining, according to the target character, a target display parameter corresponding to the target character performed by the processor 610 includes:
[0174] A display unit 606, configured to display a first window control in response to the first input, wherein the first window control includes function options corresponding to the at least two candidate display parameters in a one-to-one manner;
[0175] A user input unit 607, configured to receive a fourth input of a target function option, wherein the function options corresponding to the at least two candidate display parameters one by one include the target function option;
[0176] The processor 610 is configured to determine, in response to the fourth input, the candidate display parameter corresponding to the target function option as the target display parameter.
[0177] Optionally, before receiving the first input, the user input unit 607:
[0178] The processor 610 is further configured to perform natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text;
[0179] The display unit 606 is further configured to display a character input box control corresponding to the at least two parts of text in a one-to-one manner;
[0180] Among them, the first input is used to input the target character in the target character input box control, the target text content includes the partial text corresponding to the target character input box control, and the character input box controls corresponding one-to-one to the at least two partial texts include the target character input box control.
[0181] Optionally, the at least two parts of text include: at least two paragraphs, at least two sentences or at least two participles.
[0182] Optionally, the performing of natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text performed by the processor 610 includes:
[0183] Display unit 606, used to display natural language processing mode controls;
[0184] A user input unit 607, configured to receive a fifth input to the natural language processing mode control;
[0185] Processor 610, configured to perform a first natural language processing on the text in the text editing interface in response to the fifth input, so as to divide the text in the text editing interface into N paragraphs, where N is an integer greater than 1;
[0186] In the case where the at least two parts of text include at least two sentences:
[0187] The user input unit 607 is further used to receive a sixth input of a target paragraph, wherein the N paragraphs include the target paragraph;
[0188] The processor 610 is further configured to perform a second natural language processing on the target paragraph in response to the sixth input, so as to divide the target paragraph into M sentences, where M is an integer greater than 1;
[0189] In the case where the at least two parts of text include at least two participles:
[0190] The user input unit 607 is further configured to receive a seventh input of a target sentence, wherein the M sentences include the target sentence;
[0191] The processor 610 is further configured to perform a third natural language processing on the target sentence in response to the seventh input, so as to divide the target sentence into L tokens, where L is an integer greater than 1.
[0192] Optionally, the display unit 606 performs the display of the character input box control corresponding to the at least two parts of text, including:
[0193] In the case where the at least two parts of text include L word segments, the display unit 606 is configured to display L character input box controls in L display areas corresponding to the L word segments;
[0194] In the case where the at least two parts of text include X paragraphs or sentences, the display unit 606 is used to display X text numbers in X display areas corresponding to the X paragraphs or sentences, and display a second window, wherein the second window includes X character input box controls corresponding to the X text numbers, and X is an integer greater than 1.
[0195] Optionally, when the target text content is text content input after receiving the target character, the user input unit 607 is further used to receive input of a target start character and a target end character, and the target text content is located between the target start character and the target end character.
[0196] The electronic device provided in the embodiment of the present application can perform the following operations: Figure 1 The various steps of the method embodiment shown in FIG. Figure 1 The same beneficial effects as those of the method embodiments shown are not described again here to avoid repetition.
[0197] It should be understood that in the embodiment of the present application, the input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) and a microphone, and the graphics processor processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 606 may include a display panel, and the display panel may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel and other input devices. The touch panel is also called a touch screen. The touch panel may include two parts: a touch detection device and a touch controller. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 609 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 610.
[0198] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned text display method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0199] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0200] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned text display method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0201] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0202] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes 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 one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0204] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A text display method, characterized in that: include: In the case of displaying the text editing interface, receiving a first input, wherein the first input is used to input a target character; Determining the target display parameter corresponding to the target character according to the corresponding relationship between the target character and the target display parameter; The target text content is displayed according to the target display parameter, wherein the target text content is the text content input after receiving the target character, or the text content selected before receiving the target character.
2. The method according to claim 1, characterized in that Before receiving the first input, the method further includes: receiving a second input; In response to the second input, displaying a first setting interface; Receiving a third input in the first setting interface; In response to the third input, the target character is associated with the target display parameter.
3. The method according to claim 1, characterized in that In a case where the target character is pre-associated with at least two candidate display parameters, determining the target display parameter corresponding to the target character according to the target character includes: In response to the first input, displaying a first window control, wherein the first window control includes function options corresponding one-to-one to the at least two candidate display parameters; receiving a fourth input of a target function option, wherein the function options corresponding one-to-one to the at least two candidate display parameters include the target function option; In response to the fourth input, the candidate display parameter corresponding to the target function option is determined as the target display parameter.
4. The method according to any one of claims 1 to 3, characterized in that Before receiving the first input, the method further includes: Performing natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text; Displaying character input box controls corresponding one to one to the at least two parts of text; Among them, the first input is used to input the target character in the target character input box control, the target text content includes the partial text corresponding to the target character input box control, and the character input box controls corresponding one-to-one to the at least two partial texts include the target character input box control.
5. The method according to claim 4, characterized in that The at least two parts of text include: at least two paragraphs, at least two sentences or at least two word segments.
6. The method according to claim 4, characterized in that The performing natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text includes: Display natural language processing mode controls; receiving a fifth input to the natural language processing mode control; In response to the fifth input, performing a first natural language processing on the text in the text editing interface to divide the text in the text editing interface into N paragraphs, where N is an integer greater than 1; In the case where the at least two parts of text include at least two sentences, the method further includes: receiving a sixth input of a target paragraph, wherein the N paragraphs include the target paragraph; In response to the sixth input, performing a second natural language processing on the target paragraph to divide the target paragraph into M sentences, where M is an integer greater than 1; In the case where the at least two parts of text include at least two participles, the method further includes: receiving a seventh input of a target sentence, wherein the M sentences include the target sentence; In response to the seventh input, a third natural language processing is performed on the target sentence to divide the target sentence into L tokens, where L is an integer greater than 1.
7. The method according to claim 5, characterized in that The display of the character input box control corresponding to the at least two parts of text includes: In the case where the at least two parts of text include L word segments, displaying L character input box controls in L display areas corresponding to the L word segments; In a case where the at least two parts of text include X paragraphs or sentences, X text numbers are displayed in X display areas corresponding to the X paragraphs or sentences, and a second window is displayed, wherein the second window includes X character input box controls corresponding to the X text numbers, and X is an integer greater than 1.
8. A text display device, characterized in that: include: A first input module, configured to receive a first input when the text editing interface is displayed, wherein the first input is used to input a target character; A first determining module, configured to determine a target display parameter corresponding to the target character according to a corresponding relationship between the target character and the target display parameter; The first display module is used to display target text content according to the target display parameter, wherein the target text content is text content input after receiving the target character, or text content selected before receiving the target character.
9. The device according to claim 8, characterized in that Also includes: A second input module, used for receiving a second input; A second display module, configured to display a first setting interface in response to the second input; A third input module, used for receiving a third input in the first setting interface; The associating module is used to associate the target character with the target display parameter in response to the third input.
10. The device according to claim 8, characterized in that In the case where the target character is pre-associated with at least two candidate display parameters, the first determining module includes: A first display unit, configured to display a first window control in response to the first input, wherein the first window control includes function options corresponding one-to-one to the at least two candidate display parameters; a first input unit, configured to receive a fourth input of a target function option, wherein the function options corresponding one-to-one to the at least two candidate display parameters include the target function option; The first determining unit is configured to determine, in response to the fourth input, a candidate display parameter corresponding to the target function option as a target display parameter.
11. The device according to any one of claims 8 to 10, characterized in that Also includes: A first processing module, configured to perform natural language processing on the text in the text editing interface to divide the text in the text editing interface into at least two parts of text; A third display module, used for displaying character input box controls corresponding one to one to the at least two parts of text; Among them, the first input is used to input the target character in the target character input box control, the target text content includes the partial text corresponding to the target character input box control, and the character input box controls corresponding one-to-one to the at least two partial texts include the target character input box control.
12. The device according to claim 11, characterized in that The at least two parts of text include: at least two paragraphs, at least two sentences or at least two word segments.
13. The device according to claim 11, characterized in that The first processing module comprises: a second display unit, for displaying a natural language processing mode control; a second input unit, configured to receive a fifth input to the natural language processing mode control; a first processing unit, configured to perform a first natural language processing on the text in the text editing interface in response to the fifth input, so as to divide the text in the text editing interface into N paragraphs, where N is an integer greater than 1; In the case where the at least two parts of text include at least two sentences, the apparatus further includes: a fourth input module, configured to receive a sixth input of a target paragraph, wherein the N paragraphs include the target paragraph; a second processing module, configured to perform a second natural language processing on the target paragraph in response to the sixth input, so as to divide the target paragraph into M sentences, where M is an integer greater than 1; In the case where the at least two parts of text include at least two participles, the device further includes: a fifth input module, configured to receive a seventh input of a target sentence, wherein the M sentences include the target sentence; The third processing module is used to perform a third natural language processing on the target sentence in response to the seventh input, so as to divide the target sentence into L word segments, where L is an integer greater than 1.
14. The device according to claim 12, characterized in that The third display module is specifically used for: In the case where the at least two parts of text include L word segments, displaying L character input box controls in L display areas corresponding to the L word segments; In the case where the at least two parts of text include X paragraphs or sentences, X text numbers are displayed in X display areas corresponding to the X paragraphs or sentences, and a second window is displayed, wherein: The second window includes X character input box controls corresponding to the X text numbers, where X is an integer greater than 1.
Citation Information
Patent Citations
Method for distributing large character set to keys of digital keyboard in different modes and acquiring low press key data input ratio
CN101371215A
Input display apparatus and input display method
CN102455887A