WO2023045920A1 - 文本显示方法和文本显示装置 - Google Patents

文本显示方法和文本显示装置 Download PDF

Info

Publication number
WO2023045920A1
WO2023045920A1 PCT/CN2022/119901 CN2022119901W WO2023045920A1 WO 2023045920 A1 WO2023045920 A1 WO 2023045920A1 CN 2022119901 W CN2022119901 W CN 2022119901W WO 2023045920 A1 WO2023045920 A1 WO 2023045920A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
target
input
display
character
Prior art date
Application number
PCT/CN2022/119901
Other languages
English (en)
French (fr)
Inventor
刘朝辉
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Priority to EP22871966.2A priority Critical patent/EP4407507A1/en
Publication of WO2023045920A1 publication Critical patent/WO2023045920A1/zh
Priority to US18/607,502 priority patent/US20240220090A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities

Definitions

  • the present application belongs to the technical field of communication, and in particular relates to a text display method and a text display device.
  • 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.
  • the embodiment of the present application provides a text display method, the method includes:
  • Target text content is text content input after receiving the target character, or text content selected before receiving the target character.
  • the embodiment of the present application provides a text display device, including:
  • the first input module is configured to receive a first input when a text editing interface is displayed, and the first input is used to input a target character;
  • a first determining module configured to determine target display parameters corresponding to the target character according to the target character
  • a first display module configured to display target text content according to the target display parameters, 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 .
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the method described in the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, on which a program or an 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 .
  • the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect the method described.
  • the embodiment of the present application provides a computer program/program product, the computer program/program product is stored in a non-transitory storage medium, and the program/program product is executed by at least one processor to implement The steps of the method as described in the first aspect.
  • an electronic device configured to implement the steps of the method described in the first aspect.
  • a first input is received, and the first input is used to input a target character; according to the target character, a target display parameter corresponding to the target character is determined; Displaying 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.
  • the display parameters of the target text content can be adjusted according to the target characters input by the user in the text editing interface.
  • the embodiment of the present application simplifies the operation process of setting text display parameters through the technical solution of adjusting the display parameters of the text content in the text editing interface through operations in the text display parameter setting interface.
  • FIG. 1 is a flow chart of a text display method provided by an embodiment of the present application
  • Fig. 2a is a schematic diagram of the first window control in the embodiment of the present application.
  • Fig. 2b is a schematic diagram of the natural language processing mode control in the embodiment of the present application.
  • Fig. 3a is a schematic diagram of dividing the text in the text editing interface into N paragraphs in the embodiment of the present application;
  • Fig. 3b is a schematic diagram of dividing the text in the text editing interface into M sentences in the embodiment of the present application;
  • Fig. 3c is a schematic diagram of dividing the text in the text editing interface into L participles in the embodiment of the present application;
  • Fig. 4 is a schematic structural diagram of a text display device provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another electronic device provided by an embodiment of the present application.
  • the execution subject of the text display method provided in the embodiment of the present application may be: a mobile terminal such as a mobile phone, a tablet computer, and a smart watch. Perform: font, font color, background color, text size, text bold, text tilt and other display parameters adjustment.
  • the text display parameters on mobile terminals such as mobile phones are usually set in the following two ways:
  • the user only needs to input the target character in the text editing interface, and then the target character and the target display parameter can be Determine the target display parameters, so as to display the target text content according to the target display parameters, it does not need to switch back and forth between the text display parameter setting interface and the text editing interface, so that the text editing operation is more coherent, thereby simplifying the text setting Displays the operation process of the parameter.
  • the execution body of the text display method provided in the embodiment of the present application may also be other electronic equipment such as a computer, which is not specifically limited here.
  • the text display method provided by the embodiment of the present application is executed as a mobile phone, and it is specifically used for the format adjustment of the text content in the memo function on the mobile phone as an example.
  • the text provided by the embodiment of the present application The display method is described as an example, and does not constitute a specific limitation here.
  • the text display method provided by the embodiment of the present application may include the following steps:
  • Step 101 When a text editing interface is displayed, a first input is received, and the first input is used to input a target character.
  • the above-mentioned text editing interface may be an interface capable of text editing, such as a text message editing interface, a memo editing interface, or the like.
  • the above-mentioned 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”, and the letter R may be pre-associated with the display parameter "red font”, And different display parameters are associated with different characters.
  • the above-mentioned 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.
  • the text content and the target character can be displayed in different display areas or display frames, or use special symbols (for example: space, @, ⁇ and other special symbols) to separate the target character from the text content.
  • special symbols for example: space, @, ⁇ and other special symbols
  • Step 102 Determine target display parameters corresponding to the target character according to the target character.
  • the association relationship between the target character and the target display parameter may be stored in advance, so that when the target character is received, the display parameter associated with the target character can be determined as the target display parameter.
  • the above-mentioned association between the target character and the target display parameter may be preset by the user, or be set by default in the electronic device that executes the text display method provided in the embodiment of the present application.
  • the electronic device in the case that the association between the target character and the target display parameter is the default setting in the electronic device executing the text display method provided by the embodiment of the present application, the electronic device can display or voice report package or any other Output prompt information in a manner, so as to inform the user of the association between the target character and the target display parameter through the prompt information.
  • Step 103 Display the target text content according to the target display parameters, 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.
  • the target text content is the text content input after receiving the target character, which can be understood as: a preset time (for example: 1 minute or 2 minutes, etc.) after the target character is input ), the text content input in the text editing interface; or the text content arranged after the target character in the text editing interface.
  • a preset time for example: 1 minute or 2 minutes, etc.
  • both the target text content and the target character are text content input in the text editing box, and in the target At the end of the text content, the target termination symbol can be input, 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 editing interface is located at the target The text content between the character and the target terminating symbol is displayed according to the target display parameters, and other text content arranged after the target terminating symbol is displayed according to the default display parameters (for example: black, No. 5, imitation Song typeface, etc. default display parameters) .
  • the default display parameters for example: black, No. 5, imitation Song typeface, etc. default display parameters
  • the text content newly input into the text editing interface will be displayed according to the default display parameter.
  • the method before the receiving the first input, the method further includes:
  • the target character is associated with the target display parameter.
  • the above-mentioned second input and third input may respectively include one or more of touch operations such as click, long press, double-click, and heavy-press, and the above-mentioned second input is used to trigger the first setting interface.
  • the first setting interface can be understood as: a setting interface for the association relationship between target characters and target display parameters. For example: in the first setting interface, a plurality of alternative display parameters are displayed, and each alternative display parameter is correspondingly displayed with a character input box control, when the user inputs a certain character, determine the association between the character and the target candidate display parameter.
  • the display parameter is: input character R in the character input box control corresponding to the red text
  • the character R can be associated with the red text, so that in the subsequent text editing process, if the target character input by the user Including R, you can display the target text content in red font.
  • the target character may include multiple characters, and each character corresponds to a display parameter.
  • the target text content will be displayed according to the display parameters corresponding to all the characters included in the target character. For example: suppose the target character is: BIR4, where B is associated with the display parameters of bold font, I is associated with the display parameters of italic font, R is associated with the display parameters of red font, and 4 is associated with the display parameters of No. 4 font, then The target text content will be bolded, italicized, and displayed in red 4th font.
  • the special characters in the above-mentioned target characters are exemplified by numbers and uppercase letters. However, in practical applications, the above-mentioned target characters may also include other characters such as lowercase letters and special symbols, which will not be exhausted here. lift.
  • the association between the target character and the target display parameter is preset by the user, and the association between the target character and the target display parameter can be realized according to the user's personal habits and personal well-being. Relationship personalization.
  • the relationship between the target character and the target display parameter can also be that one character corresponds to multiple alternative display parameters, for example: For commonly used colors: red, yellow, you can set a one-to-one association between characters and display parameters (for example: red is associated with character R (or lowercase letter r), yellow is associated with character Y (or lowercase letter y) Associating), for uncommonly used colors, that is, there are various optional colors other than the above-mentioned red and yellow, at this time, these various font color display parameters can be combined with the same character Associated, so that when the user inputs the character, various font colors associated with the character can be displayed and the function options corresponding to the display parameters allow the user to select the required font color.
  • the target character C (or lowercase letter c) can be input, and the target character C is associated with multiple font colors that are not commonly used, then in response to user input C, displaying the first window control 21 as shown in Figure 2a, the first window control 21 includes a color block 211 corresponding to each font color that is not commonly used, when the user clicks one of the color blocks 211 , then select the color displayed by the color block as the target font color to display the target text content according to the target font color.
  • first window control 21 can be displayed in any of the display modes such as floating display on the text editing interface or full-screen display, and after the above-mentioned first window control 21 is displayed, you can click the above-mentioned The first window control 21 is closed by means of a non-color area in the first window control 21 or a return key or the like.
  • the determining the target display parameter corresponding to the target character according to the target character includes:
  • an alternative display parameter corresponding to the target function option is determined as a target display parameter.
  • the above function options may include color blocks of the same color as the corresponding candidate colors; In the case of alternative fonts, the above function options may include text with the same font as the corresponding alternative font. In this way, it is convenient for the user to select the target function option intuitively.
  • the above at least two alternative display parameters also include: text size or text spacing and other display parameters with multiple values.
  • the above function options can include the same The text of the size, or the function option can include text content, and the text interval between the text content is the same as the corresponding text interval.
  • the type of at least two alternative display parameters and the corresponding alternative of the function option The display modes of the parameters are not exhaustive.
  • the above fourth input may include one or more of touch inputs such as click, long press, slide, and double click on the target function option, which is not specifically limited herein.
  • a character can be used to associate with at least two candidate display parameters, and when the character is entered in the first input, the first window control can be displayed so that the user can select one of the candidate display parameters as the target display parameters, which can avoid the need to set a corresponding character for each value or option for a display parameter type with multiple values or options, thereby greatly reducing the number of characters corresponding to all display parameters. It greatly reduces the complexity of the user's memory and the association between the characters used and the display parameters.
  • the text display method further includes:
  • the first input is used to input the target character in the target character input box control
  • the target text content includes a part of the text corresponding to the target character input box control, corresponding to the at least two parts of the text
  • the character input box control includes the target character input box control.
  • the text in the above text editing interface may be the target text content pre-selected by the user, or all the text content already input in the text editing interface.
  • the text content selection mode by long pressing and other input operations.
  • content and after selecting the target text content, perform the above-mentioned natural language processing on the selected target text content, so as to divide the target text content into at least two parts of text, and display characters corresponding to the at least two parts of text one-to-one Input box control.
  • the above natural language processing can be performed on all the text content in the text editing interface, so as to divide all the text content in the text editing interface into at least two parts text, and displaying character input box controls corresponding to the at least two parts of the text.
  • the above-mentioned natural language processing may perform text semantic comparison and text format recognition on the text in the text editing interface, so as to divide the text in the text editing interface into at least two parts according to the processing results.
  • the above-mentioned character input box controls corresponding to the at least two parts of the text may be displayed in the second window, and each character input box control in the second window has a corresponding part of the text. Identification information. In this way, in the process of adjusting the format of a certain part of the text or some parts of the text, the characters corresponding to the required display parameters can be input in the character input box control corresponding to the part of the text.
  • the text content in the text editing interface 20 is divided into 3 paragraphs, and each paragraph has its own paragraph number
  • the second window 22 is suspended and displayed, and in the second window 22 Including 3 character input box controls 221 corresponding to 3 paragraphs one by one, after entering the target character: BIR4 in the character input box control 221 corresponding to the first paragraph (that is, the statement 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 is displayed according to the target character: the display parameters corresponding to BIR4 (ie, bold text, italic text, red font, font size 4), and the second paragraph And the display parameters of paragraph 3 can keep the default display parameters.
  • the second window 22 when the text content in the text editing interface 20 is divided into 4 sentences, and each sentence has its own sentence number, the second window 22 is suspended in the text editing interface 20,
  • the second window 22 includes 4 character input box controls 221 corresponding to the 4 sentences one by one, and in the character input box control 221 corresponding to the 1st sentence (that is, the sentence whose sentence number is "1"), input the target character: BIR4 Afterwards, click the confirm button 23, then the second window 22 can be closed, and the text in the first sentence is displayed according to the target character: the corresponding display parameters of BIR4 (i.e. bold text, inclined text, red font, No. 4 font) , and the display parameters of the 2nd to 4th statements can keep the default display parameters.
  • the corresponding display parameters of BIR4 i.e. bold text, inclined text, red font, No. 4 font
  • the display parameters of the 2nd to 4th statements can keep the default display parameters.
  • the above-mentioned character input box controls corresponding to the at least two parts of text may be displayed close to their respective corresponding parts of text.
  • the text content in the text editing interface 20 is divided into seven participles, and a character input box control 27 corresponding to the participle is displayed below each participle.
  • the participle "receive” can be used according to the target character: the display parameters corresponding to BIR4 (i.e. bold text, italic text, red font, No. 4 font) to display, and the display parameters of other word segmentation can keep the default display parameters.
  • the user can select different natural language processing modes to adjust the format of the text in a certain paragraph, or adjust the format of the text in a sentence, or only adjust the format of a certain participle.
  • the natural language processing mode is illustrated by taking the at least two parts of the text as examples including: at least two paragraphs, at least two sentences, or at least two word segmentations.
  • a natural language processing mode control is displayed on the text editing interface. Switching of the natural language processing mode is realized according to the number of times the user touches the natural language processing mode control.
  • a natural language processing mode control 24 is displayed on the text editing interface 20, and when the user clicks the natural language processing mode control 24, the text content 201 in the text editing interface 20 is displayed according to the The paragraph is divided into at least two parts of the text, that is, the interface shown in Figure 3a is displayed; 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 the text according to their respective sentences , that is, the interface shown in FIG.
  • 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 according to the paragraph division method, and the user In the case of performing a preset operation on a certain paragraph (for example: press and hold the paragraph number), divide the text content in the paragraph into at least two parts of text according to the respective sentences; even, when the user performs a preset operation on a certain sentence (For example: in the case of long pressing the sentence number), the text content in the sentence is divided into at least two parts of text according to their respective word segments.
  • a preset operation on a certain paragraph for example: press and hold the paragraph number
  • the text content in the sentence is divided into at least two parts of text according to their respective word segments.
  • 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 including:
  • the method further includes:
  • the method further includes:
  • a third natural language processing is performed on the target sentence, so as to divide the target sentence into L participles, where L is an integer greater than 1.
  • the above-mentioned fifth input, sixth input, and seventh input may respectively include one or more of touch inputs such as click, long press, and double click.
  • the above-mentioned fifth input may be a touch input to the natural language processing mode control 24, and 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 are displayed, so that the N paragraphs are identified by the paragraph number 25.
  • the above-mentioned first natural language processing can be understood as: according to the segmentation format of the text content in the text editing interface, such as: the spacing before the paragraph, the indentation of the first line, etc., determine the segmentation position of the text content, so as to use the segmentation position Make paragraph divisions for boundaries.
  • the above-mentioned sixth input may be a touch input to the text content in the target paragraph or the paragraph number 25 of the target paragraph, and in response to the sixth input, the target paragraph may be divided into M statements, and M statement numbers 26 are displayed, so that the M statements are identified by the statement numbers 26 .
  • the above-mentioned second natural language processing can be understood as: according to the sentence format of the text content in the text editing interface, for example: detecting the position of the period ".” and the semicolon ";”, thereby using the position of the period or semicolon as the boundary Sentence division.
  • the above-mentioned seventh input can be a touch input to the text content in the target sentence or the sentence number 26 of the target sentence, and in response to the seventh input, the target sentence can be divided into L participles, and L character input box controls 27 are displayed in the display area corresponding to the L participles one-to-one, so as to distinguish the character input box controls of the L participles through different display areas.
  • the above-mentioned third natural language processing can be understood as: performing semantic recognition on the text content in the text editing interface, so as to split a complete sentence into at least two participles, wherein each participle may include one or more words , or participle can also include punctuation marks.
  • the text editing interface contains a large amount of text content
  • the displaying a character input box control corresponding to the at least two parts of text includes:
  • L character input box controls are displayed in L display areas corresponding to the L participle;
  • X text numbers are displayed in the X display areas corresponding to the X paragraphs or sentences, and a second window is displayed, wherein the second The window includes X character input box controls corresponding to the X text numbers, where X is an integer greater than 1.
  • each participle has its own corresponding display area, and the display area can be displayed close to its corresponding participle, for example: as shown in Figure 3c,
  • the character input box control 27 corresponding to the participle is displayed near the display area of the participle. In this way, each participle can be displayed corresponding to its corresponding character input box control, so that it is convenient for the user to find the character input box control corresponding to the participle that needs to be formatted among a large number of character input box controls.
  • the above-mentioned X text numbers are displayed in the X display areas corresponding to the X paragraphs or sentences, and the second window is displayed, and each paragraph or sentence divided by natural language processing can be assigned a number, and in In the second window, each serial number and its corresponding character input box control are displayed correspondingly.
  • the user can intuitively recognize the number corresponding to the target text content, and find the character input box control corresponding to the number from the second window, and enter the character input box control in the character input box control. Enter the target character to realize the format adjustment of the target text content.
  • the character input box controls 211 corresponding to each paragraph or sentence can be collectively displayed in the second window 21 , 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 that the character input corresponding to the paragraph or sentence that needs to be formatted Enter the target character in the box control 211, and then realize the accurate adjustment of the format of the target paragraph or target sentence.
  • the method when the target text content is text content input after receiving the target character, the method further includes:
  • An input target start character and target end character are received, and the target text content is located between the target start character and the target end character.
  • the above target start character and target terminator can be preset special symbols, for example: the target start character is " ⁇ ", and the target terminator is "/>".
  • the target start character is " ⁇ ”
  • the target terminator is "/>”.
  • the above-mentioned target character can also be located between the target start character and the target terminator, for example: input: ⁇ BIR4xxxxx/> in the text editing interface, then the target text content "xxxxx" will be in accordance with the target character BIR4
  • the corresponding display parameters that is, bold text, italic text, red font, font size 4) are displayed.
  • both the target character and the target text content are located between the target start character and the target terminator, in order to avoid confusing the target text content with the characters in the target character, it is also possible to place a target character between the target character and the target text content Insert one or more special characters, such as a symbol " ⁇ " or two space characters, etc., to distinguish the target text content from the target character by identifying the one or more special characters, which can improve the text display method. reliability.
  • the above target character can also be input in other display areas or windows, for example: between the target start character and the target terminator
  • the target character can be input in the floating character input box control, which is not specifically limited here.
  • the target character includes at least two conflicting characters. For example, assuming that the character R is associated with a red font, and the character Y is associated with a yellow font, if the target character includes both R and Y In the case of letters associated with different color fonts, it means that the target character consists of two conflicting characters. At this time, the problem that the target display parameters cannot be accurately determined due to the fact that the target character includes two conflicting characters can be overcome by the following methods:
  • the target character includes at least two conflicting characters
  • the character that is arranged first in the at least two conflicting characters is used as a valid character
  • the at least two conflicting characters except the above-mentioned Characters other than the first character are regarded as invalid characters, so that it is determined that the target display parameters include display parameters corresponding to valid characters.
  • the text display method provided by the embodiment of the present application may be executed by a text display device, or a control module in the text display device for executing the text display method.
  • 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.
  • a text display device 400 provided in an embodiment of the present application may include:
  • the first input module 401 is configured to receive a first input when a text editing interface is displayed, and the first input is used to input a target character;
  • the first determining module 402 is configured to determine target display parameters corresponding to the target character according to the target character;
  • the first display module 403 is configured to display the target text content according to the target display parameters, wherein the target text content is the text content input after receiving the target character, or the text selected before receiving the target character content.
  • the text display device 400 also includes:
  • a second input module configured to receive a second input
  • a second display module configured to display a first setting interface in response to the second input
  • a third input module configured to receive a third input in the first setting interface
  • An association module configured to associate the target character with the target display parameter in response to the third input.
  • the first determining module 402 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 that correspond one-to-one to the at least two candidate display parameters;
  • a first input unit configured to receive a fourth input to a target function option, wherein the function options corresponding to the at least two candidate display parameters one-to-one include the target function option;
  • a first determining unit configured to, in response to the fourth input, determine a candidate display parameter corresponding to the target function option as a target display parameter.
  • the text display device 400 also includes:
  • a first processing module configured to perform natural language processing on the text in the text editing interface, so as to divide the text in the text editing interface into at least two parts of text;
  • a third display module configured to display character input box controls corresponding to the at least two parts of text
  • the first input is used to input the target character in the target character input box control
  • the target text content includes a part of the text corresponding to the target character input box control, corresponding to the at least two parts of the text
  • the character input box control includes the target character input box control.
  • the at least two parts of text include: at least two paragraphs, at least two sentences, or at least two participles.
  • the first processing module includes:
  • the second display unit is used to display the natural language processing mode control
  • a second input unit configured to receive a fifth input to the natural language processing mode control
  • the first processing unit is configured to perform 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 greater than an integer of 1;
  • the text display device 400 further includes:
  • a fourth input module configured to receive a sixth input to the target paragraph, wherein the N paragraphs include the target paragraph;
  • the second processing module is configured to perform 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;
  • the text display device 400 further includes:
  • a fifth input module configured to receive a seventh input to the target sentence, wherein the M sentences include the target sentence;
  • the third processing module is 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 word segmentations, where L is an integer greater than 1.
  • the third display module is specifically used for:
  • L character input box controls are displayed in L display areas corresponding to the L participle;
  • X text numbers are displayed in the X display areas corresponding to the X paragraphs or sentences, and a second window is displayed, wherein the second The window includes X character input box controls corresponding to the X text numbers, where X is an integer greater than 1.
  • the text display device 400 when the target text content is text content input after receiving the target character, the text display device 400 further includes:
  • the sixth input module is configured to receive an input target start character and target end character, and the target text content is located between the target start character and the target end character.
  • the text display device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the device may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a 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).
  • 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., the embodiment of the present application Not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine a self-service machine
  • the text display device in the embodiment of the present application may be a device with 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 this embodiment of the present application.
  • the text display device provided by the embodiment of the present application can realize various processes realized by the method embodiment shown in FIG. 1 , and can achieve the same beneficial effects. To avoid repetition, details are not repeated here.
  • the embodiment of the present application further provides an electronic device 500, including a processor 501, a memory 502, and programs or instructions stored in the memory 502 and operable on the processor 501,
  • an electronic device 500 including a processor 501, a memory 502, and programs or instructions stored in the memory 502 and operable on the processor 501,
  • the program or instruction is executed by the processor 501, each process of the above-mentioned text display method embodiment can be realized, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • 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, etc. part.
  • the electronic device 600 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 610 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions.
  • a power supply such as a battery
  • the structure of the electronic device shown in FIG. 6 does not constitute a limitation to the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, which will not be repeated here. .
  • the user input unit 607 is configured to receive a first input when the display unit 606 displays a text editing interface, and the first input is used to input a target character;
  • a processor 610 configured to determine target display parameters corresponding to the target character according to the target character
  • the display unit 606 is further configured to display the target text content according to the target display parameters, 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 .
  • the user input unit 607 is further configured to receive a second input before performing the receiving the first input;
  • the display unit 606 is further configured to display a first setting interface in response to the second input;
  • the user input unit 607 is further configured to receive a third input in the first setting interface
  • the processor 610 is further configured to associate the target character with the target display parameter in response to the third input.
  • the determining the target display parameter corresponding to the target character according to the target character performed by the processor 610 includes:
  • a display unit 606 configured to display a first window control in response to the first input, where the first window control includes function options that correspond one-to-one to the at least two candidate display parameters;
  • the user input unit 607 is configured to receive a fourth input to the target function option, wherein the function option corresponding to the at least two alternative display parameters includes the target function option;
  • the processor 610 is configured to, in response to the fourth input, determine a candidate display parameter corresponding to the target function option as a target display parameter.
  • the user input unit 607 before performing the receiving the first input, the user input unit 607:
  • the processor 610 is further configured to perform natural language processing on the text in the text editing interface, so as to divide the text in the text editing interface into at least two parts of text;
  • the display unit 606 is further configured to display character input box controls corresponding to the at least two parts of the text;
  • the first input is used to input the target character in the target character input box control
  • the target text content includes a part of the text corresponding to the target character input box control, corresponding to the at least two parts of the text
  • the character input box control includes the target character input box control.
  • the at least two parts of text include: at least two paragraphs, at least two sentences or at least two participles.
  • the performing natural language processing on the text in the text editing interface executed by the processor 610 to divide the text in the text editing interface into at least two parts of text includes:
  • a display unit 606, configured to display a natural language processing mode control
  • a user input unit 607 configured to receive a fifth input to the natural language processing mode control
  • Processor 610 configured to, in response to the fifth input, perform first natural language processing on the text in the text editing interface, so as to divide the text in the text editing interface into N paragraphs, where N is greater than 1 an integer of
  • At least two-part text comprises at least two sentences:
  • the user input unit 607 is further configured to receive a sixth input to the target paragraph, wherein the N paragraphs include the target paragraph;
  • the processor 610 is further configured to, in response to the sixth input, perform second natural language processing on the target paragraph, so as to divide the target paragraph into M sentences, where M is an integer greater than 1;
  • At least two-part text includes at least two participles:
  • the user input unit 607 is further configured to receive a seventh input to the target sentence, wherein the M sentences include the target sentence;
  • the processor 610 is further configured to, in response to the seventh input, perform a third natural language processing on the target sentence, so as to divide the target sentence into L word segmentations, where L is an integer greater than 1.
  • the displaying the character input box controls corresponding to the at least two parts of text performed by the display unit 606 includes:
  • the display unit 606 is configured to display L character input box controls in L display areas corresponding to the L participle;
  • the display unit 606 is configured 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, where X is an integer greater than 1.
  • the user input unit 607 is further configured to receive an input target start character and target terminator, and the target text content Between the target initiator and the target terminator.
  • the electronic device provided by the embodiment of the present application can execute each step of the method embodiment shown in FIG. 1 , and can achieve the same beneficial effects as the method embodiment shown in FIG. 1 , so details are not repeated here to avoid repetition.
  • the input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) and a microphone, and the graphics processor is used by an image capture device (such as a camera) in a video capture mode or an image capture mode.
  • the obtained image data of still picture or video is processed.
  • 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, or the like.
  • the user input unit 607 includes a touch panel and other input devices. Touch panel, also known as touch screen.
  • the touch panel can include two parts: a touch detection device and a touch controller.
  • Memory 609 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • Processor 610 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 610 .
  • the embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
  • a program or instruction is stored on which a program or instruction is stored.
  • the processor is the processor in the electronic device described in the above embodiments.
  • the readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above text display method embodiment Each process can achieve the same technical effect, so in order to avoid repetition, it will not be repeated here.
  • chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
  • the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
  • 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. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
  • the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present application.
  • a terminal which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请公开了一种文本显示方法和文本显示装置,属于通信技术领域。其中,方法包括:在显示文本编辑界面的情况下,接收第一输入,第一输入用于输入目标字符(101);根据目标字符,确定与目标字符对应的目标显示参数(102);按照目标显示参数显示目标文本内容(103),其中,目标文本内容为在接收目标字符之后输入的文本内容,或者在接收目标字符之前选中的文本内容。

Description

文本显示方法和文本显示装置
相关申请的交叉引用
本申请主张在2021年9月24日在中国提交的中国专利申请No.202111120215.3的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于通信技术领域,具体涉及一种文本显示方法和文本显示装置。
背景技术
在相关技术中,对于手机等移动终端上的文本显示参数,用户可在编辑文本的过程中或者是在文本编辑完成之后,对文本的显示参数进行调整。但是,相关技术中对于文本显示参数的调整,通常需要在文本显示参数设置界面和文本编辑界面之间进行来回切换,造成操作过程比较繁琐。
发明内容
本申请实施例的目的是提供一种文本显示方法和文本显示装置,能够简化设置文本显示参数的操作过程。
为了解决上述技术问题,本申请是这样实现的:
第一方面,本申请实施例提供了一种文本显示方法,该方法包括:
在显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符;
根据所述目标字符,确定与所述目标字符对应的目标显示参数;
按照所述目标显示参数显示目标文本内容,其中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。
第二方面,本申请实施例提供了一种文本显示装置,包括:
第一输入模块,用于在显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符;
第一确定模块,用于根据所述目标字符,确定与所述目标字符对应的目标显示参数;
第一显示模块,用于按照所述目标显示参数显示目标文本内容,其中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。
第六方面,本申请实施例提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在非瞬态的存储介质中,所述程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤。
第七方面,提供了一种电子设备,被配置为实现如第一方面所述的方法的步骤。
在本申请实施例中,在显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符;根据所述目标字符,确定与所述目标字符对应的目标显示参数;按照所述目标显示参数显示目标文本内容,其中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。这样,可以根据用户在文本编辑界面内输入的目标字符来调整目标文本内容的显示参数,其相较于相关技术中,需要在文本编辑界面与文本显示参数设置界面之间进行来回切换,才能够通过对文本显示参数设置界面中的操作来调节文本编辑界面内的文本内容的显示参数的技术方案,本申请实施例简化了设置文本显示参数的操作过程。
附图说明
图1是本申请实施例提供的一种文本显示方法的流程图;
图2a是本申请实施例中的第一窗口控件的示意图;
图2b是本申请实施例中的自然语言处理模式控件的示意图;
图3a是本申请实施例中将所述文本编辑界面内的文本划分为N个段落的示意图;
图3b是本申请实施例中将所述文本编辑界面内的文本划分为M个语句的示意图;
图3c是本申请实施例中将所述文本编辑界面内的文本划分为L个分词的示意图;
图4是本申请实施例提供的一种文本显示装置的结构示意图;
图5是本申请实施例提供的一种电子设备的结构示意图;
图6是本申请实施例提供的另一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
本申请实施例提供的文本显示方法的执行主体可以是:手机、平板电脑、智能手表等移动终端,例如:应用于手机上的备忘录、便签或短信编辑等功 能,以对便签或短信等文字内容进行:字体、字体颜色、背景颜色、文字大小、文字加粗、文字倾斜等显示参数的调整。
在相关技术中,对于手机等移动终端上的文本显示参数,通常采用以下两种方式进行设置:
一、通过在文本显示参数设置界面和文本编辑界面之间进行来回的切换,以在编辑文本内容的过程中,通过在文本显示参数设置界面中的触控操作来调整后续在文本编辑界面内输入的文本的显示参数。
二、在完成文本输入之后,通过长按等触控输入,选取文本编辑界面内的文本内容,并通过在文本显示参数设置界面中的触控操作来调整选中的文本内容的显示参数,该方式同样需要在文本显示参数设置界面和文本编辑界面之间进行来回的切换,且还需要对需要编辑格式的文字进行选取操作。
由上可知,不管是采用哪一种方式设置文本显示参数,都需要在文本显示参数设置界面和文本编辑界面之间进行来回的切换,才能够实现对文本编辑界面内的文本内容进行格式调整,其中断了文字编辑的操作过程。
而本申请实施例中,通过预先存储目标字符和目标显示参数之间的关联关系,以使用户仅需在文本编辑界面内输入目标字符,便可以根据目标字符和目标显示参数之间的关联关系确定目标显示参数,从而按照所述目标显示参数显示目标文本内容,其并不需要在文本显示参数设置界面和文本编辑界面之间进行来回的切换,使得文字编辑操作更加连贯,从而简化了设置文本显示参数的操作过程。
当然,本申请实施例提供的文本显示方法的执行主体还可以是计算机等其他电子设备,在此不作具体限定。为了便于说明,以下实施例中以本申请实施例提供的文本显示方法地执行主体为手机,且具体用于手机上的备忘录功能中的文字内容的格式调整为例,对本申请实施例提供的文本显示方法进行举例说明,在此不构成具体限定。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的文本显示方法、文本显示装置、电子设备和计算机可读存储介质进行详细地 说明。
请参阅图1,本申请实施例提供的文本显示方法可以包括以下步骤:
步骤101、在显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符。
在具体实施中,上述文本编辑界面可以是短信编辑界面、便签编辑界面等能够进行文字编辑的界面。上述目标字符可以包括:字母、数字、特殊字符等字符中的一个或多个,例如:字母B可以与显示参数“字体加粗”预先关联,字母R可以与显示参数“红色字体”预先关联,且不同的显示参数关联不同的字符。
上述第一输入可以包括在文本编辑界面内执行的字符输入操作,例如:对文本编辑界面内的触控键盘进行触控操作,以在文本编辑界面内输入目标字符。
可选的,为了实现将目标字符与文本编辑界面内的文本内容进行区分,可以将文本内容和目标字符显示在不同的显示区域或显示框内,或者,利用特殊符号(例如:空格、@、^等特殊符号)将目标字符与文本内容间隔开。
步骤102、根据所述目标字符,确定与所述目标字符对应的目标显示参数。
在具体实施中,可以预先存储所述目标字符与所述目标显示参数之间的关联关系,从而在接收到所述目标字符时,能够将该目标字符关联的显示参数确定为目标显示参数。
可选的,上述目标字符与所述目标显示参数之间的关联关系可以是用户预先设置的,或者是执行本申请实施例提供的文本显示方法的电子设备中默认设置的。其中,在目标字符与所述目标显示参数之间的关联关系是执行本申请实施例提供的文本显示方法的电子设备中默认设置的情况下,该电子设备可以通过显示或语音报告包等任一种方式输出提示信息,以通过该提示信息告知用户:目标字符与所述目标显示参数之间的关联关系。
步骤103、按照所述目标显示参数显示目标文本内容,其中,所述目标 文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。
在一种可选的实施方式中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,可以理解为:在输入目标字符之后的预设时间(例如:1分钟或2分钟等)内,在所述文本编辑界面内输入的文本内容;或者所述文本编辑界面内排列于目标字符之后的文本内容。
其中,在所述目标文本内容为所述文本编辑界面内排列于目标字符之后的文本内容的情况下,所述目标文本内容和目标字符均为在文本编辑框内输入的文本内容,且在目标文本内容的文末可以输入目标终止符号,以使所述文本编辑界面内排列于目标终止符号后的其他文本内容不再按照所述目标显示参数进行显示,例如:将所述文本编辑界面内位于目标字符和目标终止符号之间的文本内容按照目标显示参数显示,而将排列与目标终止符号之后的其他文本内容按照默认的显示参数(例如:黑色、5号、仿宋体等默认显示参数)进行显示。
当然,为了实现使所述文本编辑界面内除了目标文本内容之外的其他文本内容不再按照所述目标显示参数进行显示,也可以采用以下方式:
在所述文本编辑界面内显示默认格式按钮;
在完成所述目标文本内容的输入的情况下,接收对所述显示默认格式按钮的触控输入;
响应于所述触控输入,将所述目标显示参数调整为默认显示参数。
这样,在将所述目标显示参数调整为默认显示参数之后,对于新输入至文本编辑界面内的文本内容,将按照默认显示参数进行显示。
作为另一种可选的实施方式,在所述接收第一输入之前,所述方法还包括:
接收第二输入;
响应于所述第二输入,显示第一设置界面;
在所述第一设置界面内接收第三输入;
响应于所述第三输入,将所述目标字符与所述目标显示参数进行关联。
在具体实施中,上述第二输入和第三输入分别可以包括点击、长按、双击、重按等触控操作中的一项或者多项,且上述第二输入用于触发第一设置界面的显示,该第一设置界面可以理解为:目标字符与目标显示参数之间的关联关系的设置界面。例如:在第一设置界面内显示多个备选显示参数,且每一备选显示参数对应显示有一个字符输入框控件,当用户在目标备选显示参数对应的字符输入框控件内输入某一字符时,则确定该字符与目标备选显示参数之间的关联关系。再例如:在显示参数为:红色文字对应的字符输入框控件内输入字符R的情况下,可以将字符R与红色文字进行关联,这样,在后续的文本编辑过程中,若用户输入的目标字符包括R,则可以将目标文本内容显示为红色字体。
当然,在实际应用中,目标字符可以包括多个字符,则每一个字符对应一种显示参数,此时,目标文本内容将按照目标字符中包括的全部字符对应的显示参数进行显示。例如:假设目标字符为:BIR4,其中,B与字体加粗的显示参数关联,I与字体倾斜的显示参数关联、R与红色字体的显示参数关联,4与4号字体的显示参数关联,则目标文本内容将加粗显示、倾斜显示,并显示为红色的4号字体。
需要说明的是,上述目标字符中的特殊字符以数字和大写字母为例进行举例,但是,在实际应用中,上述目标字符还可以包括小写字母、特殊符号等其他字符,在此不作一一穷举。
本实施方式中,上述目标字符与所述目标显示参数之间的关联关系是用户预先设置的,可以根据用户的个人习惯和个人还好等,实现目标字符与所述目标显示参数之间的关联关系的个性化设置。
值得指出的是,目标字符与所述目标显示参数之间的关联关系除了可以是上述一个字符对应一个显示参数的关联关系之外,还可以是一个字符对应多个备选的显示参数,例如:对于常用的颜色:红色、黄色,可以设置字符与显示参数之间的一对一的关联关系(例如:红色与字符R(或者小写字母r) 进行关联,黄色与字符Y(或者小写字母y)进行关联),对于不常用的颜色,即除了上述红色和黄色之外的其他任意可选的颜色是多种多样的,此时,可以将这些多种多样的字体颜色显示参数与同一个字符进行关联,以在用户输入该字符的情况下,可以显示该字符关联的多种多样的字体颜色显示参数对应的功能选项,以使用户从中选择需要的字体颜色。
例如:如图2a所示,如果用户要选择不常用的字体颜色,则可以输入目标字符C(或者小写字母c),该目标字符C与不常用的多种字体颜色关联,则响应于用户输入的C,显示如图2a所示的第一窗口控件21,该第一窗口控件21包括与每一个不常用的字体颜色一一对应的色块211,在用户点击其中一个色块211的情况下,则选中该色块所显示的颜色作为目标字体颜色,以按照该目标字体颜色显示目标文本内容。值得说明的是,上述第一窗口控件21可以以悬浮显示在文本编辑界面,或者全屏显示等显示方式中的任一种进行显示,且在显示上述第一窗口控件21之后,可通过点击上述第一窗口控件21中的非颜色区域或者返回键等方式关闭第一窗口控件21。
作为一种可选的实施方式,在所述目标字符预先关联有至少两个备选显示参数的情况下,所述根据所述目标字符,确定与所述目标字符对应的目标显示参数,包括:
响应于所述第一输入,显示第一窗口控件,其中,所述第一窗口控件包括与所述至少两个备选显示参数一一对应的功能选项;
接收对目标功能选项的第四输入,其中,与所述至少两个备选显示参数一一对应的功能选项包括所述目标功能选项;
响应于所述第四输入,将与所述目标功能选项对应的备选显示参数确定为目标显示参数。
在具体实施中,在上述至少两个备选显示参数均为备选颜色的情况下,上述功能选项可以包括与其对应的备选颜色同色的色块;在上述至少两个备选显示参数均为备选字体的情况下,上述功能选项可以包括与其对应的备选字体同字体的文字。这样,可以便于用户直观的选取目标功能选项。
值得说明的是,在上述至少两个备选显示参数还包括:文字大小或者文字间隔等其他具有多种取值的显示参数,对此,上述功能选项可以包括与其对应的备选文字大小具有相同尺寸的文字,或者功能选项可以包括文字内容,且该文字内容之间的文字间隔与其对应的文字间隔相同,在此对至少两个备选显示参数的类型,以及功能选项对其对应的备选显示参数的表现方式,不作一一穷举。
另外,上述第四输入可以包括对目标功能选项的点击、长按、滑动、双击等触控输入中的一种或多种,在此不作具体限定。
本实施方式中,可以利用一个字符与至少两个备选显示参数进行关联,并在第一输入输入该字符时,可以显示第一窗口控件,以使用户从中选取一个备选显示参数作为目标显示参数,能够避免对具有多个取值或多个可选项的显示参数类型,需要对每一个取值或可选项分别设置一个对应的字符,进而大大减少了与全部显示参数对应的字符的数量,大大减轻了用户记忆和使用字符与显示参数之间的关联关系的复杂程度。
作为一种可选的实施方式,在步骤101之前,所述文本显示方法还包括:
对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本;
显示与所述至少两部分文本一一对应的字符输入框控件;
其中,所述第一输入用于在目标字符输入框控件中输入所述目标字符,所述目标文本内容包括所述目标字符输入框控件对应的部分文本,与所述至少两部分文本一一对应的字符输入框控件包括所述目标字符输入框控件。
值得提出的是,上述文本编辑界面内的文本可以是用户预先选中的目标文本内容,或者是文本编辑界面内已经输入的全部文本内容。
在一种实施方式中,在完成文本编辑界面内的文本输入之后,可以通过长按等输入操作,进入文本内容选取模式,此时,可以通过移动光标等输入,来选择需要调整格式的目标文本内容,并在选中目标文本内容之后,对选中的目标文本内容进行上述自然语言处理,以将所述目标文本内容划分为至少 两部分文本,以及显示与所述至少两部分文本一一对应的字符输入框控件。
在另一种实施方式中,在完成文本编辑界面内的文本输入之后,可以对文本编辑界面内的全部文本内容进行上述自然语言处理,以将文本编辑界面内的全部文本内容划分为至少两部分文本,以及显示与所述至少两部分文本一一对应的字符输入框控件。
在具体实施中,上述自然语言处理可以对文本编辑界面内的文本进行文本语义对比、文本格式识别等处理,从而根据处理结果将文本编辑界面内的文本划分为至少两部分。
例如:将同一标题及该标题下的正文划分为一个部分、将同一文本段落中的文本划分为一个部分、将同一文本语句中的文本划分为一个部分或者将同一分词中的文本划分为一个部分等。
在一种实施方式中,上述与所述至少两部分文本一一对应的字符输入框控件可以集中显示在第二窗口中,且第二窗口中的每一个字符输入框控件具有对应的部分文本的标识信息。这样,在需要对某一部分文本或某些部分文本进行格式调整的过程中,在该部分文本对应的字符输入框控件中输入所需显示参数对应的字符即可。
例如:如图3a所示,文本编辑界面20中的文本内容划分为3个段落,且每一个段落具有各自的段落编号,在文本编辑界面20中悬浮显示第二窗口22,第二窗口22中包括与3个段落一一对应的3个字符输入框控件221,在第1段落(即段落编号为“1”的语句)对应的字符输入框控件221中输入目标字符:BIR4之后,点击确定按钮23,则可以关闭第二窗口22,并将第1段落中的文本按照目标字符:BIR4对应的显示参数(即文字加粗、文字倾斜、红色字体、4号字体)进行显示,而第2段落和第3段落的显示参数可以保持默认的显示参数。
进一步地,在接收到对目标段落编号的预设触控输入(例如:单击触控输入)的情况下,可以定位/跳转至该目标段落编号对应的段落内容,以在文本编辑界面中显示该目标段落编号对应的段落内容。
同理,如图3b所示,在文本编辑界面20中的文本内容划分为4个语句的情况下,且每一个语句具有各自的语句编号,在文本编辑界面20中悬浮显示第二窗口22,第二窗口22中包括与4个语句一一对应的4个字符输入框控件221,在第1语句(即语句编号为“1”的语句)对应的字符输入框控件221中输入目标字符:BIR4之后,点击确定按钮23,则可以关闭第二窗口22,并将第1语句中的文本按照目标字符:BIR4对应的显示参数(即文字加粗、文字倾斜、红色字体、4号字体)进行显示,而第2至第4语句的显示参数可以保持默认的显示参数。
进一步地,在接收到对目标语句编号的预设触控输入(例如:单击触控输入)的情况下,可以定位/跳转至该目标语句编号对应的语句内容,以在文本编辑界面中显示该目标语句编号对应的语句内容。
在另一种实施方式中,上述与所述至少两部分文本一一对应的字符输入框控件可以靠近各自对应的部分文本显示。例如:如图3c所示,文本编辑界面20中的文本内容划分为7个分词,且每一个分词下方显示有该分词对应的字符输入框控件27。当用户在分词“接收”下方的字符输入框控件27输入目标字符:BIR4之后,可以将分词“接收”按照目标字符:BIR4对应的显示参数(即文字加粗、文字倾斜、红色字体、4号字体)进行显示,而其他分词的显示参数可以保持默认的显示参数。
在具体实施中,用户可以选择不同的自然语言处理模式,以实现对某一段落中的文本进行格式调整,或者对某一语句中的文本进行格式调整,或者仅对某一分词进行格式调整。为了便于说明,以下实施例中以所述至少两部分文本包括:至少两个段落、至少两个语句或者至少两个分词为例,对自然语言处理模式进行举例说明。
在一种实施方式中,在文本编辑界面上显示自然语言处理模式控件。根据用户触控该自然语言处理模式控件的次数,来实现自然语言处理模式的切换。
例如:如图2b所示,在文本编辑界面20上显示有自然语言处理模式控 件24,当用户单击该自然语言处理模式控件24时,将文本编辑界面20中的文本内容201按照各自所在的段落划分为至少两部分文本,即显示如图3a所示的界面;当用户双击该自然语言处理模式控件24时,将文本编辑界面20中的文本内容按照各自所在的语句划分为至少两部分文本,即显示如图3b所示的界面;当用户连续点击3次该自然语言处理模式控件24时,将文本编辑界面20中的文本内容按照各自所在的分词划分为至少两部分文本,即显示如图3c所示的界面。
在另一种实施方式中,在开启自然语言处理模式的情况下,可以默认按照段落划分的方式,将文本编辑界面20中的文本内容按照各自所在的段落划分为至少两部分文本,并在用户对某一段落进行预设操作(例如:长按段落编号)的情况下,将该段落中的文本内容按照各自所在的语句划分为至少两部分文本;甚至,在用户对某一语句进行预设操作(例如:长按语句编号)的情况下,将该语句中的文本内容按照各自所在的分词划分为至少两部分文本。
可选的,所述对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本,包括:
显示自然语言处理模式控件;
接收对所述自然语言处理模式控件的第五输入;
响应于所述第五输入,对所述文本编辑界面内的文本进行第一自然语言处理,以将所述文本编辑界面内的文本划分为N个段落,N为大于1的整数;
在所述至少两部分文本包括至少两个语句的情况下,所述方法还包括:
接收对目标段落的第六输入,其中,所述N个段落包括所述目标段落;
响应于所述第六输入,对所述目标段落进行第二自然语言处理,以将所述目标段落划分为M个语句,M为大于1的整数;
在所述至少两部分文本包括至少两个分词的情况下,所述方法还包括:
接收对目标语句的第七输入,其中,所述M个语句包括所述目标语句;
响应于所述第七输入,对所述目标语句进行第三自然语言处理,以将所 述目标语句划分为L个分词,L为大于1的整数。
在具体实施中,上述第五输入、第六输入和第七输入,分别可以包括点击、长按、双击等触控输入中的一种或者多种。
具体的,如图2b和图3a所示,上述第五输入可以是对自然语言处理模式控件24的触控输入,响应于该第五输入,可以将所述文本编辑界面20内的文本划分为N个段落,并显示N个段落编号25,以通过段落编号25来标识N个段落。上述第一自然语言处理可以理解为:根据文本编辑界面内的文本内容的分段格式,例如:段前间距、首行缩进等格式,确定文本内容的分段位置,从而以该分段位置为界限进行段落划分。
如图3a和图3b所示,上述第六输入可以是对目标段落中的文本内容或者该目标段落的段落编号25的触控输入,响应于该第六输入,可以将所述目标段落划分为M个语句,并显示M个语句编号26,以通过语句编号26来标识M个语句。上述第二自然语言处理可以理解为:根据文本编辑界面内的文本内容的分句格式,例如:检测句号“。”和分号“;”的位置,从而以该句号或分号的位置为界限进行语句划分。
如图3b和图3c所示,上述第七输入可以是对目标语句中的文本内容或者该目标语句的语句编号26的触控输入,响应于该第七输入,可以将所述目标语句划分为L个分词,并在L个分词一一对应的显示区域内显示L个字符输入框控件27,以通过不同的显示区域来区分L个分词的字符输入框控件。上述第三自然语言处理可以理解为:对文本编辑界面内的文本内容进行语义识别,以将一个完整的语句拆分为至少两个分词,其中,每一个分词中可以包括1个或多个文字,或者分词还可以包括标点符号。
本实施方式,相较于根据用户触控该自然语言处理模式控件的次数,来实现自然语言处理模式的切换的实施方式而言,能够根据用户对段落、语句、分词的操作来精确的确定需要进行格式调整的文本内容。在文本编辑界面内包括大量文字内容的情况下,不需要显示每一个语句的语句编号或在每一个分词对应的显示区域内显示字符输入框控件,而是仅显示用户通过第六输入 所操作的目标段落中的语句的语句编号,或者仅显示用户通过第七输入所操作的目标语句中的分词对应的字符输入框控件,进而避免了用户难以从大量的语句编号或大量的分词对应的字符输入框控件中到需要进行格式调整的文本内容的问题。
进一步地,所述显示与所述至少两部分文本一一对应的字符输入框控件,包括:
在所述至少两部分文本包括L个分词的情况下,在L个分词对应的L个显示区域内显示L个字符输入框控件;
在所述至少两部分文本包括X个段落或语句的情况下,在所述X个段落或语句对应的X个显示区域内显示X个文本编号,并显示第二窗口,其中,所述第二窗口包括与所述X个文本编号对应的X个字符输入框控件,X为大于1的整数。
需要说明的是,上述L个分词对应的L个显示区域,可以理解为:每一个分词具有各自对应的显示区域,且该显示区域可以靠近其对应的分词显示,例如:如图3c所示,在分词的下侧,靠近该分词的显示区域显示该分词对应的字符输入框控件27。这样,可以使每一个分词与其对应的字符输入框控件对应显示,从而便于用户在大量的字符输入框控件中找到需要进行格式调整的分词对应的字符输入框控件。
另外,上述在所述X个段落或语句对应的X个显示区域内显示X个文本编号,并显示第二窗口,可以给通过自然语言处理后划分的每一个段落或语句分配一个编号,并在第二窗口中对每一个编号与其对应的字符输入框控件进行对应显示。这样,在需要对目标文字内容进行格式调整时,用户可以直观的识别该目标文字内容对应的编号,并从第二窗口中找到给编号对应的字符输入框控件,并在该字符输入框控件中输入目标字符,从而实现对目标文字内容的格式调整。
如图3a和图3b所示,本实施方式可以在不改变文本编辑界面20中文本内容的文本结构的基础上,将各个段落或语句对应的字符输入框控件211集 中显示在第二窗口21中,并通过段落编号或语句编号与字符输入框控件一一对应的方式,使用户明确的获知每一个段落或语句对应的字符输入框控件,从而在需要进行格式调整的段落或语句对应的字符输入框控件211中输入目标字符,进而实现准确的调整目标段落或目标语句的格式。
作为一种可选的实施方式,在所述目标文本内容为在接收所述目标字符之后输入的文本内容的情况下,所述方法还包括:
接收输入的目标起始符和目标终止符,所述目标文本内容位于所述目标起始符和所述目标终止符之间。
上述目标起始符和目标终止符可以是预设的特殊符号,例如:目标起始符为“<”,目标终止符为“/>”,这样,在文本编辑界面内进行文字编辑的过程中,若需要设置目标文本内容的格式,则可以在该目标文本内容之前插入“<”,在该目标文本内容之后插入“/>”,以界定出需要按照目标显示参数进行显示的目标文本内容,而对于未处于“<”和“/>”之间的文本内容,则可以按照默认的显示参数进行显示。
当然,在实际应用中,也可以先输入“<”和“/>”,然后在“<”和“/>”之间输入目标文本内容,或者,按照“<”、目标文本内容和“/>”的顺序进行依次输入,在此对“<”、目标文本内容和“/>”的输入时机不作具体限定。
本实施方式与上一可选实施方式的不同之处在于,上一可选实施方式中,需要对文本编辑界面内的文本内容进行自然语言处理,以将该文本内容划分为至少两个部分,并显示与所述至少两部分文本一一对应的字符输入框控件,然后通过在目标字符输入框控件中输入的目标字符,来实现将该目标字符输入框控件对应的部分文本确定为目标文本内容;而本实施方式中,直接在编辑文本内容的过程中输入目标起始符和目标终止符既可以选中需要进行格式调整的目标文本内容,从而能够进一步提升文本编辑过程的流畅性。
进一步地,上述目标字符也可以位于所述目标起始符和所述目标终止符之间,例如:在文本编辑界面内输入:<BIR4xxxxx/>,则将目标文本内容“xxxxx”按照目标字符BIR4对应的显示参数(即文字加粗、文字倾斜、红色字体、4 号字体)进行显示。
本实施方式中,鉴于目标字符和目标文本内容均位于目标起始符和目标终止符之间,为了避免将目标文本内容与目标字符中的字符混淆,还可以在目标字符和目标文本内容之间夹设一个或多个特殊字符,例如:一个符号“^”或两个空格符等,以通过识别该一个或多个特殊字符来实现目标文本内容与目标字符的区分,能够提升文本显示方法的可靠性。
当然,除了上述在目标起始符和目标终止符之间输入目标字符之外,上述目标字符也可以在其他显示区域或窗口中输入,例如:在通过述目标起始符和所述目标终止符界定目标文本内容的情况下,可以在悬浮显示的字符输入框控件中输入该目标字符,在此不作具体限定。
在实际应用中,还可能出现目标字符中包括至少两个相互冲突的字符的情况,例如:假设字符R与红色字体关联,且字符Y与黄色字体关联,若目标字符包括R和Y这两个与不同颜色字体关联的字母的情况下,则表示目标字符包括两个相互冲突的字符。此时,可以通过以下方式克服因目标字符包括两个相互冲突的字符,而造成的不能够准确的确定出目标显示参数的问题:
方式一
在目标字符包括至少两个相互冲突的字符的情况下,将所述至少两个相互冲突的字符中排列于首位的一个字符作为有效字符,并将所述至少两个相互冲突的字符中除了上述排列于首位的一个字符之外的其他字符作为无效字符,从而确定目标显示参数包括有效字符对应的显示参数。
方式二
在目标字符包括至少两个相互冲突的字符的情况下,输出提示信息,以提示用户重新输入目标字符,或删除目标字符中有冲突的字符。
需要说明的是,本申请实施例提供的文本显示方法,执行主体可以为文本显示装置,或者该文本显示装置中的用于执行文本显示方法的控制模块。本申请实施例中以文本显示装置执行加载文本显示方法为例,说明本申请实施例提供的文本显示装置。
请参阅图4,本申请实施例提供的一种文本显示装置400可以包括:
第一输入模块401,用于在显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符;
第一确定模块402,用于根据所述目标字符,确定与所述目标字符对应的目标显示参数;
第一显示模块403,用于按照所述目标显示参数显示目标文本内容,其中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。
可选的,文本显示装置400还包括:
第二输入模块,用于接收第二输入;
第二显示模块,用于响应于所述第二输入,显示第一设置界面;
第三输入模块,用于在所述第一设置界面内接收第三输入;
关联模块,用于响应于所述第三输入,将所述目标字符与所述目标显示参数进行关联。
可选的,在所述目标字符预先关联有至少两个备选显示参数的情况下,第一确定模块402,包括:
第一显示单元,用于响应于所述第一输入,显示第一窗口控件,其中,所述第一窗口控件包括与所述至少两个备选显示参数一一对应的功能选项;
第一输入单元,用于接收对目标功能选项的第四输入,其中,与所述至少两个备选显示参数一一对应的功能选项包括所述目标功能选项;
第一确定单元,用于响应于所述第四输入,将与所述目标功能选项对应的备选显示参数确定为目标显示参数。
可选的,文本显示装置400还包括:
第一处理模块,用于对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本;
第三显示模块,用于显示与所述至少两部分文本一一对应的字符输入框控件;
其中,所述第一输入用于在目标字符输入框控件中输入所述目标字符,所述目标文本内容包括所述目标字符输入框控件对应的部分文本,与所述至少两部分文本一一对应的字符输入框控件包括所述目标字符输入框控件。
可选的,所述至少两部分文本包括:至少两个段落、至少两个语句或者至少两个分词。
可选的,所述第一处理模块,包括:
第二显示单元,用于显示自然语言处理模式控件;
第二输入单元,用于接收对所述自然语言处理模式控件的第五输入;
第一处理单元,用于响应于所述第五输入,对所述文本编辑界面内的文本进行第一自然语言处理,以将所述文本编辑界面内的文本划分为N个段落,N为大于1的整数;
在所述至少两部分文本包括至少两个语句的情况下,文本显示装置400还包括:
第四输入模块,用于接收对目标段落的第六输入,其中,所述N个段落包括所述目标段落;
第二处理模块,用于响应于所述第六输入,对所述目标段落进行第二自然语言处理,以将所述目标段落划分为M个语句,M为大于1的整数;
在所述至少两部分文本包括至少两个分词的情况下,文本显示装置400还包括:
第五输入模块,用于接收对目标语句的第七输入,其中,所述M个语句包括所述目标语句;
第三处理模块,用于响应于所述第七输入,对所述目标语句进行第三自然语言处理,以将所述目标语句划分为L个分词,L为大于1的整数。
可选的,所述第三显示模块具体用于:
在所述至少两部分文本包括L个分词的情况下,在L个分词对应的L个显示区域内显示L个字符输入框控件;
在所述至少两部分文本包括X个段落或语句的情况下,在所述X个段落 或语句对应的X个显示区域内显示X个文本编号,并显示第二窗口,其中,所述第二窗口包括与所述X个文本编号对应的X个字符输入框控件,X为大于1的整数。
可选的,在所述目标文本内容为在接收所述目标字符之后输入的文本内容的情况下,文本显示装置400还包括:
第六输入模块,用于接收输入的目标起始符和目标终止符,所述目标文本内容位于所述目标起始符和所述目标终止符之间。
本申请实施例中的文本显示装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的文本显示装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
本申请实施例提供的文本显示装置能够实现图1所示方法实施例实现的各个过程,且能够取得相同的有益效果,为避免重复,这里不再赘述。
可选的,如图5所示,本申请实施例还提供一种电子设备500,包括处理器501,存储器502,存储在存储器502上并可在所述处理器501上运行的程序或指令,该程序或指令被处理器501执行时实现上述文本显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。
图6为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备600包括但不限于:射频单元601、网络模块602、音频输出单元603、输入单元604、传感器605、显示单元606、用户输入单元607、接口单元608、存储器609、以及处理器610等部件。
本领域技术人员可以理解,电子设备600还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图6中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
其中,用户输入单元607,用于在显示单元606显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符;
处理器610,用于根据所述目标字符,确定与所述目标字符对应的目标显示参数;
显示单元606,还用于按照所述目标显示参数显示目标文本内容,其中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。
可选地,用户输入单元607在执行所述接收第一输入之前,还用于接收第二输入;
显示单元606,还用于响应于所述第二输入,显示第一设置界面;
用户输入单元607,还用于在所述第一设置界面内接收第三输入;
处理器610,还用于响应于所述第三输入,将所述目标字符与所述目标显示参数进行关联。
可选地,在所述目标字符预先关联有至少两个备选显示参数的情况下,处理器610执行的所述根据所述目标字符,确定与所述目标字符对应的目标显示参数,包括:
显示单元606,用于响应于所述第一输入,显示第一窗口控件,其中,所述第一窗口控件包括与所述至少两个备选显示参数一一对应的功能选项;
用户输入单元607,用于接收对目标功能选项的第四输入,其中,与所 述至少两个备选显示参数一一对应的功能选项包括所述目标功能选项;
处理器610,用于响应于所述第四输入,将与所述目标功能选项对应的备选显示参数确定为目标显示参数。
可选地,用户输入单元607在执行所述接收第一输入之前:
处理器610,还用于对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本;
显示单元606,还用于显示与所述至少两部分文本一一对应的字符输入框控件;
其中,所述第一输入用于在目标字符输入框控件中输入所述目标字符,所述目标文本内容包括所述目标字符输入框控件对应的部分文本,与所述至少两部分文本一一对应的字符输入框控件包括所述目标字符输入框控件。
可选地,所述至少两部分文本包括:至少两个段落、至少两个语句或者至少两个分词。
可选地,处理器610执行的所述对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本,包括:
显示单元606,用于显示自然语言处理模式控件;
用户输入单元607,用于接收对所述自然语言处理模式控件的第五输入;
处理器610,用于响应于所述第五输入,对所述文本编辑界面内的文本进行第一自然语言处理,以将所述文本编辑界面内的文本划分为N个段落,N为大于1的整数;
在所述至少两部分文本包括至少两个语句的情况下:
用户输入单元607,还用于接收对目标段落的第六输入,其中,所述N个段落包括所述目标段落;
处理器610,还用于响应于所述第六输入,对所述目标段落进行第二自然语言处理,以将所述目标段落划分为M个语句,M为大于1的整数;
在所述至少两部分文本包括至少两个分词的情况下:
用户输入单元607,还用于接收对目标语句的第七输入,其中,所述M 个语句包括所述目标语句;
处理器610,还用于响应于所述第七输入,对所述目标语句进行第三自然语言处理,以将所述目标语句划分为L个分词,L为大于1的整数。
可选地,显示单元606执行的所述显示与所述至少两部分文本一一对应的字符输入框控件,包括:
在所述至少两部分文本包括L个分词的情况下,显示单元606用于在L个分词对应的L个显示区域内显示L个字符输入框控件;
在所述至少两部分文本包括X个段落或语句的情况下,显示单元606用于在所述X个段落或语句对应的X个显示区域内显示X个文本编号,并显示第二窗口,其中,所述第二窗口包括与所述X个文本编号对应的X个字符输入框控件,X为大于1的整数。
可选地,在所述目标文本内容为在接收所述目标字符之后输入的文本内容的情况下,用户输入单元607还用于接收输入的目标起始符和目标终止符,所述目标文本内容位于所述目标起始符和所述目标终止符之间。
本申请实施例提供的电子设备能够执行如图1所示方法实施例的各个步骤,且能够取得与如图1所示方法实施例相同的有益效果,为避免重复,在此不再赘述。
应理解的是,本申请实施例中,输入单元604可以包括图形处理器(Graphics Processing Unit,GPU)和麦克风,图形处理器对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元606可包括显示面板,可以采用液晶显示器、有机发光二极管等形式来配置显示面板。用户输入单元607包括触控面板以及其他输入设备。触控面板,也称为触摸屏。触控面板可包括触摸检测装置和触摸控制器两个部分。其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器609可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器610可集成应用处理器和调制解调处理器,其中,应用处理器 主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述文本显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述文本显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述 实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (19)

  1. 一种文本显示方法,包括:
    在显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符;
    根据所述目标字符,确定与所述目标字符对应的目标显示参数;
    按照所述目标显示参数显示目标文本内容,其中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。
  2. 根据权利要求1所述的方法,其中,在所述接收第一输入之前,所述方法还包括:
    接收第二输入;
    响应于所述第二输入,显示第一设置界面;
    在所述第一设置界面内接收第三输入;
    响应于所述第三输入,将所述目标字符与所述目标显示参数进行关联。
  3. 根据权利要求1所述的方法,其中,在所述目标字符预先关联有至少两个备选显示参数的情况下,所述根据所述目标字符,确定与所述目标字符对应的目标显示参数,包括:
    响应于所述第一输入,显示第一窗口控件,其中,所述第一窗口控件包括与所述至少两个备选显示参数一一对应的功能选项;
    接收对目标功能选项的第四输入,其中,与所述至少两个备选显示参数一一对应的功能选项包括所述目标功能选项;
    响应于所述第四输入,将与所述目标功能选项对应的备选显示参数确定为目标显示参数。
  4. 根据权利要求1至3中任一项所述的方法,其中,在所述接收第一输入之前,所述方法还包括:
    对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本;
    显示与所述至少两部分文本一一对应的字符输入框控件;
    其中,所述第一输入用于在目标字符输入框控件中输入所述目标字符,所述目标文本内容包括所述目标字符输入框控件对应的部分文本,与所述至少两部分文本一一对应的字符输入框控件包括所述目标字符输入框控件。
  5. 根据权利要求4所述的方法,其中,所述至少两部分文本包括:至少两个段落、至少两个语句或者至少两个分词。
  6. 根据权利要求4所述的方法,其中,所述对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本,包括:
    显示自然语言处理模式控件;
    接收对所述自然语言处理模式控件的第五输入;
    响应于所述第五输入,对所述文本编辑界面内的文本进行第一自然语言处理,以将所述文本编辑界面内的文本划分为N个段落,N为大于1的整数;
    在所述至少两部分文本包括至少两个语句的情况下,所述方法还包括:
    接收对目标段落的第六输入,其中,所述N个段落包括所述目标段落;
    响应于所述第六输入,对所述目标段落进行第二自然语言处理,以将所述目标段落划分为M个语句,M为大于1的整数;
    在所述至少两部分文本包括至少两个分词的情况下,所述方法还包括:
    接收对目标语句的第七输入,其中,所述M个语句包括所述目标语句;
    响应于所述第七输入,对所述目标语句进行第三自然语言处理,以将所述目标语句划分为L个分词,L为大于1的整数。
  7. 根据权利要求5所述的方法,其中,所述显示与所述至少两部分文本一一对应的字符输入框控件,包括:
    在所述至少两部分文本包括L个分词的情况下,在L个分词对应的L个显示区域内显示L个字符输入框控件;
    在所述至少两部分文本包括X个段落或语句的情况下,在所述X个段落或语句对应的X个显示区域内显示X个文本编号,并显示第二窗口,其中,所述第二窗口包括与所述X个文本编号对应的X个字符输入框控件,X为大于1的整数。
  8. 一种文本显示装置,包括:
    第一输入模块,用于在显示文本编辑界面的情况下,接收第一输入,所述第一输入用于输入目标字符;
    第一确定模块,用于根据所述目标字符,确定与所述目标字符对应的目标显示参数;
    第一显示模块,用于按照所述目标显示参数显示目标文本内容,其中,所述目标文本内容为在接收所述目标字符之后输入的文本内容,或者在接收所述目标字符之前选中的文本内容。
  9. 根据权利要求8所述的装置,其中,还包括:
    第二输入模块,用于接收第二输入;
    第二显示模块,用于响应于所述第二输入,显示第一设置界面;
    第三输入模块,用于在所述第一设置界面内接收第三输入;
    关联模块,用于响应于所述第三输入,将所述目标字符与所述目标显示参数进行关联。
  10. 根据权利要求8所述的装置,其中,在所述目标字符预先关联有至少两个备选显示参数的情况下,所述第一确定模块,包括:
    第一显示单元,用于响应于所述第一输入,显示第一窗口控件,其中,所述第一窗口控件包括与所述至少两个备选显示参数一一对应的功能选项;
    第一输入单元,用于接收对目标功能选项的第四输入,其中,与所述至少两个备选显示参数一一对应的功能选项包括所述目标功能选项;
    第一确定单元,用于响应于所述第四输入,将与所述目标功能选项对应的备选显示参数确定为目标显示参数。
  11. 根据权利要求8至10中任一项所述的装置,其中,还包括:
    第一处理模块,用于对所述文本编辑界面内的文本进行自然语言处理,以将所述文本编辑界面内的文本划分为至少两部分文本;
    第三显示模块,用于显示与所述至少两部分文本一一对应的字符输入框控件;
    其中,所述第一输入用于在目标字符输入框控件中输入所述目标字符,所述目标文本内容包括所述目标字符输入框控件对应的部分文本,与所述至少两部分文本一一对应的字符输入框控件包括所述目标字符输入框控件。
  12. 根据权利要求11所述的装置,其中,所述至少两部分文本包括:至少两个段落、至少两个语句或者至少两个分词。
  13. 根据权利要求11所述的装置,其中,所述第一处理模块,包括:
    第二显示单元,用于显示自然语言处理模式控件;
    第二输入单元,用于接收对所述自然语言处理模式控件的第五输入;
    第一处理单元,用于响应于所述第五输入,对所述文本编辑界面内的文本进行第一自然语言处理,以将所述文本编辑界面内的文本划分为N个段落,N为大于1的整数;
    在所述至少两部分文本包括至少两个语句的情况下,所述装置还包括:
    第四输入模块,用于接收对目标段落的第六输入,其中,所述N个段落包括所述目标段落;
    第二处理模块,用于响应于所述第六输入,对所述目标段落进行第二自然语言处理,以将所述目标段落划分为M个语句,M为大于1的整数;
    在所述至少两部分文本包括至少两个分词的情况下,所述装置还包括:
    第五输入模块,用于接收对目标语句的第七输入,其中,所述M个语句包括所述目标语句;
    第三处理模块,用于响应于所述第七输入,对所述目标语句进行第三自然语言处理,以将所述目标语句划分为L个分词,L为大于1的整数。
  14. 根据权利要求12所述的装置,其中,所述第三显示模块,具体用于:
    在所述至少两部分文本包括L个分词的情况下,在L个分词对应的L个显示区域内显示L个字符输入框控件;
    在所述至少两部分文本包括X个段落或语句的情况下,在所述X个段落或语句对应的X个显示区域内显示X个文本编号,并显示第二窗口,其中,所述第二窗口包括与所述X个文本编号对应的X个字符输入框控件,X为大于1的整数。
  15. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至7中任一项所述的文本显示方法的步骤。
  16. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序 或指令被处理器执行时实现如权利要求1至7中任一项所述的文本显示方法的步骤。
  17. 一种芯片,包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至7中任一项所述的文本显示方法的步骤。
  18. 一种计算机程序产品,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1至7中任一项所述的文本显示方法的步骤。
  19. 一种电子设备,被配置为实现如权利要求1至7中任一项所述的文本显示方法的步骤。
PCT/CN2022/119901 2021-09-24 2022-09-20 文本显示方法和文本显示装置 WO2023045920A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22871966.2A EP4407507A1 (en) 2021-09-24 2022-09-20 Text display method and text display apparatus
US18/607,502 US20240220090A1 (en) 2021-09-24 2024-03-17 Text display method and text display apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111120215.3A CN113807058A (zh) 2021-09-24 2021-09-24 文本显示方法和文本显示装置
CN202111120215.3 2021-09-24

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/607,502 Continuation US20240220090A1 (en) 2021-09-24 2024-03-17 Text display method and text display apparatus

Publications (1)

Publication Number Publication Date
WO2023045920A1 true WO2023045920A1 (zh) 2023-03-30

Family

ID=78940220

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/119901 WO2023045920A1 (zh) 2021-09-24 2022-09-20 文本显示方法和文本显示装置

Country Status (4)

Country Link
US (1) US20240220090A1 (zh)
EP (1) EP4407507A1 (zh)
CN (1) CN113807058A (zh)
WO (1) WO2023045920A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113807058A (zh) * 2021-09-24 2021-12-17 维沃移动通信有限公司 文本显示方法和文本显示装置
CN114415887A (zh) * 2022-01-07 2022-04-29 维沃移动通信有限公司 文档内容处理方法与装置

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272666A (ja) * 1998-03-20 1999-10-08 Fujitsu Ltd 文書編集システム、方法、及び記録媒体
US20030110441A1 (en) * 2001-09-06 2003-06-12 Hideyuki Tsukuda Character input apparatus and tape printing apparatus incorporating the same as well as character input method
JP2004021587A (ja) * 2002-06-17 2004-01-22 Matsushita Electric Ind Co Ltd テキスト修飾データ付きのテキストの表示方法
US20120262488A1 (en) * 2009-12-23 2012-10-18 Nokia Corporation Method and Apparatus for Facilitating Text Editing and Related Computer Program Product and Computer Readable Medium
CN106030567A (zh) * 2013-12-16 2016-10-12 微软技术许可有限责任公司 基于部分的文档组件的重组
CN111857503A (zh) * 2020-07-14 2020-10-30 维沃移动通信有限公司 显示方法、显示装置及电子设备
CN111985183A (zh) * 2020-07-14 2020-11-24 维沃移动通信有限公司 文字输入方法、装置及电子设备
CN112612450A (zh) * 2020-12-18 2021-04-06 平安普惠企业管理有限公司 一种文本输入框的实现方法、装置、终端以及存储介质
CN113807058A (zh) * 2021-09-24 2021-12-17 维沃移动通信有限公司 文本显示方法和文本显示装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7320111B2 (en) * 2004-12-01 2008-01-15 Oded Volovitz Method for assigning large sets of characters in different modes to keys of a number keypad for low keypress-data-entry ratio
JP2012088969A (ja) * 2010-10-20 2012-05-10 Sharp Corp 入力表示装置、入力表示方法、コンピュータプログラム及び記録媒体
CN103927292B (zh) * 2014-03-17 2017-06-27 联想(北京)有限公司 一种设置字符样式的方法和装置
CN110909524B (zh) * 2019-11-27 2023-12-26 维沃移动通信有限公司 一种编辑方法及电子设备

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272666A (ja) * 1998-03-20 1999-10-08 Fujitsu Ltd 文書編集システム、方法、及び記録媒体
US20030110441A1 (en) * 2001-09-06 2003-06-12 Hideyuki Tsukuda Character input apparatus and tape printing apparatus incorporating the same as well as character input method
JP2004021587A (ja) * 2002-06-17 2004-01-22 Matsushita Electric Ind Co Ltd テキスト修飾データ付きのテキストの表示方法
US20120262488A1 (en) * 2009-12-23 2012-10-18 Nokia Corporation Method and Apparatus for Facilitating Text Editing and Related Computer Program Product and Computer Readable Medium
CN106030567A (zh) * 2013-12-16 2016-10-12 微软技术许可有限责任公司 基于部分的文档组件的重组
CN111857503A (zh) * 2020-07-14 2020-10-30 维沃移动通信有限公司 显示方法、显示装置及电子设备
CN111985183A (zh) * 2020-07-14 2020-11-24 维沃移动通信有限公司 文字输入方法、装置及电子设备
CN112612450A (zh) * 2020-12-18 2021-04-06 平安普惠企业管理有限公司 一种文本输入框的实现方法、装置、终端以及存储介质
CN113807058A (zh) * 2021-09-24 2021-12-17 维沃移动通信有限公司 文本显示方法和文本显示装置

Also Published As

Publication number Publication date
US20240220090A1 (en) 2024-07-04
CN113807058A (zh) 2021-12-17
EP4407507A1 (en) 2024-07-31

Similar Documents

Publication Publication Date Title
CN114564113B (zh) 电子设备上的手写输入
WO2023045920A1 (zh) 文本显示方法和文本显示装置
EP2618248B1 (en) Virtual keyboard providing an indication of received input
KR101639074B1 (ko) 터치스크린을 이용한 문자 인식 및 문자 입력 장치 및 그 방법
US20140351760A1 (en) Order-independent text input
US20110037775A1 (en) Method and apparatus for character input using touch screen in a portable terminal
CN102375656B (zh) 基于触摸屏的全拼单字滑动输入法、装置及触摸屏终端
US8952897B2 (en) Single page soft input panels for larger character sets
EP3002664A1 (en) Text processing method and touchscreen device
CN102902471B (zh) 一种输入界面的切换方法以及装置
TW200305099A (en) Entering text into an electronic communications device
US20130169555A1 (en) Display apparatus and image representation method using the same
WO2023045923A1 (zh) 文字编辑方法、装置和电子设备
WO2022247789A1 (zh) 候选词更新方法、装置和电子设备
JP2013003803A (ja) 文字入力装置、文字入力装置の制御方法、制御プログラム、及び記録媒体
CN111930245A (zh) 字符输入控制方法、装置及电子设备
US20140331160A1 (en) Apparatus and method for generating message in portable terminal
CN104699409A (zh) 一种触摸屏移动终端信息输入的方法及系统
WO2023125155A1 (zh) 输入方法及输入装置
CN111857503A (zh) 显示方法、显示装置及电子设备
WO2023093590A1 (zh) 显示控制方法、装置、电子设备及介质
WO2022143523A1 (zh) 词汇显示方法、装置和电子设备
WO2022247718A1 (zh) 信息选取方法及装置
WO2022247814A1 (zh) 目标字符的选择方法、装置、电子设备及存储介质
US20160062633A1 (en) Method of providing user interface and recording medium and character input device comprising the same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22871966

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022871966

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2022871966

Country of ref document: EP

Effective date: 20240424