WO2022179329A1 - Text processing method and apparatus, and electronic device and storage medium - Google Patents

Text processing method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2022179329A1
WO2022179329A1 PCT/CN2022/071644 CN2022071644W WO2022179329A1 WO 2022179329 A1 WO2022179329 A1 WO 2022179329A1 CN 2022071644 W CN2022071644 W CN 2022071644W WO 2022179329 A1 WO2022179329 A1 WO 2022179329A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
text
touch operation
conversion
touch
Prior art date
Application number
PCT/CN2022/071644
Other languages
French (fr)
Chinese (zh)
Other versions
WO2022179329A9 (en
WO2022179329A8 (en
Inventor
秦小龙
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022179329A1 publication Critical patent/WO2022179329A1/en
Publication of WO2022179329A9 publication Critical patent/WO2022179329A9/en
Publication of WO2022179329A8 publication Critical patent/WO2022179329A8/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/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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Definitions

  • the present application relates to the field of computer technology, and more particularly, to a text processing method, apparatus, electronic device, and storage medium.
  • the present application proposes a text processing method, apparatus, electronic device and storage medium to improve the above problems.
  • the present application provides a text processing method, which is applied to an electronic device.
  • the method includes: displaying a second interface on top of a first interface, wherein the second interface includes a method for processing a second interface in the first interface.
  • a second text obtained by converting a text; if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is changed from the touch removed at the control position; operate the first interface based on the touch operation.
  • the present application provides a text processing device, which runs on an electronic device, the device includes: an interface display unit configured to display a second interface in layers on the first interface, wherein the second interface includes a pair of The second text obtained by converting the first text in the first interface; the interface closing unit is used for detecting a touch operation acting on the screen, and the action position of the touch operation is located on the second interface inside, the second interface is removed from the touch position; an interface control unit is configured to operate the first interface based on the touch operation.
  • the present application provides an electronic device including a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above method.
  • the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, wherein the above-mentioned method is executed when the program code is executed by a processor.
  • FIG. 1 shows a schematic diagram of an application scenario of a text processing method proposed by an embodiment of the present application
  • FIG. 2 shows a flowchart of a text processing method proposed by an embodiment of the present application
  • FIG. 3 shows a schematic diagram of a first interface and a second interface in a text processing method proposed by an embodiment of the present application
  • FIG. 4 shows a schematic diagram of a suspended display toolbar in a text processing method proposed by an embodiment of the present application
  • FIG. 5 shows a schematic diagram of another toolbar displayed in suspension in a text processing method proposed by an embodiment of the present application
  • FIG. 6 shows a schematic diagram of a selector in an embodiment of the present application
  • FIG. 7 shows a reduced schematic diagram of a toolbar displayed in suspension in a text processing method proposed by an embodiment of the present application
  • FIG. 8 shows a schematic diagram of calling out a floating toolbar in a text processing method proposed by an embodiment of the present application
  • FIG. 9 shows a schematic diagram of a status bar in an embodiment of the present application.
  • Fig. 10 shows the schematic diagram of the text conversion state identification in the status bar in the embodiment of the present application.
  • FIG. 11 shows a schematic diagram of another status bar in an embodiment of the present application.
  • FIG. 12 shows a flowchart of another text processing method proposed by an embodiment of the present application.
  • FIG. 13 is a schematic diagram showing the effect of the touch operation acting on the second interface proposed in the embodiment of the present application.
  • FIG. 14 shows a schematic diagram of dividing a screen into multiple areas in an embodiment of the present application
  • FIG. 15 shows a schematic diagram of displaying a third text in an embodiment of the present application.
  • FIG. 16 shows a schematic diagram of reducing the second interface in an embodiment of the present application.
  • FIG. 17 shows a structural block diagram of a text processing apparatus proposed by another embodiment of the present application.
  • FIG. 18 shows a structural block diagram of a text processing apparatus proposed by still another embodiment of the present application.
  • FIG. 19 shows a structural block diagram of an electronic device of the present application for executing the text processing method according to an embodiment of the present application
  • FIG. 20 is a storage unit for storing or carrying a program code for implementing a text processing method according to an embodiment of the present application according to an embodiment of the present application.
  • the inventor proposes a text processing method, device, electronic device and storage medium that can improve the above problems in the present application.
  • the second text is converted into It is displayed in the second interface stacked on the first interface, and if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is Remove from the touch position, and operate the first interface based on the touch operation. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation.
  • An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.
  • the method provided in this embodiment may further include the following process: canceling the display of the second interface.
  • the method provided in this embodiment may further include the following process: converting the third text in the first interface after the sliding operation is performed to obtain the fourth text; on the first interface A second interface is displayed in layers, and the fourth text is displayed in the second interface.
  • the method provided in this embodiment may further include the following process: obtaining the size of the third text; transforming the font size of the fourth text based on the size to obtain the fourth text after the font transformation ; Display the second interface in layers on the first interface, and display the fourth text after the font transformation in the second interface.
  • the method provided in this embodiment may further include the following process: after detecting a touch operation, acquiring an area matching the action position of the touch operation as a target area; using the target area corresponding to The conversion mode is determined as the conversion mode corresponding to the touch operation.
  • the method provided in this embodiment may further include the following process: reducing the size of the second interface, so that the second interface is removed from the touch position.
  • the method provided in this embodiment may further include the following process: converting the third text in the first interface after the sliding operation is performed to obtain the fourth text; converting the text in the second interface The size is restored to the state before the reduction, and the fourth text is displayed in the second interface.
  • the method provided in this embodiment may further include the following process: obtaining the density of the text in the first interface; if the density of the text in the first interface is greater than a density threshold, pass The second interface is removed from the touch position by canceling the display of the second interface; if the density of the text in the first interface is not greater than the density threshold, reducing the The size of the second interface is used to remove the second interface from the touch position.
  • the method provided in this embodiment may further include the following process: comparing the number of texts currently displayed in the first interface with the area of the first interface, to obtain the number of texts in the first interface. the density of the text.
  • the method provided in this embodiment may further include the following process: floating a toolbar at a specified position, and the toolbar includes a first trigger identifier; if a first trigger is detected that acts on the first trigger The touch operation of the logo enters the first text conversion mode.
  • the method provided in this embodiment may further include the following process: if no touch operation acting on the toolbar is detected within a specified period of time, hiding the toolbar or The toolbar is reduced.
  • the toolbar further includes a second trigger, a third trigger, and a fourth trigger; the second trigger is used to trigger entering the second conversion mode; the third trigger is An identifier for marking the current interface; the fourth trigger identifier is an identifier for calling the corresponding application program to start.
  • the method provided in this embodiment may further include the following process: if the fourth trigger mark is set in the toolbar displayed in the floating display, directly operating the fourth trigger mark to trigger another application program to start.
  • the method provided in this embodiment may further include the following process: if a touch operation acting on the first trigger mark is detected, a status bar in the first state is displayed, and the state bar in the first state is displayed.
  • the status bar of the state includes a text conversion state identifier, a text conversion selection control, and a control for exiting the first text conversion mode.
  • the text conversion status flag is used to represent whether there is currently text being converted; the text conversion selection control is used to select the original language of the text to be converted and the conversion target language.
  • the method provided in this embodiment may further include the following process: if there is no operation acting on the status bar within a specified period of time, the status bar is switched to be in a second state, and the second state
  • the status bar of the status includes the text transition status identifier.
  • the conversion includes at least one of the following processing methods: performing language translation on the text; switching the font style of the text; and switching the font size of the text.
  • the text processing method provided by the embodiments of the present application may be executed in electronic devices such as mobile phones and tablet computers, and may also be cooperatively executed by the electronic device and the server.
  • the server can be a single physical server, or a server cluster or distributed system composed of multiple physical servers, and can also provide cloud services, cloud computing, cloud storage, CDN (Content Delivery Network, Content Delivery Network), And cloud servers for basic cloud computing services such as artificial intelligence platforms.
  • a second interface is displayed in layers on the first interface, and in the second interface It includes the second text obtained by converting the first text in the first interface; if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the The second interface is removed from the touch position; steps such as operating the first interface based on the touch operation can be completed by the client 110 in the electronic device, and the other steps of the first text
  • the conversion to obtain the second text may be performed by the client 110 in the electronic device, and may also be performed by the server 120 .
  • a text processing method provided by an embodiment of the present application is applied to an electronic device, and the method includes:
  • S110 Display a second interface on top of the first interface, where the second interface includes second text obtained by converting the first text in the first interface.
  • the first interface may be the interface currently displayed in the foreground, and the text displayed in the first interface is the original text, and the original text may be understood as the text before the conversion.
  • the second interface is an interface for displaying the converted text.
  • the second interface may be a web page (eg, an html page), an application program interface (eg, an Activity interface), or a picture.
  • the first text may be all the texts currently visible in the first interface
  • the second text is the text obtained by converting the first text.
  • the first interface 11 is shown in FIG. 3
  • the second interface 12 stacked on the first interface 11 in the image on the right, there is a display of the first interface 11 .
  • the arrangement format of the converted second text is the same as the arrangement format of the corresponding first text.
  • the electronic device may convert the text in the first interface after entering the first conversion mode, and in this embodiment, there may be multiple ways to trigger entering the conversion of the text in the first interface The first text conversion mode.
  • the entry of the first text conversion mode may be triggered by displaying the toolbar in a floating manner. Then in this way, before displaying the second interface in layers on the first interface, it may further include: floating a toolbar at a specified position, and the toolbar includes a first trigger identifier; if it is detected that it has an effect on The touch operation of the first trigger mark enters the first text conversion mode.
  • a first trigger logo 14 is displayed in the toolbar 13 of the floating display shown in FIG. 4 .
  • the first text conversion mode can be entered.
  • the name of the first trigger mark 14 is “full-screen translation”, then when entering the first text conversion mode, all texts in the first interface can be converted, and the conversion in the mode shown in FIG. text for translation.
  • the display of the toolbar 13 can be canceled synchronously, so as not to interfere with the user's subsequent reading.
  • the toolbar shown in FIG. 4 may include more trigger identifiers in addition to the first trigger identifier shown in FIG. 4 .
  • it can also include a second trigger mark, a third trigger mark and a fourth trigger mark, wherein the second trigger mark can be triggered to enter the second conversion mode, and a selector can be displayed in the second conversion mode. , the user can select part of the text from the first interface for conversion through the selector.
  • the third trigger identifier is an identifier for marking the current interface. Marking the current interface can be understood as storing the current interface separately, so that the current interface can be directly called for display without first triggering the application program to which the current interface belongs to start.
  • the current interface can be the friend details interface corresponding to application A, then the usual process of starting the friend details interface is to click the icon of application A on the desktop to trigger application A to start, and display the friend list interface after application A is started , and then select it in the friend list interface to trigger the friend details interface.
  • the friend details interface can be called directly from outside of application A for display, and it is no longer necessary to trigger the display of the friend list interface first, and then you can Shorten the operation path for calling out the specified interface.
  • the fourth trigger identifier may be an identifier for invoking the startup of the corresponding application program. In the case where a fourth trigger mark is set in the toolbar displayed in the floating display, another application program can be started without exiting from the current interface to the desktop, but another application program can be triggered by directly operating the fourth trigger mark. start up.
  • the identifier 15 named “free translation” is a second trigger identifier, and entering the second conversion mode can be triggered by triggering the identifier 15 named “free translation”.
  • a selector 18 may be displayed and may be moved in response to a user's drag operation, for example, as shown by the position shown in the left image in FIG. 6 Drag to the position shown in the image on the right.
  • the identifier 16 named "Newly Created Note” is a third trigger marker, and by triggering the marker 16 named "Newly created note", the current interface can be stored separately in order to achieve the aforementioned The effect of the quick recall.
  • the identifier 17 named "navigation” is a fourth trigger identifier. If a touch operation acting on the identifier 17 named "navigation" is detected, the startup of the navigation application can be directly invoked.
  • the toolbar may be hidden or reduced.
  • the toolbar can be reduced to the state shown in FIG. 7 , and the reduced toolbar can be displayed as The strip 17 in FIG. 7, and the strip 17 may be located at the border of the display screen.
  • the user can drag the bar 17 for a specified distance in the direction indicated by the dashed arrow in FIG. 8, and the floating toolbar can be called up again. After that, the bar 17 will be undisplayed.
  • the toolbar can be reduced to the state of the bar 17 shown in FIG. 7 .
  • the display and cancellation of the selector can also be controlled through the shortcut tool interface of the electronic device itself.
  • the display of the shortcut tool interface may be triggered by performing a sliding operation from the top of the display screen toward the bottom of the screen, and the management control with the selector may be displayed in the shortcut tool interface. Then in the case where the selector has not been displayed, if a touch operation acting on the management control is detected, the selector can be called up.
  • the selector has The touch operation of the management control can cancel the display of the selector.
  • the display selector can also be triggered by means of voice control.
  • the selector can be triggered to call up.
  • the specified voice content may be text conversion, or may be text translation, or the like.
  • the specified voice content may be set by the user according to his own habits. In this way, the selector can be controlled to cancel the display through the aforementioned method, or the selector can be canceled from the display by continuing to use the voice assistant.
  • a status bar may also be displayed after entering the first conversion mode. Then optionally, if a touch operation that acts on the first trigger mark is detected, a status bar in the first state is displayed, and the status bar in the first state includes the text conversion status mark, the text conversion status A selection control and a control for exiting the first text conversion mode.
  • the text conversion status flag is used to represent whether there is currently text being converted.
  • the text conversion selection control can be used to select the original language of the text to be converted and the target language to be converted.
  • the status bar 20 in the first state is displayed.
  • the status bar 20 in the first state includes a text conversion state identifier 21, a text conversion selection control 22, and a control 23 for exiting the first text conversion mode.
  • the text conversion status indicator 21 can be displayed in the style shown in the image on the left in FIG. 10 , if the translation has been completed currently, then the text conversion The status indicator 21 may be displayed in the style shown in the image on the right in FIG. 10 .
  • the status bar in the first state indicated above there will be more controls or logos displayed, resulting in the status bar in the first state occupying a certain area, and the more area the status bar occupies. , then it will have a greater impact on the user's reading experience.
  • the status bar is switched to be in a second state, and the status bar of the second state includes the text conversion state identifier .
  • the status bar 20 in the second state only the text conversion state indicator 21 is displayed, and the text conversion selection control and the control for exiting the first text conversion mode may no longer be displayed. .
  • the status bar After the status bar is in the second state, it can be switched to the first state in response to a click operation acting on the status bar.
  • removing the second interface from the touch position can enable the touch operation to directly act on the first interface.
  • the cancellation of the display of the second interface can be directly triggered, and furthermore, the size of the second interface can also be reduced, so that the reduced second interface and the touch position no longer overlap, so as to realize the display of the second interface. Remove from touch location.
  • touch operations There are various types of touch operations. For example, a pressing operation or a sliding operation or the like. Then, the operation on the first interface based on the touch operation can be understood as performing the touch operation on the first interface.
  • the conversion includes at least one of the following processing manners: performing language translation on the text; switching the font style of the text; and switching the font size of the text.
  • the language translation may include translating texts in any one language into texts in another language. For example, English texts may be translated into Chinese texts, and Chinese texts may also be translated into English texts.
  • Switching the font style of the text can be understood as switching the font of the text itself. For example, it is possible to switch the text in the Song typeface to the text in the italics, and for another example, switch the text in the traditional type to the text in the simplified type.
  • the second text is displayed in the second interface stacked on the first interface, and If a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is removed from the touch position, based on the touch The operation operates on the first interface. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation.
  • An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.
  • a text processing method provided by an embodiment of the present application is applied to an electronic device, and the method includes:
  • S210 Display a second interface in layers on the first interface, where the second interface includes second text obtained by converting the first text in the first interface.
  • the third text may be understood as the text currently displayed in the first interface after the sliding operation is performed in the first interface.
  • the first text displayed in the first interface 11 in the left image of FIG. 13 is displayed in the middle image of FIG.
  • the second interface 12 for displaying the second text obtained by converting the first text in the .
  • the display of the second interface 12 will be canceled as shown in the right image of FIG. 13
  • the sliding operation in the direction indicated by the dotted arrow will be performed on the first interface synchronously, and then the text currently displayed in the first interface will be updated.
  • the text in the area 22 in the first interface in the left image of FIG. 13 will move to the position in the first interface in the right image of FIG. 13 with the action of the sliding operation, and then New content is displayed in the first interface, and the text in the first interface is updated. Then in this case, the text in the area 22 and the new content constitute the third text in the first interface.
  • the new content may be plain text or text displayed in a picture.
  • the conversion method shown in this embodiment is to translate text.
  • the conversion method in this embodiment may also have other conversion methods.
  • the conversion method It can also include toggling the font style of the text and toggling the font size of the text.
  • the electronic device can determine the conversion mode to be adopted at the current time according to the different operation modes of the user.
  • the electronic device may determine the corresponding conversion mode according to the region where the user's touch operation is located.
  • the electronic device may divide the screen into multiple regions, and the respective conversion modes corresponding to the multiple regions are different. Then, after the touch operation is detected, the position of the touch operation can be compared with the positions of multiple areas, and then the area whose corresponding position matches the action position of the touch operation is used as the target area, and the target area is The corresponding conversion mode is determined as the conversion mode corresponding to the current touch operation.
  • the screen can be divided into area a, area b and area c, where area a corresponds to the first conversion mode, area b corresponds to the second conversion mode, and area c corresponds to the third conversion mode.
  • area a corresponds to the first conversion mode
  • area b corresponds to the second conversion mode
  • area c corresponds to the third conversion mode.
  • the text currently displayed in the first interface is converted.
  • the second interface is in the display state, and the touch operation acting on the area c is detected, and the text in the first interface is updated, the third conversion method corresponding to the area c The text currently displayed in the first interface is converted.
  • the electronic device can obtain the text in the current interface and the layout format of the text by taking a screenshot of the current interface (for example, the first interface) and then using OCR (Optical Character Recognition, Optical Character Recognition), so as to Even when a picture is displayed in the current interface, the text included in the picture can still be obtained.
  • OCR Optical Character Recognition, Optical Character Recognition
  • S250 Display a second interface in layers on the first interface, and display the fourth text on the second interface.
  • the second interface can be canceled in response to the user's touch operation, then after the fourth text is obtained, in order to facilitate the display of the fourth text, the second interface will be stacked again on the first interface. interface.
  • the image on the left of FIG. 15 shows the third text in the first interface 11 , then after converting the third text to obtain the corresponding fourth text, it can be displayed.
  • the second interface 12 shown in the right image of FIG. 15 In the second interface 12 shown in the right image of FIG. 15 .
  • the second interface, and displaying the fourth text in the second interface includes: acquiring the size of the third text; transforming the font size of the fourth text based on the size, to obtain a font-transformed fourth text text; displaying a second interface in layers on the first interface, and displaying the fourth text after the font transformation in the second interface.
  • the font-transformed text may not be completely
  • the text after the font transformation (for example, the fourth text after the font transformation) may be displayed in pages in the second interface. Then, when the text in the second interface is displayed in paging, the touch operation that triggers switching paging and the aforementioned touch operation that triggers the removal of the second interface from the touch position can be distinguished, so that the electronic device can not only It supports paging of the content in the second interface, and also supports the operation of the first interface through a touch operation directly acting on the second interface.
  • the touch operation for triggering switching of paging may be a single-finger sliding operation, and correspondingly, the touch operation for triggering the removal of the second interface from the touch position may be a multi-finger sliding operation. Furthermore, optionally, the touch operation for triggering switching paging may be a multi-finger sliding operation, and the touch operation for triggering the removal of the second interface from the touch position may be a single-finger sliding operation.
  • the second interface is removed from the The removing at the touch position may include reducing the size of the second interface, so that the second interface is removed from the touch position.
  • the display area occupied by the second interface can be correspondingly reduced, so that the positions of the second interface and the touch operations acting on the screen can be staggered.
  • the touch operation acting on the screen can directly act on the first interface originally below the second interface.
  • the second interface 12 can be reduced from the style shown in the left image of FIG. 16 to the one shown in FIG. 16 .
  • the subsequent process of displaying the fourth text will also be different from the foregoing manner.
  • the touch operation includes a sliding operation, and after operating the first interface based on the touch operation, the operation further includes: performing the sliding operation on the third text in the first interface. Convert to obtain fourth text; restore the size of the second interface to the state before reduction, and display the fourth text in the second interface.
  • the reduced second interface can be restored to the style shown in the left image of FIG. 16 , and the fourth text can be displayed in the second interface. It can be understood that, when the fourth text is displayed in the second interface, the second text originally displayed in the second interface will be deleted.
  • each method has its own advantages.
  • the method of directly canceling the display of the second interface interference to the user when viewing the first interface can be avoided to the greatest extent, but every time the converted text corresponding to the updated text in the first interface needs to be displayed , the display of the second interface needs to be restored repeatedly, which will have a certain impact on the user's visual experience.
  • the method of reducing the size of the second interface because the reduced second interface will still occupy a certain display area, it may actually interfere with the user's viewing of the content in the first interface. In this manner of the second interface, the operations of canceling and displaying the second interface need not be repeated, which can give the user a better experience visually.
  • the electronic device can also flexibly determine which method is adopted to remove the second interface from the touch position according to the current actual situation.
  • the electronic device may determine a manner for removing the second interface from the touch position according to the density of the text in the first interface.
  • the density represents the density of the text in the interface. The higher the density, the denser the text in the interface. Correspondingly, the lower the density, the looser the text in the interface. .
  • the electronic device may compare the amount of text currently displayed in the first interface with the area of the first interface to obtain the degree of density.
  • the density of the text in the first interface obtained by the electronic device is greater than the density threshold, then it is determined to remove the second interface from the touch position by canceling the display of the second interface, and the corresponding , if the density of the acquired text in the first interface is not greater than the density threshold, it is determined that the second interface can be removed from the touch position by reducing the size of the second interface.
  • the right image of FIG. 13 shows the updated content (eg, the third text) in the first interface
  • the left image of FIG. 13 shows the content before the update (eg, the third text) , the first text)
  • the content included in the area 22 in FIG. 13 is repeated.
  • users when users are reading, they may pay more attention to the content that has not appeared before, so in order to avoid repeated conversion, the content in the first interface will be updated, and the update will be obtained.
  • the content after the update is compared with the content that has not appeared before the update, so as to obtain the fourth text. In this way, too many invalid conversion operations are avoided, and resource waste is reduced.
  • a prompt message can be displayed to remind that the conversion operation is currently in progress, and after the conversion is completed, a trigger control is displayed floating in the interface.
  • the touch operation on the trigger control triggers the display of the converted text.
  • a text processing method provided in this embodiment, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface is directly closed, and the second interface is directly closed based on the The touch operation is used to operate the first interface displaying the original text, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the need to close the second interface.
  • the problem that the first interface can be operated only after the operation is performed, thereby improving the user experience.
  • the third text in the first interface can be directly converted after the sliding operation, and the fourth text obtained after the conversion can be displayed through the second interface , so that the electronic device can automatically trigger the conversion of the text according to the change of the content in the first interface, which improves the convenience of the conversion.
  • a text processing apparatus 300 provided by an embodiment of the present application operates on an electronic device, and the apparatus 300 includes:
  • the interface display unit 310 is configured to display a second interface in layers on the first interface, where the second interface includes second text obtained by converting the first text in the first interface.
  • the interface closing unit 320 is configured to move the second interface from the touch position if a touch operation acting on the screen is detected and the action position of the touch operation is located in the second interface remove.
  • the interface closing unit 320 is specifically configured to cancel the display of the second interface.
  • the interface closing unit 320 is specifically configured to reduce the size of the second interface, so that the second interface is removed from the touch position.
  • the interface closing unit 320 is specifically configured to obtain the density of the text in the first interface; if the density of the text in the first interface is greater than the density threshold, cancel the display of the second interface. to remove the second interface from the touch position; if the density of the text in the first interface is not greater than the density threshold, reduce the size of the second interface by way to remove the second interface from the touch position.
  • the interface closing unit 320 is specifically configured to compare the number of currently displayed texts in the first interface with the area of the first interface to obtain the density of the texts in the first interface.
  • the interface control unit 330 is configured to operate the first interface based on the touch operation.
  • the apparatus 300 further includes: a text conversion unit 340 and a toolbar management unit 350 .
  • the text conversion unit 340 is used for converting the third text in the first interface after the sliding operation is performed to obtain the fourth text;
  • the interface display unit 310 is used for stacking and displaying the first text on the first interface.
  • second interface and the fourth text is displayed in the second interface.
  • the text conversion unit 340 is specifically configured to obtain the size of the third text; transform the font size of the fourth text based on the size to obtain the fourth text after the font transformation; correspondingly, the interface display unit 310 , which is configured to display a second interface in layers on the first interface, and display the fourth text after the font transformation in the second interface.
  • the text conversion unit 340 is specifically configured to, when a touch operation is detected, acquire an area that matches the action position of the touch operation as a target area; and determine the conversion method corresponding to the target area as the The conversion method corresponding to the touch operation.
  • the toolbar management unit 350 is configured to display a toolbar in a suspended position at a designated position, and the toolbar includes a first trigger mark; if a touch operation acting on the first trigger mark is detected, enter the first text conversion model.
  • the toolbar management unit 350 is specifically configured to display a status bar in the first state if a touch operation acting on the first trigger identifier is detected, and the status bar in the first state includes: There are text conversion state flags, text conversion selection controls, and controls for exiting the first text conversion mode.
  • the text conversion status identifier is used to represent whether there is currently text being converted; the text conversion selection control is used to select the original language of the text to be converted and the conversion target language.
  • the toolbar management unit 350 is specifically configured to switch the status bar to be in a second state if there is no operation acting on the status bar within a specified period of time, and the status bar of the second state includes: There is the text conversion status flag.
  • the conversion includes at least one of the following processing manners: performing language translation on the text; switching the font style of the text; and switching the font size of the text.
  • the toolbar management unit 350 is specifically configured to hide the toolbar or reduce the size of the toolbar if no touch operation acting on the toolbar is detected within a specified time period.
  • the toolbar further includes a second trigger mark, a third trigger mark and a fourth trigger mark; the second trigger mark is used to trigger entering the second conversion mode; the third trigger mark is used to trigger the current The identifier of the interface marking; the fourth trigger identifier is the identifier of calling the corresponding application program to start.
  • the toolbar management unit 350 is specifically configured to directly operate the fourth trigger identifier to trigger another application to start if the fourth trigger identifier is set in the toolbar displayed in the floating display.
  • the second text is displayed in the second interface stacked on the first interface, and If a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is removed from the touch position, based on the touch The operation operates on the first interface. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation.
  • An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.
  • an embodiment of the present application further provides another electronic device 200 that can execute the above text processing method.
  • the electronic device 200 includes one or more (only one shown in the figure) a processor 102, a memory 104, and a network module 106 that are coupled to each other.
  • the memory 104 stores a program that can execute the content in the foregoing embodiments, and the processor 102 can execute the program stored in the memory 104 .
  • the processor 102 may include one or more cores for processing data.
  • the processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 200, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 104, and calling the data stored in the memory 104.
  • the processor 102 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA programmable logic array
  • the processor 102 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used for rendering and drawing of the display content
  • the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 102, and is implemented by a communication chip alone.
  • the memory 104 may include a random access memory (Random Access Memory, RAM), or may include a read-only memory (Read-Only Memory, ROM). Memory 104 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 104 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing the operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.
  • the memory 104 may store text processing means.
  • the apparatus for text processing may be the aforementioned apparatus 300 .
  • the storage data area may also store data created during use of the electronic device 200 (eg, phone book, audio and video data, chat record data) and the like.
  • the network module 106 is used for receiving and sending electromagnetic waves, realizing mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, for example, communicate with an audio playback device.
  • the network module 106 may include various existing circuit elements for performing these functions, eg, antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, subscriber identity module (SIM) cards, memory, etc. .
  • the network module 106 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network.
  • the aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the network module 106 may interact with the base station for information.
  • FIG. 20 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable storage medium 1100 stores program codes, and the program codes can be invoked by the processor to execute the methods described in the above method embodiments.
  • the computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 1100 has storage space for program code 1110 that performs any of the method steps in the above-described methods. These program codes can be read from or written to one or more computer program products. Program code 1110 may be compressed, for example, in a suitable form.
  • the second text is displayed on the stack.
  • the second interface on the first interface if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is removed from the second interface. The touch position is removed, and the first interface is operated based on the touch operation. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation.
  • An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.

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)
  • User Interface Of Digital Computer (AREA)

Abstract

Disclosed in the embodiments of the present application are a text processing method and apparatus, and an electronic device and a storage medium. The method comprises: displaying a second interface superimposed on a first interface, wherein the second interface comprises second text which is obtained after first text in the first interface is converted; if a touch-control operation acting on a screen is detected, and the action position of the touch-control operation is located in the second interface, removing the second interface from the touch-control position; and performing an operation on the first interface on the basis of the touch-control operation.

Description

文本处理方法、装置、电子设备及存储介质Text processing method, device, electronic device and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2021年2月26日提交的申请号为202110220954.3的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。This application claims priority to Chinese Application No. 202110220954.3, filed on February 26, 2021, which is hereby incorporated by reference in its entirety for all purposes.
技术领域technical field
本申请涉及计算机技术领域,更具体地,涉及一种文本处理方法、装置、电子设备及存储介质。The present application relates to the field of computer technology, and more particularly, to a text processing method, apparatus, electronic device, and storage medium.
背景技术Background technique
随着电子设备中所展示的信息越来越多,有一些信息需要进行转换后才有利于被用户进行识别。例如,对于一些文本需要进行翻译之后才便于用户进行识别。As more and more information is displayed in electronic devices, some information needs to be converted before being recognized by users. For example, some texts need to be translated before they can be easily recognized by users.
发明内容SUMMARY OF THE INVENTION
鉴于上述问题,本申请提出了一种文本处理方法、装置、电子设备及存储介质,以改善上述问题。In view of the above problems, the present application proposes a text processing method, apparatus, electronic device and storage medium to improve the above problems.
第一方面,本申请提供了一种文本处理方法,应用于电子设备,所述方法包括:在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本;若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除;基于所述触控操作对所述第一界面进行操作。In a first aspect, the present application provides a text processing method, which is applied to an electronic device. The method includes: displaying a second interface on top of a first interface, wherein the second interface includes a method for processing a second interface in the first interface. A second text obtained by converting a text; if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is changed from the touch removed at the control position; operate the first interface based on the touch operation.
第二方面,本申请提供了一种文本处理装置,运行于电子设备,所述装置包括:界面显示单元,用于在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本;界面关闭单元,用于若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除;界面控制单元,用于基于所述触控操作对所述第一界面进行操作。In a second aspect, the present application provides a text processing device, which runs on an electronic device, the device includes: an interface display unit configured to display a second interface in layers on the first interface, wherein the second interface includes a pair of The second text obtained by converting the first text in the first interface; the interface closing unit is used for detecting a touch operation acting on the screen, and the action position of the touch operation is located on the second interface inside, the second interface is removed from the touch position; an interface control unit is configured to operate the first interface based on the touch operation.
第三方面,本申请提供了一种电子设备,包括处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述处理器执行以实现上述的方法。In a third aspect, the present application provides an electronic device including a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above method.
第四方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行上述的方法。In a fourth aspect, the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, wherein the above-mentioned method is executed when the program code is executed by a processor.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申 请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.
图1示出了本申请实施例提出的一种文本处理方法的应用场景的示意图;FIG. 1 shows a schematic diagram of an application scenario of a text processing method proposed by an embodiment of the present application;
图2示出了本申请实施例提出的一种文本处理方法的流程图;FIG. 2 shows a flowchart of a text processing method proposed by an embodiment of the present application;
图3示出了本申请实施例提出的一种文本处理方法中第一界面和第二界面的示意图;FIG. 3 shows a schematic diagram of a first interface and a second interface in a text processing method proposed by an embodiment of the present application;
图4示出了本申请实施例提出的一种文本处理方法中一种悬浮显示的工具栏的示意图;FIG. 4 shows a schematic diagram of a suspended display toolbar in a text processing method proposed by an embodiment of the present application;
图5示出了本申请实施例提出的一种文本处理方法中另一种悬浮显示的工具栏的示意图;FIG. 5 shows a schematic diagram of another toolbar displayed in suspension in a text processing method proposed by an embodiment of the present application;
图6示出了本申请实施例中一种选择器的示意图;FIG. 6 shows a schematic diagram of a selector in an embodiment of the present application;
图7示出了本申请实施例提出的一种文本处理方法中悬浮显示的工具栏缩小后的示意图;FIG. 7 shows a reduced schematic diagram of a toolbar displayed in suspension in a text processing method proposed by an embodiment of the present application;
图8示出了本申请实施例提出的一种文本处理方法中调出悬浮工具栏的示意图;FIG. 8 shows a schematic diagram of calling out a floating toolbar in a text processing method proposed by an embodiment of the present application;
图9示出了本申请实施例中一种状态栏的示意图;FIG. 9 shows a schematic diagram of a status bar in an embodiment of the present application;
图10示出了本申请实施例中的状态栏中的文本转换状态标识的示意图;Fig. 10 shows the schematic diagram of the text conversion state identification in the status bar in the embodiment of the present application;
图11示出了本申请实施例中另一种状态栏的示意图;FIG. 11 shows a schematic diagram of another status bar in an embodiment of the present application;
图12示出了本申请实施例提出的另一种文本处理方法的流程图;FIG. 12 shows a flowchart of another text processing method proposed by an embodiment of the present application;
图13示出了本申请实施例提中作用于第二界面的触控操作的效果示意图;FIG. 13 is a schematic diagram showing the effect of the touch operation acting on the second interface proposed in the embodiment of the present application;
图14示出了本申请实施例中对屏幕划分多个区域的示意图;FIG. 14 shows a schematic diagram of dividing a screen into multiple areas in an embodiment of the present application;
图15示出了本申请实施例中显示第三文本的示意图;FIG. 15 shows a schematic diagram of displaying a third text in an embodiment of the present application;
图16示出了本申请实施例中对第二界面进行缩小的示意图;FIG. 16 shows a schematic diagram of reducing the second interface in an embodiment of the present application;
图17示出了本申请另一实施例提出的一种文本处理装置的结构框图;FIG. 17 shows a structural block diagram of a text processing apparatus proposed by another embodiment of the present application;
图18示出了本申请再一实施例提出的一种文本处理装置的结构框图;FIG. 18 shows a structural block diagram of a text processing apparatus proposed by still another embodiment of the present application;
图19示出了本申请的用于执行根据本申请实施例的文本处理方法的电子设备的结构框图;FIG. 19 shows a structural block diagram of an electronic device of the present application for executing the text processing method according to an embodiment of the present application;
图20是本申请实施例的用于保存或者携带实现根据本申请实施例的文本处理方法的程序代码的存储单元。FIG. 20 is a storage unit for storing or carrying a program code for implementing a text processing method according to an embodiment of the present application according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
随着电子设备所能实现的功能越来越多,电子设备中的信息也越来越多,对于电子设备中的一些信息可能需要进行一定的转换后才有利于用户进行识别。例如,在电子设备中可能会存在由外文所记录的文本,那么为了便于用户对该文本的语义进行识别,则可能需要操作电子设备将该外文所记录的文本转换为本国语言。As more and more functions can be implemented by electronic devices, there are more and more information in electronic devices, and some information in electronic devices may need to be converted to a certain extent before it is helpful for users to identify. For example, there may be text recorded in a foreign language in an electronic device, so in order to facilitate the user to recognize the semantics of the text, it may be necessary to operate the electronic device to convert the text recorded in the foreign language into a native language.
但是,发明人在对相关的转换方式进行研究后发现,在相关的信息转换方式中,在对原始界面中的文本进行转换并显示转换结果后,需要先对转换结果进行关闭操作后才能继续的操作原始界面,给用户造成了不便。However, after researching the related conversion methods, the inventor found that in the related information conversion methods, after the text in the original interface is converted and the conversion result is displayed, the conversion result needs to be closed before continuing. Operating the original interface causes inconvenience to the user.
因此,发明人提出了本申请中可以改善上述问题的文本处理方法、装置、电子设备及存储介质,在对第一界面中的第一文本进行转换得到对应的第二文本后,将第二文本显示在层叠在第一界面上的第二界面中,并且若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除,基于所述触控操作对所述第一界面进行操作。从而通过前述方式使得在显示包括有转换结果的第二界面后,若有作用于第二界面的触控操作则会直接关闭第二界面,并直接基于该触控操作来对显示原始文本的第一界面进行操作,从而使得用户可以透过显示转换结果的第二界面直接对显示原始文本的第一界面进行操作,改善了必须要对第二界面执行关闭操作后才能对第一界面进行操作的问题,进而提升了用户体验。Therefore, the inventor proposes a text processing method, device, electronic device and storage medium that can improve the above problems in the present application. After converting the first text in the first interface to obtain the corresponding second text, the second text is converted into It is displayed in the second interface stacked on the first interface, and if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is Remove from the touch position, and operate the first interface based on the touch operation. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation. An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:取消显示所述第二界面。In an implementation manner, the method provided in this embodiment may further include the following process: canceling the display of the second interface.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:对执行所述滑动操作后的第一界面中的第三文本进行转换,得到第四文本;在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述第四文本。In an implementation manner, the method provided in this embodiment may further include the following process: converting the third text in the first interface after the sliding operation is performed to obtain the fourth text; on the first interface A second interface is displayed in layers, and the fourth text is displayed in the second interface.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:获取所述第三文本的尺寸;基于所述尺寸变换所述第四文本的字体大小,得到字体变换后的第四文本;在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述字体变换后的第四文本。In an implementation manner, the method provided in this embodiment may further include the following process: obtaining the size of the third text; transforming the font size of the fourth text based on the size to obtain the fourth text after the font transformation ; Display the second interface in layers on the first interface, and display the fourth text after the font transformation in the second interface.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:当检测到触控操作后,获取与所述触控操作的作用位置匹配的区域作为目标区域;将所述目标区域对应的转换方式确定为所述触控操作对应的转换方式。In one embodiment, the method provided in this embodiment may further include the following process: after detecting a touch operation, acquiring an area matching the action position of the touch operation as a target area; using the target area corresponding to The conversion mode is determined as the conversion mode corresponding to the touch operation.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:缩小所述第二界面的尺寸,以使得所述第二界面从所述触控位置处移除。In an implementation manner, the method provided in this embodiment may further include the following process: reducing the size of the second interface, so that the second interface is removed from the touch position.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:对执行所述滑动操作后的第一界面中的第三文本进行转换,得到第四文本;将所述第二界面的尺寸恢复到缩小之前的状态,并在所述第二界面中显示所述第四文本。In an implementation manner, the method provided in this embodiment may further include the following process: converting the third text in the first interface after the sliding operation is performed to obtain the fourth text; converting the text in the second interface The size is restored to the state before the reduction, and the fourth text is displayed in the second interface.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:获取所述第一界面中的文本的密集程度;若所述第一界面中的文本的密集程度大于密集阈值,则通过取消显示所述第二界面的方式来实现将所述第二界面从所述触控位置处移除;若所述第一界面中的文本的密集程度不大于所述密集阈值,则通过缩小所述第二界面的尺寸的方式来实现将所述第二界面从所述触控位置处移除。In an implementation manner, the method provided in this embodiment may further include the following process: obtaining the density of the text in the first interface; if the density of the text in the first interface is greater than a density threshold, pass The second interface is removed from the touch position by canceling the display of the second interface; if the density of the text in the first interface is not greater than the density threshold, reducing the The size of the second interface is used to remove the second interface from the touch position.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:将所述第一界面中当前所显示文本的数量与所述第一界面的面积相比,得到所述第一界面中的文本的密集程度。In an implementation manner, the method provided in this embodiment may further include the following process: comparing the number of texts currently displayed in the first interface with the area of the first interface, to obtain the number of texts in the first interface. the density of the text.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:在指定位置悬浮显示工具栏,所述工具栏中包括有第一触发标识;若检测到有作用于所述第一触发标识的触控操作,进入第一文本转换模式。In an implementation manner, the method provided in this embodiment may further include the following process: floating a toolbar at a specified position, and the toolbar includes a first trigger identifier; if a first trigger is detected that acts on the first trigger The touch operation of the logo enters the first text conversion mode.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在指定时间段内没有检测到作用于所述工具栏的触控操作,将所述工具栏进行隐藏或者将所述工具栏进行缩小。In an implementation manner, the method provided in this embodiment may further include the following process: if no touch operation acting on the toolbar is detected within a specified period of time, hiding the toolbar or The toolbar is reduced.
在一种实施方式中,所述工具栏还包括第二触发标识、第三触发标识以及第四触发标识;所述第二触发标识用于触发进入第二转换模式;所述第三触发标识为对当前界面进行标记的标识;所述第四触发标识为调用对应应用程序启动的标识。In one embodiment, the toolbar further includes a second trigger, a third trigger, and a fourth trigger; the second trigger is used to trigger entering the second conversion mode; the third trigger is An identifier for marking the current interface; the fourth trigger identifier is an identifier for calling the corresponding application program to start.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若悬浮显示的所述工具栏中设置有所述第四触发标识,则直接操作所述第四触发标识触发另外的应用程序进行启动。In an implementation manner, the method provided in this embodiment may further include the following process: if the fourth trigger mark is set in the toolbar displayed in the floating display, directly operating the fourth trigger mark to trigger another application program to start.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若检测到有作用于所述第一触发标识的触控操作,显示处于第一状态的状态栏,所述处于第一状态的状态栏中包括有文本转换状态标识、文本转换选择控件以及用于退出所述第一文本转换模式的控件。In an implementation manner, the method provided in this embodiment may further include the following process: if a touch operation acting on the first trigger mark is detected, a status bar in the first state is displayed, and the state bar in the first state is displayed. The status bar of the state includes a text conversion state identifier, a text conversion selection control, and a control for exiting the first text conversion mode.
在一种实施方式中,所述文本转换状态标识用于表征当前是否有文本正在被转换;所述文本转换选择控件用于对待转换文本的原语言以及转换目标语言进行选择。In one embodiment, the text conversion status flag is used to represent whether there is currently text being converted; the text conversion selection control is used to select the original language of the text to be converted and the conversion target language.
在一种实施方式中,本实施例提供的方法还可以包括如下流程:若在指定时长内没有作用于所述状态栏的操作,将所述状态栏切换为处于第二状态,所述第二状态的状态栏中包括有所述文本转换状态标识。In an implementation manner, the method provided in this embodiment may further include the following process: if there is no operation acting on the status bar within a specified period of time, the status bar is switched to be in a second state, and the second state The status bar of the status includes the text transition status identifier.
在一种实施方式中,所述转换包括以下处理方式中的至少一种:对文本进行语种翻译;切换文本的字体样式;以及切换文本的字体大小。In one embodiment, the conversion includes at least one of the following processing methods: performing language translation on the text; switching the font style of the text; and switching the font size of the text.
需要说明的是,本申请实施例所提供的文本处理方法可以运行于手机、平板电脑等电子设备中,也可以由电子设备和服务器来协同运行。其中,服务器可以是单个的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式***,还可以是提供云服务、云计算、云存储、CDN(Content Delivery Network,内容分发网络)、以及人工智能平台等基础云计算服务的云服务器。It should be noted that, the text processing method provided by the embodiments of the present application may be executed in electronic devices such as mobile phones and tablet computers, and may also be cooperatively executed by the electronic device and the server. Among them, the server can be a single physical server, or a server cluster or distributed system composed of multiple physical servers, and can also provide cloud services, cloud computing, cloud storage, CDN (Content Delivery Network, Content Delivery Network), And cloud servers for basic cloud computing services such as artificial intelligence platforms.
其中,在本申请实施例提供的文本处理方法由电子设备与服务器协同完成的这种情况下,如图1所示,其中的在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本;若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除;基于所述触控操作对所述第一界面进行操作等步骤可以由电子设备中的客户端110来完成,而另外的对第一文本进行转换得到第二文本可以由电子设备中的客户端110来执行,也可以由服务器120来执行。Wherein, in the case where the text processing method provided in the embodiment of the present application is completed by an electronic device and a server, as shown in FIG. 1 , a second interface is displayed in layers on the first interface, and in the second interface It includes the second text obtained by converting the first text in the first interface; if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the The second interface is removed from the touch position; steps such as operating the first interface based on the touch operation can be completed by the client 110 in the electronic device, and the other steps of the first text The conversion to obtain the second text may be performed by the client 110 in the electronic device, and may also be performed by the server 120 .
下面将结合附图具体描述本申请的各实施例。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
请参阅图2,本申请实施例提供的一种文本处理方法,应用于电子设备,所述方法包括:Referring to FIG. 2, a text processing method provided by an embodiment of the present application is applied to an electronic device, and the method includes:
S110:在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本。S110: Display a second interface on top of the first interface, where the second interface includes second text obtained by converting the first text in the first interface.
其中,第一界面可以为当前在前台显示的界面,并且在第一界面中所显示的文本为原始文本,该原始文本可以理解为转换之前的文本。对应的,第二界面为显示转换后的文本的界面。可选的,第二界面可以为网页页面(例如,html页面)、应用程序界面(例如,Activity界面)或者为一张图片。The first interface may be the interface currently displayed in the foreground, and the text displayed in the first interface is the original text, and the original text may be understood as the text before the conversion. Correspondingly, the second interface is an interface for displaying the converted text. Optionally, the second interface may be a web page (eg, an html page), an application program interface (eg, an Activity interface), or a picture.
其中,第一文本可以为第一界面中当前可见的全部文本,该第二文本为对第一文本进行转换后得到的文本。示例性的,如图3所示,图3中所示的为第一界面11,右侧图像中层叠在第一界面11上的第二界面12中,显示有对第一界面11中的第一文本进行转换后的第二文本。进行转换后的第二文本的排布格式与对应的第一文本的排布格式相同。Wherein, the first text may be all the texts currently visible in the first interface, and the second text is the text obtained by converting the first text. Exemplarily, as shown in FIG. 3 , the first interface 11 is shown in FIG. 3 , and in the second interface 12 stacked on the first interface 11 in the image on the right, there is a display of the first interface 11 . A second text after conversion of one text. The arrangement format of the converted second text is the same as the arrangement format of the corresponding first text.
其中,可选的,电子设备在进入到第一转换模式后可以对第一界面中的文本进行转换,在本实施例中可以有多种方式来触发进入到对第一界面中的文本进行转换的第一文本转换模式。Optionally, the electronic device may convert the text in the first interface after entering the first conversion mode, and in this embodiment, there may be multiple ways to trigger entering the conversion of the text in the first interface The first text conversion mode.
作为一种方式,可以通过悬浮显示工具栏的方式来触发进入第一文本转换模式。那么在这种方式下,所述在第一界面上层叠显示第二界面之前还可以包括:在指定位置悬浮显示工具栏,所述工具栏中包括有第一触发标识;若检测到有作用于所述第一触发标识的触控操作,进入第一文本转换模式。As a method, the entry of the first text conversion mode may be triggered by displaying the toolbar in a floating manner. Then in this way, before displaying the second interface in layers on the first interface, it may further include: floating a toolbar at a specified position, and the toolbar includes a first trigger identifier; if it is detected that it has an effect on The touch operation of the first trigger mark enters the first text conversion mode.
示例性的,如图4所示,在图4所示出的悬浮显示的工具栏13中,显示有第一触发标 识14。若在图4所示的状态下,检测到有作用于第一触发标识14的触控操作,则可以进入第一文本转换模式。其中,第一触发标识14的名称为“全屏翻译”,那么进入第一文本转换模式下则可以对第一界面中的所有文本进行转换,在图4所示的模式下的转换可以理解为对文本进行翻译。其中,在进入第一文本转换模式后可以同步的取消工具栏13的显示,以免干扰用户后续的阅览。Exemplarily, as shown in FIG. 4 , in the toolbar 13 of the floating display shown in FIG. 4 , a first trigger logo 14 is displayed. In the state shown in FIG. 4 , if a touch operation acting on the first trigger mark 14 is detected, the first text conversion mode can be entered. Wherein, the name of the first trigger mark 14 is “full-screen translation”, then when entering the first text conversion mode, all texts in the first interface can be converted, and the conversion in the mode shown in FIG. text for translation. Wherein, after entering the first text conversion mode, the display of the toolbar 13 can be canceled synchronously, so as not to interfere with the user's subsequent reading.
需要说明的是,对于图4中所示的工具栏除了可以包括有图4中所示的第一触发标识外,还可以包括更多的触发标识。可选的,还可以包括第二触发标识、第三触发标识以及第四触发标识,其中,第二触发标识可以触发进入到第二转换模式中,在第二转换模式中可以显示有一个选择器,用户可以通过选择器来从第一界面中选取部分文本进行转换。It should be noted that, the toolbar shown in FIG. 4 may include more trigger identifiers in addition to the first trigger identifier shown in FIG. 4 . Optionally, it can also include a second trigger mark, a third trigger mark and a fourth trigger mark, wherein the second trigger mark can be triggered to enter the second conversion mode, and a selector can be displayed in the second conversion mode. , the user can select part of the text from the first interface for conversion through the selector.
第三触发标识为对当前界面进行标记的标识。对当前界面进行标记可以理解为对当前界面进行单独存储,以便实现可以在不用先触发当前界面所属应用程序进行启动的情况下,可以直接调用当前界面进行显示。例如,当前界面可以为应用程序A对应的好友详情界面,那么通常的启动好友详情界面的流程为在桌面点击应用程序A的图标从而触发应用程序A启动,在应用程序A启动后显示好友列表界面,然后再在好友列表界面中进行选择,进而触发好友详情界面。那么若通过工具栏中的第三触发标识将当前的好友详情界面进行标记后,可以直接从应用程序A的外部调用好友详情界面进行显示,而不会再必须先触发显示好友列表界面,继而可以缩短调用出指定界面的操作路径。其中,第四触发标识可以为调用对应应用程序启动的标识。在悬浮显示的工具栏中设置有第四触发标识的情况下,可以不用从当前界面退出到桌面后才能启动另外的应用程序,而是可以直接操作该第四触发标识就触发另外的应用程序进行启动。The third trigger identifier is an identifier for marking the current interface. Marking the current interface can be understood as storing the current interface separately, so that the current interface can be directly called for display without first triggering the application program to which the current interface belongs to start. For example, the current interface can be the friend details interface corresponding to application A, then the usual process of starting the friend details interface is to click the icon of application A on the desktop to trigger application A to start, and display the friend list interface after application A is started , and then select it in the friend list interface to trigger the friend details interface. Then, if the current friend details interface is marked by the third trigger in the toolbar, the friend details interface can be called directly from outside of application A for display, and it is no longer necessary to trigger the display of the friend list interface first, and then you can Shorten the operation path for calling out the specified interface. Wherein, the fourth trigger identifier may be an identifier for invoking the startup of the corresponding application program. In the case where a fourth trigger mark is set in the toolbar displayed in the floating display, another application program can be started without exiting from the current interface to the desktop, but another application program can be triggered by directly operating the fourth trigger mark. start up.
示例性的,如图5所示,其中名称为“自由翻译”的标识15为一种第二触发标识,通过触发名称为“自由翻译”的标识15可以触发进入到第二转换模式。如图6所示,在第二转换模式下,可以显示有选择器18,并且该选择器18可以响应于用户的拖动操作而移动,例如,可以由图6中左侧图像所示的位置拖动到右侧图像所示的位置。请再参阅图5,其中的名称为“新建便签”的标识16为一种第三触发标识,通过触发该名称为“新建便签”的标识16就可以实现将当前的界面进行单独存储以便实现前述的快速调出的效果。而其中名称为“导航”的标识17为一种第四触发标识。若检测到作用于该名称为“导航”的标识17的触控操作则可以直接调用导航应用程序的启动。Exemplarily, as shown in FIG. 5 , the identifier 15 named “free translation” is a second trigger identifier, and entering the second conversion mode can be triggered by triggering the identifier 15 named “free translation”. As shown in FIG. 6 , in the second transition mode, a selector 18 may be displayed and may be moved in response to a user's drag operation, for example, as shown by the position shown in the left image in FIG. 6 Drag to the position shown in the image on the right. Please refer to FIG. 5 again, wherein the identifier 16 named "Newly Created Note" is a third trigger marker, and by triggering the marker 16 named "Newly created note", the current interface can be stored separately in order to achieve the aforementioned The effect of the quick recall. The identifier 17 named "navigation" is a fourth trigger identifier. If a touch operation acting on the identifier 17 named "navigation" is detected, the startup of the navigation application can be directly invoked.
其中,可选的,若在指定时间段内没有检测有作用于工具栏的触控操作,那么可以将工具栏进行隐藏或者将工具栏进行缩小。示例性的,如图7所示,若在指定时间段内没有检测有作用于工具栏的触控操作,可以将工具栏缩小为图7中所示的状态,缩小后的工具栏可以显示为图7中的条状17,并且该条状17可以位于显示屏的边界处。在工具栏缩小为条状17后,用户通过沿图8中虚线箭头所示的方向将条状17拖动指定距离后,可以再次调出悬浮显示的工具栏,并且,在工具栏被调出后,条状17会取消显示。Wherein, optionally, if no touch operation acting on the toolbar is detected within a specified time period, the toolbar may be hidden or reduced. Exemplarily, as shown in FIG. 7 , if no touch operation acting on the toolbar is detected within a specified period of time, the toolbar can be reduced to the state shown in FIG. 7 , and the reduced toolbar can be displayed as The strip 17 in FIG. 7, and the strip 17 may be located at the border of the display screen. After the toolbar is reduced to a bar 17, the user can drag the bar 17 for a specified distance in the direction indicated by the dashed arrow in FIG. 8, and the floating toolbar can be called up again. After that, the bar 17 will be undisplayed.
可选的,若检测有作用于工具栏以外的区域的触控操作时,可以将工具栏缩小到图7中所示的条状17的状态。Optionally, if a touch operation acting on an area other than the toolbar is detected, the toolbar can be reduced to the state of the bar 17 shown in FIG. 7 .
作为另外一种方式,还可以通过电子设备自身的快捷工具界面来对选择器的显示和取消显示进行控制。可选的,可以通过从显示屏的顶部朝向屏幕的底部执行滑动操作来触发显示该快捷工具界面,在该快捷工具界面中可以显示有选择器的管理控件。那么在还未显示选择器的情况下,若检测到作用于该管理控件的触控操作,则可以触发调出选择器,对应的,在已经调出选择器的情况下,若检测到作用于该管理控件的触控操作,则可以取消显示该选择器。As another way, the display and cancellation of the selector can also be controlled through the shortcut tool interface of the electronic device itself. Optionally, the display of the shortcut tool interface may be triggered by performing a sliding operation from the top of the display screen toward the bottom of the screen, and the management control with the selector may be displayed in the shortcut tool interface. Then in the case where the selector has not been displayed, if a touch operation acting on the management control is detected, the selector can be called up. Correspondingly, in the case where the selector has The touch operation of the management control can cancel the display of the selector.
再者,作为再一种方式,还可以通过语音控制的方式来触发显示选择器。在这种方式下,可以在启动电子设备的语音助手后,若获取到指定的语音内容则可以触发调出选择器。可选的,该指定的语音内容可以为文本转换,或者可以为文本翻译等。可选的,该指定的语音内容可以由用户根据自己的习惯进行设定。在这种方式中,可以通过前述的方式来控制选择器 取消显示,也可以继续通过语音助手来使得选择器取消显示。Furthermore, as a further way, the display selector can also be triggered by means of voice control. In this way, after starting the voice assistant of the electronic device, if the specified voice content is acquired, the selector can be triggered to call up. Optionally, the specified voice content may be text conversion, or may be text translation, or the like. Optionally, the specified voice content may be set by the user according to his own habits. In this way, the selector can be controlled to cancel the display through the aforementioned method, or the selector can be canceled from the display by continuing to use the voice assistant.
此外,在本实施例中在进入第一转换模式后为了便于提醒当前的转换状态以及便于用户进行更多的操作,还可以在进入第一转换模式后显示一状态栏。那么可选的,若检测到有作用于所述第一触发标识的触控操作,显示处于第一状态的状态栏,所述处于第一状态的状态栏中包括有文本转换状态标识、文本转换选择控件以及用于退出所述第一文本转换模式的控件。其中,文本转换状态标识用于表征当前是否有文本正在被转换。文本转换选择控件可以用于对待转换文本的原语言以及转换目标语言进行选择。In addition, in this embodiment, after entering the first conversion mode, in order to remind the current conversion state and facilitate the user to perform more operations, a status bar may also be displayed after entering the first conversion mode. Then optionally, if a touch operation that acts on the first trigger mark is detected, a status bar in the first state is displayed, and the status bar in the first state includes the text conversion status mark, the text conversion status A selection control and a control for exiting the first text conversion mode. Among them, the text conversion status flag is used to represent whether there is currently text being converted. The text conversion selection control can be used to select the original language of the text to be converted and the target language to be converted.
示例性的,如图9所示,显示有处于第一状态的状态栏20。在该第一状态的状态栏20中包括有文本转换状态标识21、文本转换选择控件22以及于退出所述第一文本转换模式的控件23。其中,示例性的,若当前正在对第一界面中的文本进行翻译,那么文本转换状态标识21可以显示为图10中左侧图像中所示的样式,若当前已经完成了翻译,那么文本转换状态标识21可以显示为图10中右侧图像中所示的样式。Exemplarily, as shown in FIG. 9 , the status bar 20 in the first state is displayed. The status bar 20 in the first state includes a text conversion state identifier 21, a text conversion selection control 22, and a control 23 for exiting the first text conversion mode. Wherein, exemplarily, if the text in the first interface is currently being translated, the text conversion status indicator 21 can be displayed in the style shown in the image on the left in FIG. 10 , if the translation has been completed currently, then the text conversion The status indicator 21 may be displayed in the style shown in the image on the right in FIG. 10 .
需要说明的是,对于前述指出的处于第一状态的状态栏中会显示有较多的控件或者标识,造成处于第一状态的状态栏会占用一定的区域,而状态栏所占用的区域越多,那么对用户的阅读体验就会影响越大。作为一种改善方式,若在指定时长内没有作用于所述状态栏的操作,将所述状态栏切换为处于第二状态,所述第二状态的状态栏中包括有所述文本转换状态标识。示例性的,如图11所示,处于第二状态的状态栏20中仅显示有文本转换状态标识21,而可以不用再显示文本转换选择控件以及用于退出所述第一文本转换模式的控件。在状态栏处于第二状态后,可以响应于作用于状态栏的点击操作而切换到处于第一状态。It should be noted that, for the status bar in the first state indicated above, there will be more controls or logos displayed, resulting in the status bar in the first state occupying a certain area, and the more area the status bar occupies. , then it will have a greater impact on the user's reading experience. As an improvement, if there is no operation acting on the status bar within a specified period of time, the status bar is switched to be in a second state, and the status bar of the second state includes the text conversion state identifier . Exemplarily, as shown in FIG. 11 , in the status bar 20 in the second state, only the text conversion state indicator 21 is displayed, and the text conversion selection control and the control for exiting the first text conversion mode may no longer be displayed. . After the status bar is in the second state, it can be switched to the first state in response to a click operation acting on the status bar.
S120:若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除。S120: If a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, remove the second interface from the touch position.
其中,需要说明的是,在本申请实施例中将第二界面从触控位置处移除可以使得触控操作可以直接作用于第一界面。在本申请实施例中,将第二界面从触控位置处移除的方式有多种。可选的,可以直接触发取消显示第二界面,再者,也可以对第二界面的尺寸进行缩小,使得缩小后的第二界面与触控位置之间不再重合,从而实现将第二界面从触控位置处移除。It should be noted that, in the embodiment of the present application, removing the second interface from the touch position can enable the touch operation to directly act on the first interface. In the embodiment of the present application, there are various ways to remove the second interface from the touch position. Optionally, the cancellation of the display of the second interface can be directly triggered, and furthermore, the size of the second interface can also be reduced, so that the reduced second interface and the touch position no longer overlap, so as to realize the display of the second interface. Remove from touch location.
S130:基于所述触控操作对所述第一界面进行操作。S130: Operate the first interface based on the touch operation.
其中,触控操作的类型可以有多种。例如,按压操作或者滑动操作等。那么基于所述触控操作对第一界面进行操作可以理解为在第一界面上执行该触控操作。There are various types of touch operations. For example, a pressing operation or a sliding operation or the like. Then, the operation on the first interface based on the touch operation can be understood as performing the touch operation on the first interface.
需要说明的是,其中,在本申请实施例中,对于待处理文本的转换可以有多种方式。作为一种方式,所述转换包括以下处理方式中的至少一种:对文本进行语种翻译;切换文本的字体样式;以及切换文本的字体大小。其中,进行语种翻译可以包括将任一一个语种的文本翻译为另一个语种的文本,例如,可以将英语的文本翻译为中文的文本,也可以将中文的文本翻译为英文的文本。切换文本的字体样式可以理解为切换文本本身的字体。例如,可以将宋体的文本切换为楷体的文本,再例如,可以将繁体的文本切换为简体的文本。It should be noted that, in this embodiment of the present application, there may be multiple ways to convert the text to be processed. In one manner, the conversion includes at least one of the following processing manners: performing language translation on the text; switching the font style of the text; and switching the font size of the text. The language translation may include translating texts in any one language into texts in another language. For example, English texts may be translated into Chinese texts, and Chinese texts may also be translated into English texts. Switching the font style of the text can be understood as switching the font of the text itself. For example, it is possible to switch the text in the Song typeface to the text in the italics, and for another example, switch the text in the traditional type to the text in the simplified type.
本实施例提供的一种文本处理方法,在对第一界面中的第一文本进行转换得到对应的第二文本后,将第二文本显示在层叠在第一界面上的第二界面中,并且若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除,基于所述触控操作对所述第一界面进行操作。从而通过前述方式使得在显示包括有转换结果的第二界面后,若有作用于第二界面的触控操作则会直接关闭第二界面,并直接基于该触控操作来对显示原始文本的第一界面进行操作,从而使得用户可以透过显示转换结果的第二界面直接对显示原始文本的第一界面进行操作,改善了必须要对第二界面执行关闭操作后才能对第一界面进行操作的问题,进而提升了用户体验。In the text processing method provided by this embodiment, after converting the first text in the first interface to obtain the corresponding second text, the second text is displayed in the second interface stacked on the first interface, and If a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is removed from the touch position, based on the touch The operation operates on the first interface. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation. An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.
请参阅图12,本申请实施例提供的一种文本处理方法,应用于电子设备,所述方法包括:Referring to FIG. 12, a text processing method provided by an embodiment of the present application is applied to an electronic device, and the method includes:
S210:在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本。S210 : Display a second interface in layers on the first interface, where the second interface includes second text obtained by converting the first text in the first interface.
S220:若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,取消显示所述第二界面。S220: If a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, cancel the display of the second interface.
S230:基于所述触控操作对所述第一界面进行操作。S230: Operate the first interface based on the touch operation.
S240:对执行所述滑动操作后的第一界面中的第三文本进行转换,得到第四文本。S240: Convert the third text in the first interface after the sliding operation is performed to obtain a fourth text.
其中,第三文本可以理解为在第一界面中执行滑动操作后,在第一界面中当前所显示的文本。示例性的,如图13所示,在图13的左侧图像中的第一界面11中显示的为第一文本,在图13的中间图像中显示了,用于对图13的左侧图像中的第一文本进行转换得到的第二文本进行显示的第二界面12。在这种情况下,若有如图13的中间图像中的所示方向(虚线箭头所示方向)的滑动操作,则会如图13的右侧图像中所示的取消显示第二界面12,并且会同步的对第一界面执行该虚线箭头所示方向的滑动操作,进而对第一界面中当前所显示的文本进行更新。例如,图13的左侧图中的第一界面中的区域22中的文本,会随着该滑动操作的作用而移动到图13右侧图像中的第一界面中的位置,并随之会有新的内容显示到第一界面中,实现了对第一界面中的文本进行更新。那么在这种情况下,区域22中的文本和新的内容则组成了第一界面中的第三文本。其中,新的内容可以为纯文本,也可以为显示在图片中的文本。The third text may be understood as the text currently displayed in the first interface after the sliding operation is performed in the first interface. Exemplarily, as shown in FIG. 13 , the first text displayed in the first interface 11 in the left image of FIG. 13 is displayed in the middle image of FIG. The second interface 12 for displaying the second text obtained by converting the first text in the . In this case, if there is a sliding operation in the direction shown in the middle image of FIG. 13 (the direction shown by the dotted arrow), the display of the second interface 12 will be canceled as shown in the right image of FIG. 13 , and The sliding operation in the direction indicated by the dotted arrow will be performed on the first interface synchronously, and then the text currently displayed in the first interface will be updated. For example, the text in the area 22 in the first interface in the left image of FIG. 13 will move to the position in the first interface in the right image of FIG. 13 with the action of the sliding operation, and then New content is displayed in the first interface, and the text in the first interface is updated. Then in this case, the text in the area 22 and the new content constitute the third text in the first interface. The new content may be plain text or text displayed in a picture.
需要说明的是,在本实施例中所示出的转换方式为对文本进行翻译,在本实施例中的转换方式除了可以为翻译外,还可以有其他的转换方式,例如,所述转换方式还可以包括切换文本的字体样式以及切换文本的字体大小。It should be noted that the conversion method shown in this embodiment is to translate text. In addition to translation, the conversion method in this embodiment may also have other conversion methods. For example, the conversion method It can also include toggling the font style of the text and toggling the font size of the text.
那么在转换方式有多种的情况下,电子设备可以根据用户的操作方式的不同来确定当次所采用的转换方式。可选的,电子设备可以根据用户的触控操作所在的区域的来确定对应的转换方式。Then, when there are multiple conversion modes, the electronic device can determine the conversion mode to be adopted at the current time according to the different operation modes of the user. Optionally, the electronic device may determine the corresponding conversion mode according to the region where the user's touch operation is located.
可选的,电子设备可以将屏幕划分为多个区域,且多个区域各自对应的转换方式不同。那么在检测到触控操作后,可以将触控操作的位置与多个区域的位置进行比对,进而将对应的位置与触控操作的作用位置匹配的区域作为目标区域,并将目标区域所对应的转换方式确定为当次触控操作对应的转换方式。Optionally, the electronic device may divide the screen into multiple regions, and the respective conversion modes corresponding to the multiple regions are different. Then, after the touch operation is detected, the position of the touch operation can be compared with the positions of multiple areas, and then the area whose corresponding position matches the action position of the touch operation is used as the target area, and the target area is The corresponding conversion mode is determined as the conversion mode corresponding to the current touch operation.
示例性的,如图14所示,可以将屏幕划分为区域a、区域b以及区域c,并且其中区域a对应第一转换方式,区域b对应第二转换方式,区域c对应第三转换方式。那么在第二界面处于显示状态的情况下,有检测到作用于区域a的触控操作而使得第一界面内的文本有更新的情况下,则可以基于区域a对应的第一转换方式对第一界面内当前所显示的文本进行转换。类似的,第二界面处于显示状态的情况下,有检测到作用于区域b的触控操作而使得第一界面内的文本有更新的情况下,则可以基于区域b对应的第二转换方式对第一界面内当前所显示的文本进行转换。类似的,第二界面处于显示状态的情况下,有检测到作用于区域c的触控操作而使得第一界面内的文本有更新的情况下,则可以基于区域c对应的第三转换方式对第一界面内当前所显示的文本进行转换。Exemplarily, as shown in FIG. 14 , the screen can be divided into area a, area b and area c, where area a corresponds to the first conversion mode, area b corresponds to the second conversion mode, and area c corresponds to the third conversion mode. Then, when the second interface is in the display state, and the touch operation acting on the area a is detected and the text in the first interface is updated, the first conversion method corresponding to the area a can be used for the The text currently displayed in an interface is converted. Similarly, when the second interface is in the display state, and the touch operation acting on the area b is detected and the text in the first interface is updated, then the text in the first interface can be updated based on the second conversion method corresponding to the area b. The text currently displayed in the first interface is converted. Similarly, when the second interface is in the display state, and the touch operation acting on the area c is detected, and the text in the first interface is updated, the third conversion method corresponding to the area c The text currently displayed in the first interface is converted.
作为一种方式,电子设备可以通过对当前界面(例如,第一界面)进行截图然后通过OCR(Optical Character Recognition,光学字符识别)的方式获取到当前界面中的文本以及文本的排布格式,从而即使在当前界面中显示有图片的情况下,也依然可以获取到图片中所包括的文本。As a way, the electronic device can obtain the text in the current interface and the layout format of the text by taking a screenshot of the current interface (for example, the first interface) and then using OCR (Optical Character Recognition, Optical Character Recognition), so as to Even when a picture is displayed in the current interface, the text included in the picture can still be obtained.
S250:在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述第四文本。S250: Display a second interface in layers on the first interface, and display the fourth text on the second interface.
可以理解的是,在前述步骤中响应于用户的触控操作可以使得第二界面取消显示,那么在得到第四文本后为了便于展示第四文本,则会又在第一界面上恢复层叠第二界面。示例性的,如图15所示,图15的左侧图像所示的为第一界面11中的第三文本,那么在对该第三文本进行转换得到对应的第四文本后,则可以显示在图15的右侧图像中所示的第二界面12中。It can be understood that, in the aforementioned steps, the second interface can be canceled in response to the user's touch operation, then after the fourth text is obtained, in order to facilitate the display of the fourth text, the second interface will be stacked again on the first interface. interface. Exemplarily, as shown in FIG. 15 , the image on the left of FIG. 15 shows the third text in the first interface 11 , then after converting the third text to obtain the corresponding fourth text, it can be displayed. In the second interface 12 shown in the right image of FIG. 15 .
需要说明的是,在翻译这种转换方式中,对于同样的句意,可能需要不同长度的文本进 行描述。那么就可能会出现一种情况是,翻译后得到的文本会比原文更长,那么翻译后的文本所占用的显示空间也会比原文所占用的显示空间更大,进而就可能会造成如果显示在第二界面中的文本如果固定采用一种字体大小,则可能会造成转换后的文本无法完全显示,那么为了改善该问题,作为一种方式,所述在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述第四文本,包括:获取所述第三文本的尺寸;基于所述尺寸变换所述第四文本的字体大小,得到字体变换后的第四文本;在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述字体变换后的第四文本。It should be noted that in the conversion method of translation, texts of different lengths may be required to describe the same sentence meaning. Then there may be a situation that the text obtained after translation will be longer than the original text, and the display space occupied by the translated text will also be larger than the display space occupied by the original text. If the text in the second interface adopts a fixed font size, the converted text may not be fully displayed. In order to improve this problem, as a method, the first interface is stacked and displayed on the first interface. second interface, and displaying the fourth text in the second interface includes: acquiring the size of the third text; transforming the font size of the fourth text based on the size, to obtain a font-transformed fourth text text; displaying a second interface in layers on the first interface, and displaying the fourth text after the font transformation in the second interface.
作为一种方式,如果第一界面中当前所需要进行翻译的文本较多时,可能即使后续对转换后的文本(例如,前述的第四文本)进行字体变换后,字体变换后的文本依然无法全部显示在第二界面中的情况下,可以在第二界面中对字体变换后的文本(例如,字体变换后的第四文本)进行分页显示。那么第二界面中的文本存在分页显示的情况下,可以对触发切换分页的触控操作和前述的触发将第二界面从触控位置处移除的触控操作进行区分,从而使得电子设备既支持对第二界面中的内容进行分页,也支持通过直接作用于第二界面的触控操作来对第一界面进行操作。As a method, if there are many texts that need to be translated currently in the first interface, even after the font conversion of the converted text (for example, the aforementioned fourth text) may be performed subsequently, the font-transformed text may not be completely In the case of displaying in the second interface, the text after the font transformation (for example, the fourth text after the font transformation) may be displayed in pages in the second interface. Then, when the text in the second interface is displayed in paging, the touch operation that triggers switching paging and the aforementioned touch operation that triggers the removal of the second interface from the touch position can be distinguished, so that the electronic device can not only It supports paging of the content in the second interface, and also supports the operation of the first interface through a touch operation directly acting on the second interface.
可选的,该触发切换分页的触控操作可以为单指滑动操作,对应的,触发将第二界面从触控位置处移除的触控操作可以为多指滑动操作。再者,可选的,也可以是该触发切换分页的触控操作为多指滑动操作,而触发将第二界面从触控位置处移除的触控操作为单指滑动操作。Optionally, the touch operation for triggering switching of paging may be a single-finger sliding operation, and correspondingly, the touch operation for triggering the removal of the second interface from the touch position may be a multi-finger sliding operation. Furthermore, optionally, the touch operation for triggering switching paging may be a multi-finger sliding operation, and the touch operation for triggering the removal of the second interface from the touch position may be a single-finger sliding operation.
再者,将第二界面从触控位置处移除的方式除了前述的直接取消显示第二界面这种方式外,作为另外一种方式,在本申请实施例中,将所述第二界面从所述触控位置处移除可以包括:缩小所述第二界面的尺寸,以使得所述第二界面从所述触控位置处移除。Furthermore, in addition to the aforementioned method of directly canceling the display of the second interface, as another method of removing the second interface from the touch position, in this embodiment of the present application, the second interface is removed from the The removing at the touch position may include reducing the size of the second interface, so that the second interface is removed from the touch position.
需要说明的是,在缩小第二界面的尺寸的过程中,第二界面所占用的显示区域就可以对应的缩小,进而就可以使得第二界面与作用于屏幕的触控操作所在位置相互错开,使得作用于屏幕的触控操作可以直接作用于原本在第二界面下方的第一界面。It should be noted that in the process of reducing the size of the second interface, the display area occupied by the second interface can be correspondingly reduced, so that the positions of the second interface and the touch operations acting on the screen can be staggered. The touch operation acting on the screen can directly act on the first interface originally below the second interface.
示例性的,如图16所示,若有作用位置在第二界面12内的触控操作,则可以将第二界面12从图16的左侧图像中所示的样式,缩小到图16的右侧图像中所示的样式。可以看出的是,在图16的右侧图像中,第二界面12与触控位置已经完全错开,进而使得施加在屏幕的触控操作可以直接作用于第一界面11。Exemplarily, as shown in FIG. 16 , if there is a touch operation whose action position is in the second interface 12 , the second interface 12 can be reduced from the style shown in the left image of FIG. 16 to the one shown in FIG. 16 . Style shown in the image on the right. It can be seen that in the right image of FIG. 16 , the second interface 12 and the touch position have been completely staggered, so that the touch operation applied to the screen can directly act on the first interface 11 .
对应的,在对第二界面进行缩小的这种方式中,后续再进行第四文本的显示的过程也会对应于前述的方式不同。可选的,所述触控操作包括滑动操作,所述基于所述触控操作对所述第一界面进行操作之后还包括:对执行所述滑动操作后的第一界面中的第三文本进行转换,得到第四文本;将所述第二界面的尺寸恢复到缩小之前的状态,并在所述第二界面中显示所述第四文本。示例性的,在对第四文本的显示过程中,可以将缩小后的第二界面恢复到图16的左侧图像中所示的样式,并在第二界面中显示第四文本。可以理解的是,在第二界面中显示第四文本时会将原本显示在第二界面中的第二文本进行删除。Correspondingly, in the manner of reducing the second interface, the subsequent process of displaying the fourth text will also be different from the foregoing manner. Optionally, the touch operation includes a sliding operation, and after operating the first interface based on the touch operation, the operation further includes: performing the sliding operation on the third text in the first interface. Convert to obtain fourth text; restore the size of the second interface to the state before reduction, and display the fourth text in the second interface. Exemplarily, in the process of displaying the fourth text, the reduced second interface can be restored to the style shown in the left image of FIG. 16 , and the fourth text can be displayed in the second interface. It can be understood that, when the fourth text is displayed in the second interface, the second text originally displayed in the second interface will be deleted.
其中,可以理解的是,对于前述的将第二界面从触控位置处进行移除的多种方式,每种方式都有自己的好处。例如,对于直接取消显示第二界面的这种方式,可以最大程度的避免对用户阅览第一界面时造成干扰,但是每次在需要对第一界面中更新后的文本对应的转换文本进行展示时,需要重复的恢复第二界面的显示,在用户的视觉体验上会有一定影响。而对于缩小第二界面的尺寸的这种方式,因为缩小后的第二界面依然会占用一定的显示区域,那么实际上还是可能会对用户阅览第一界面中的内容造成干扰,但是,对于缩小第二界面的这种方式中,不用对第二界面重复的进行取消显示和显示的操作,可以在视觉上给用户更好的体验。Among them, it can be understood that, for the aforementioned various methods of removing the second interface from the touch position, each method has its own advantages. For example, for the method of directly canceling the display of the second interface, interference to the user when viewing the first interface can be avoided to the greatest extent, but every time the converted text corresponding to the updated text in the first interface needs to be displayed , the display of the second interface needs to be restored repeatedly, which will have a certain impact on the user's visual experience. As for the method of reducing the size of the second interface, because the reduced second interface will still occupy a certain display area, it may actually interfere with the user's viewing of the content in the first interface. In this manner of the second interface, the operations of canceling and displaying the second interface need not be repeated, which can give the user a better experience visually.
那么基于前述内容,电子设备也可以灵活的根据当前的实际情况来确定当次是采用哪种方式来实现将第二界面从触控位置处进行移除。Then, based on the foregoing content, the electronic device can also flexibly determine which method is adopted to remove the second interface from the touch position according to the current actual situation.
需要说明的是,电子设备可以根据第一界面中的文本的密集程度来确定对于将第二界面从触控位置处进行移除的方式。其中,密集程度表征了界面中的文本的排布密集程度,密集程度越高那么界面中的文本排布也就越密集,对应的,密集程度越低那么界面中的文本排布也就越松散。作为一种方式,电子设备可以将第一界面中当前所显示文本的数量与第一界面的面积相比以得到密集程度。It should be noted that, the electronic device may determine a manner for removing the second interface from the touch position according to the density of the text in the first interface. Among them, the density represents the density of the text in the interface. The higher the density, the denser the text in the interface. Correspondingly, the lower the density, the looser the text in the interface. . As a way, the electronic device may compare the amount of text currently displayed in the first interface with the area of the first interface to obtain the degree of density.
可选的,若电子设备获取到第一界面中的文本的密集程度大于密集阈值,那么则确定通过取消显示第二界面的方式来实现将第二界面从触控位置处进行移除,对应的,若获取到第一界面中的文本的密集程度不大于该密集阈值,则确定可以通过缩小第二界面的尺寸的方式来实现将第二界面从触控位置处进行移除。Optionally, if the density of the text in the first interface obtained by the electronic device is greater than the density threshold, then it is determined to remove the second interface from the touch position by canceling the display of the second interface, and the corresponding , if the density of the acquired text in the first interface is not greater than the density threshold, it is determined that the second interface can be removed from the touch position by reducing the size of the second interface.
需要说明的是,在对第一界面中的内容进行更新的过程中,可能并不会将第一界面中所有内容均进行更新,而是可以仅对部分内容进行更新。请再参阅图13,图13的右侧图像中所示为第一界面中的更新后的内容(例如,第三文本),图13的左侧图像中所示的为更新之前的内容(例如,第一文本),而其中更新后的内容与更新之前的内容相比,会有图13中区域22中所包括的内容是重复的。其中,可以理解的是,用户在进行阅览时,可能更多的是关注相比之前没有出现过的内容,那么为了避免重复进行转换,则会在第一界面中的内容进行更新后,获取更新后的内容相比更新前的内容没有出现过的内容进行转换,以得到第四文本。从而通过这种方式,避免过多的出现无效的转换操作,降低资源浪费。It should be noted that, in the process of updating the content in the first interface, not all the content in the first interface may be updated, but only part of the content may be updated. Please refer to FIG. 13 again, the right image of FIG. 13 shows the updated content (eg, the third text) in the first interface, and the left image of FIG. 13 shows the content before the update (eg, the third text) , the first text), and compared with the content before the update, the content included in the area 22 in FIG. 13 is repeated. Among them, it can be understood that when users are reading, they may pay more attention to the content that has not appeared before, so in order to avoid repeated conversion, the content in the first interface will be updated, and the update will be obtained. The content after the update is compared with the content that has not appeared before the update, so as to obtain the fourth text. In this way, too many invalid conversion operations are avoided, and resource waste is reduced.
作为一种方式,对于在对第一界面的内容进行转换的过程中,可以显示提示信息以提示当前正在进行转换操作,并在完成转换后在界面中悬浮显示一触发控件,若检测到有作用于该触发控件的触控操作则再触发对转换后的文本进行显示。As a way, in the process of converting the content of the first interface, a prompt message can be displayed to remind that the conversion operation is currently in progress, and after the conversion is completed, a trigger control is displayed floating in the interface. The touch operation on the trigger control triggers the display of the converted text.
本实施例提供的一种文本处理方法,通过前述方式使得在显示包括有转换结果的第二界面后,若有作用于第二界面的触控操作则会直接关闭第二界面,并直接基于该触控操作来对显示原始文本的第一界面进行操作,从而使得用户可以透过显示转换结果的第二界面直接对显示原始文本的第一界面进行操作,改善了必须要对第二界面执行关闭操作后才能对第一界面进行操作的问题,进而提升了用户体验。并且,在本实施例中若作用于屏幕的是滑动操作那么可以在滑动操作结束后,就直接对第一界面中第三文本进行转换,并通过第二界面来显示转换后得到的第四文本,从而使得电子设备可以根据第一界面中内容的改变而自动的触发进行文本的转换,提升了转换的便利性。In a text processing method provided in this embodiment, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface is directly closed, and the second interface is directly closed based on the The touch operation is used to operate the first interface displaying the original text, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the need to close the second interface. The problem that the first interface can be operated only after the operation is performed, thereby improving the user experience. In addition, in this embodiment, if the sliding operation acts on the screen, the third text in the first interface can be directly converted after the sliding operation, and the fourth text obtained after the conversion can be displayed through the second interface , so that the electronic device can automatically trigger the conversion of the text according to the change of the content in the first interface, which improves the convenience of the conversion.
请参阅图17,本申请实施例提供的一种文本处理装置300,运行于电子设备,所述装置300包括:Referring to FIG. 17 , a text processing apparatus 300 provided by an embodiment of the present application operates on an electronic device, and the apparatus 300 includes:
界面显示单元310,用于在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本。The interface display unit 310 is configured to display a second interface in layers on the first interface, where the second interface includes second text obtained by converting the first text in the first interface.
界面关闭单元320,用于若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除。The interface closing unit 320 is configured to move the second interface from the touch position if a touch operation acting on the screen is detected and the action position of the touch operation is located in the second interface remove.
作为一种方式,界面关闭单元320,具体用于取消显示所述第二界面。In one way, the interface closing unit 320 is specifically configured to cancel the display of the second interface.
作为另一种方式,界面关闭单元320,具体用于缩小所述第二界面的尺寸,以使得所述第二界面从所述触控位置处移除。In another manner, the interface closing unit 320 is specifically configured to reduce the size of the second interface, so that the second interface is removed from the touch position.
可选的,界面关闭单元320,具体用于获取所述第一界面中的文本的密集程度;若所述第一界面中的文本的密集程度大于密集阈值,则通过取消显示所述第二界面的方式来实现将所述第二界面从所述触控位置处移除;若所述第一界面中的文本的密集程度不大于所述密集阈值,则通过缩小所述第二界面的尺寸的方式来实现将所述第二界面从所述触控位置处移除。Optionally, the interface closing unit 320 is specifically configured to obtain the density of the text in the first interface; if the density of the text in the first interface is greater than the density threshold, cancel the display of the second interface. to remove the second interface from the touch position; if the density of the text in the first interface is not greater than the density threshold, reduce the size of the second interface by way to remove the second interface from the touch position.
可选的,界面关闭单元320,具体用于将所述第一界面中当前所显示文本的数量与所述第一界面的面积相比,得到所述第一界面中的文本的密集程度。Optionally, the interface closing unit 320 is specifically configured to compare the number of currently displayed texts in the first interface with the area of the first interface to obtain the density of the texts in the first interface.
界面控制单元330,用于基于所述触控操作对所述第一界面进行操作。The interface control unit 330 is configured to operate the first interface based on the touch operation.
如图18所示,装置300还包括:文本转换单元340以及工具栏管理单元350。As shown in FIG. 18 , the apparatus 300 further includes: a text conversion unit 340 and a toolbar management unit 350 .
其中,文本转换单元340,用于对执行所述滑动操作后的第一界面中的第三文本进行转换,得到第四文本;界面显示单元310,用于在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述第四文本。Wherein, the text conversion unit 340 is used for converting the third text in the first interface after the sliding operation is performed to obtain the fourth text; the interface display unit 310 is used for stacking and displaying the first text on the first interface. second interface, and the fourth text is displayed in the second interface.
可选的,文本转换单元340,具体用于获取所述第三文本的尺寸;基于所述尺寸变换所述第四文本的字体大小,得到字体变换后的第四文本;对应的,界面显示单元310,用于在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述字体变换后的第四文本。Optionally, the text conversion unit 340 is specifically configured to obtain the size of the third text; transform the font size of the fourth text based on the size to obtain the fourth text after the font transformation; correspondingly, the interface display unit 310 , which is configured to display a second interface in layers on the first interface, and display the fourth text after the font transformation in the second interface.
可选的,文本转换单元340,具体用于当检测到触控操作后,获取与所述触控操作的作用位置匹配的区域作为目标区域;将所述目标区域对应的转换方式确定为所述触控操作对应的转换方式。Optionally, the text conversion unit 340 is specifically configured to, when a touch operation is detected, acquire an area that matches the action position of the touch operation as a target area; and determine the conversion method corresponding to the target area as the The conversion method corresponding to the touch operation.
工具栏管理单元350,用于在指定位置悬浮显示工具栏,所述工具栏中包括有第一触发标识;若检测到有作用于所述第一触发标识的触控操作,进入第一文本转换模式。The toolbar management unit 350 is configured to display a toolbar in a suspended position at a designated position, and the toolbar includes a first trigger mark; if a touch operation acting on the first trigger mark is detected, enter the first text conversion model.
可选的,工具栏管理单元350,具体用于若检测到有作用于所述第一触发标识的触控操作,显示处于第一状态的状态栏,所述处于第一状态的状态栏中包括有文本转换状态标识、文本转换选择控件以及用于退出所述第一文本转换模式的控件。Optionally, the toolbar management unit 350 is specifically configured to display a status bar in the first state if a touch operation acting on the first trigger identifier is detected, and the status bar in the first state includes: There are text conversion state flags, text conversion selection controls, and controls for exiting the first text conversion mode.
其中,所述文本转换状态标识用于表征当前是否有文本正在被转换;所述文本转换选择控件用于对待转换文本的原语言以及转换目标语言进行选择。Wherein, the text conversion status identifier is used to represent whether there is currently text being converted; the text conversion selection control is used to select the original language of the text to be converted and the conversion target language.
可选的,工具栏管理单元350,具体用于若在指定时长内没有作用于所述状态栏的操作,将所述状态栏切换为处于第二状态,所述第二状态的状态栏中包括有所述文本转换状态标识。Optionally, the toolbar management unit 350 is specifically configured to switch the status bar to be in a second state if there is no operation acting on the status bar within a specified period of time, and the status bar of the second state includes: There is the text conversion status flag.
作为一种方式,所述转换包括以下处理方式中的至少一种:对文本进行语种翻译;切换文本的字体样式;以及切换文本的字体大小。In one manner, the conversion includes at least one of the following processing manners: performing language translation on the text; switching the font style of the text; and switching the font size of the text.
可选的,工具栏管理单元350,具体用于若在指定时间段内没有检测到作用于所述工具栏的触控操作,将所述工具栏进行隐藏或者将所述工具栏进行缩小。Optionally, the toolbar management unit 350 is specifically configured to hide the toolbar or reduce the size of the toolbar if no touch operation acting on the toolbar is detected within a specified time period.
作为一种方式,所述工具栏还包括第二触发标识、第三触发标识以及第四触发标识;所述第二触发标识用于触发进入第二转换模式;所述第三触发标识为对当前界面进行标记的标识;所述第四触发标识为调用对应应用程序启动的标识。In one way, the toolbar further includes a second trigger mark, a third trigger mark and a fourth trigger mark; the second trigger mark is used to trigger entering the second conversion mode; the third trigger mark is used to trigger the current The identifier of the interface marking; the fourth trigger identifier is the identifier of calling the corresponding application program to start.
可选的,工具栏管理单元350,具体用于若悬浮显示的所述工具栏中设置有所述第四触发标识,则直接操作所述第四触发标识触发另外的应用程序进行启动。Optionally, the toolbar management unit 350 is specifically configured to directly operate the fourth trigger identifier to trigger another application to start if the fourth trigger identifier is set in the toolbar displayed in the floating display.
本实施例提供的一种文本处理装置,在对第一界面中的第一文本进行转换得到对应的第二文本后,将第二文本显示在层叠在第一界面上的第二界面中,并且若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除,基于所述触控操作对所述第一界面进行操作。从而通过前述方式使得在显示包括有转换结果的第二界面后,若有作用于第二界面的触控操作则会直接关闭第二界面,并直接基于该触控操作来对显示原始文本的第一界面进行操作,从而使得用户可以透过显示转换结果的第二界面直接对显示原始文本的第一界面进行操作,改善了必须要对第二界面执行关闭操作后才能对第一界面进行操作的问题,进而提升了用户体验。In the text processing apparatus provided by this embodiment, after converting the first text in the first interface to obtain the corresponding second text, the second text is displayed in the second interface stacked on the first interface, and If a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is removed from the touch position, based on the touch The operation operates on the first interface. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation. An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.
需要说明的是,本申请中装置实施例与前述方法实施例是相互对应的,装置实施例中具体的原理可以参见前述方法实施例中的内容,此处不再赘述。It should be noted that the apparatus embodiments in the present application correspond to the foregoing method embodiments, and the specific principles in the apparatus embodiments may refer to the content in the foregoing method embodiments, which will not be repeated here.
下面将结合图19对本申请提供的一种电子设备进行说明。An electronic device provided by the present application will be described below with reference to FIG. 19 .
请参阅图19,基于上述的文本处理方法、装置,本申请实施例还提供的另一种可以执行前述文本处理方法的电子设备200。电子设备200包括相互耦合的一个或多个(图中仅示出一个)处理器102、存储器104以及网络模块106。其中,该存储器104中存储有可以执行前述实施例中内容的程序,而处理器102可以执行该存储器104中存储的程序。Referring to FIG. 19 , based on the above text processing method and apparatus, an embodiment of the present application further provides another electronic device 200 that can execute the above text processing method. The electronic device 200 includes one or more (only one shown in the figure) a processor 102, a memory 104, and a network module 106 that are coupled to each other. Wherein, the memory 104 stores a program that can execute the content in the foregoing embodiments, and the processor 102 can execute the program stored in the memory 104 .
其中,处理器102可以包括一个或者多个用于处理数据的核。处理器102利用各种接口和线路连接整个电子设备200内的各个部分,通过运行或执行存储在存储器104内的指令、 程序、代码集或指令集,以及调用存储在存储器104内的数据,执行电子设备200的各种功能和处理数据。可选地,处理器102可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器102可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作***、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器102中,单独通过一块通信芯片进行实现。The processor 102 may include one or more cores for processing data. The processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 200, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 104, and calling the data stored in the memory 104. Various functions of the electronic device 200 and processing data. Optionally, the processor 102 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). A hardware form is implemented. The processor 102 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used for rendering and drawing of the display content; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 102, and is implemented by a communication chip alone.
存储器104可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。存储器104可用于存储指令、程序、代码、代码集或指令集。存储器104可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作***的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。例如,存储器104中可以存储有文本处理的装置。该文本处理的装置可以为前述的装置300。存储数据区还可以存储电子设备200在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 104 may include a random access memory (Random Access Memory, RAM), or may include a read-only memory (Read-Only Memory, ROM). Memory 104 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 104 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing the operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like. For example, the memory 104 may store text processing means. The apparatus for text processing may be the aforementioned apparatus 300 . The storage data area may also store data created during use of the electronic device 200 (eg, phone book, audio and video data, chat record data) and the like.
所述网络模块106用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯,例如和音频播放设备进行通讯。所述网络模块106可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述网络模块106可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。例如,网络模块106可以与基站进行信息交互。The network module 106 is used for receiving and sending electromagnetic waves, realizing mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, for example, communicate with an audio playback device. The network module 106 may include various existing circuit elements for performing these functions, eg, antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, subscriber identity module (SIM) cards, memory, etc. . The network module 106 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network. The aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 106 may interact with the base station for information.
请参考图20,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读存储介质1100中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 20 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable storage medium 1100 stores program codes, and the program codes can be invoked by the processor to execute the methods described in the above method embodiments.
计算机可读存储介质1100可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质1100包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质1100具有执行上述方法中的任何方法步骤的程序代码1110的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1110可以例如以适当形式进行压缩。The computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1100 has storage space for program code 1110 that performs any of the method steps in the above-described methods. These program codes can be read from or written to one or more computer program products. Program code 1110 may be compressed, for example, in a suitable form.
综上所述,本申请提供的一种文本处理方法、装置、电子设备及存储介质,在对第一界面中的第一文本进行转换得到对应的第二文本后,将第二文本显示在层叠在第一界面上的第二界面中,并且若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除,基于所述触控操作对所述第一界面进行操作。从而通过前述方式使得在显示包括有转换结果的第二界面后,若有作用于第二界面的触控操作则会直接关闭第二界面,并直接基于该触控操作来对显示原始文本的第一界面进行操作,从而使得用户可以透过显示转换结果的第二界面直接对显示原始文本的第一界面进行操作,改善了必须要对第二界面执行关闭操作后才能对第一界面进行操作的问题,进而提升了用户体验。To sum up, in the text processing method, device, electronic device and storage medium provided by the present application, after the first text in the first interface is converted to obtain the corresponding second text, the second text is displayed on the stack. In the second interface on the first interface, if a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, the second interface is removed from the second interface. The touch position is removed, and the first interface is operated based on the touch operation. Therefore, after the second interface including the conversion result is displayed, if there is a touch operation acting on the second interface, the second interface will be closed directly, and the first interface displaying the original text will be directly based on the touch operation. An interface is used to operate, so that the user can directly operate the first interface displaying the original text through the second interface displaying the conversion result, which improves the problem that the second interface must be closed before the first interface can be operated. problems, thereby improving the user experience.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征图进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: it can still be Modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements to some of the technical feature diagrams; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of the present application .

Claims (20)

  1. 一种文本处理方法,其中,应用于电子设备,所述方法包括:A text processing method, wherein, applied to an electronic device, the method comprises:
    在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本;stacking and displaying a second interface on the first interface, the second interface includes second text obtained by converting the first text in the first interface;
    若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除;If a touch operation acting on the screen is detected, and the action position of the touch operation is located in the second interface, removing the second interface from the touch position;
    基于所述触控操作对所述第一界面进行操作。The first interface is operated based on the touch operation.
  2. 根据权利要求1所述的方法,其中,所述将所述第二界面从所述触控位置处移除,包括:The method of claim 1, wherein the removing the second interface from the touch location comprises:
    取消显示所述第二界面。Cancel display of the second interface.
  3. 根据权利要求2所述的方法,其中,所述触控操作包括滑动操作,所述基于所述触控操作对所述第一界面进行操作之后还包括:The method according to claim 2, wherein the touch operation comprises a sliding operation, and after the operation on the first interface based on the touch operation further comprises:
    对执行所述滑动操作后的第一界面中的第三文本进行转换,得到第四文本;Converting the third text in the first interface after performing the sliding operation to obtain the fourth text;
    在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述第四文本。A second interface is stacked and displayed on the first interface, and the fourth text is displayed in the second interface.
  4. 根据权利要求3所述的方法,其中,所述在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述第四文本,包括:The method according to claim 3, wherein the displaying a second interface in layers on the first interface, and displaying the fourth text in the second interface, comprises:
    获取所述第三文本的尺寸;obtain the size of the third text;
    基于所述尺寸变换所述第四文本的字体大小,得到字体变换后的第四文本;Transform the font size of the fourth text based on the size to obtain the font-transformed fourth text;
    在所述第一界面上层叠显示第二界面,并在所述第二界面中显示所述字体变换后的第四文本。A second interface is displayed in layers on the first interface, and the fourth text after the font has been transformed is displayed in the second interface.
  5. 根据权利要求3所述的方法,其中,所述屏幕包括多个区域,所述多个区域各自对应的转换方式不同;所述方法还包括:The method according to claim 3, wherein the screen comprises a plurality of areas, and the conversion modes corresponding to the plurality of areas are different; the method further comprises:
    当检测到触控操作后,获取与所述触控操作的作用位置匹配的区域作为目标区域;After detecting the touch operation, acquire the area matching the action position of the touch operation as the target area;
    将所述目标区域对应的转换方式确定为所述触控操作对应的转换方式。The conversion mode corresponding to the target area is determined as the conversion mode corresponding to the touch operation.
  6. 根据权利要求1所述的方法,其中,所述将所述第二界面从所述触控位置处移除,包括:The method of claim 1, wherein the removing the second interface from the touch location comprises:
    缩小所述第二界面的尺寸,以使得所述第二界面从所述触控位置处移除。The size of the second interface is reduced so that the second interface is removed from the touch position.
  7. 根据权利要求6所述的方法,其中,所述触控操作包括滑动操作,所述基于所述触控操作对所述第一界面进行操作之后还包括:The method according to claim 6, wherein the touch operation comprises a sliding operation, and after the operation on the first interface based on the touch operation further comprises:
    对执行所述滑动操作后的第一界面中的第三文本进行转换,得到第四文本;Converting the third text in the first interface after performing the sliding operation to obtain the fourth text;
    将所述第二界面的尺寸恢复到缩小之前的状态,并在所述第二界面中显示所述第四文本。The size of the second interface is restored to the state before the reduction, and the fourth text is displayed in the second interface.
  8. 根据权利要求1所述的方法,其中,所述将所述第二界面从所述触控位置处移除,包括:The method of claim 1, wherein the removing the second interface from the touch location comprises:
    获取所述第一界面中的文本的密集程度;obtaining the density of the text in the first interface;
    若所述第一界面中的文本的密集程度大于密集阈值,则通过取消显示所述第二界面的方式来实现将所述第二界面从所述触控位置处移除;If the density of the text in the first interface is greater than the density threshold, removing the second interface from the touch position by canceling the display of the second interface;
    若所述第一界面中的文本的密集程度不大于所述密集阈值,则通过缩小所述第二界面的尺寸的方式来实现将所述第二界面从所述触控位置处移除。If the density of the text in the first interface is not greater than the density threshold, the second interface is removed from the touch position by reducing the size of the second interface.
  9. 根据权利要求8所述的方法,其中,所述获取所述第一界面中的文本的密集程度,包括:The method according to claim 8, wherein the obtaining the density of the text in the first interface comprises:
    将所述第一界面中当前所显示文本的数量与所述第一界面的面积相比,得到所述第一界面中的文本的密集程度。Comparing the number of texts currently displayed in the first interface with the area of the first interface, the density of the texts in the first interface is obtained.
  10. 根据权利要求1-9任一所述的方法,其中,所述在第一界面上层叠显示第二界面 之前还包括:The method according to any one of claims 1-9, wherein before the layering and displaying the second interface on the first interface further comprises:
    在指定位置悬浮显示工具栏,所述工具栏中包括有第一触发标识;A toolbar is suspended in a designated position, and the toolbar includes a first trigger identifier;
    若检测到有作用于所述第一触发标识的触控操作,进入第一文本转换模式。If a touch operation acting on the first trigger mark is detected, the first text conversion mode is entered.
  11. 根据权利要求10所述的方法,其中,所述方法还包括:The method of claim 10, wherein the method further comprises:
    若在指定时间段内没有检测到作用于所述工具栏的触控操作,将所述工具栏进行隐藏或者将所述工具栏进行缩小。If no touch operation acting on the toolbar is detected within a specified time period, the toolbar is hidden or the toolbar is reduced.
  12. 根据权利要求10所述的方法,其中,所述工具栏还包括第二触发标识、第三触发标识以及第四触发标识;所述第二触发标识用于触发进入第二转换模式;所述第三触发标识为对当前界面进行标记的标识;所述第四触发标识为调用对应应用程序启动的标识。The method according to claim 10, wherein the toolbar further comprises a second trigger mark, a third trigger mark and a fourth trigger mark; the second trigger mark is used to trigger entering the second conversion mode; The third trigger identifier is an identifier for marking the current interface; the fourth trigger identifier is an identifier for calling the corresponding application program to start.
  13. 根据权利要求12所述的方法,其中,所述方法还包括:The method of claim 12, wherein the method further comprises:
    若悬浮显示的所述工具栏中设置有所述第四触发标识,则直接操作所述第四触发标识触发另外的应用程序进行启动。If the fourth trigger mark is set in the toolbar displayed in the floating display, the fourth trigger mark is directly operated to trigger another application to start.
  14. 根据权利要求10所述的方法,其中,所述方法还包括:The method of claim 10, wherein the method further comprises:
    若检测到有作用于所述第一触发标识的触控操作,显示处于第一状态的状态栏,所述处于第一状态的状态栏中包括有文本转换状态标识、文本转换选择控件以及用于退出所述第一文本转换模式的控件。If a touch operation acting on the first trigger mark is detected, a status bar in the first state is displayed, and the status bar in the first state includes a text conversion status indicator, a text conversion selection control, and a A control to exit the first text conversion mode.
  15. 根据权利要求14所述的方法,其中,所述文本转换状态标识用于表征当前是否有文本正在被转换;所述文本转换选择控件用于对待转换文本的原语言以及转换目标语言进行选择。The method according to claim 14, wherein the text conversion status identifier is used to represent whether there is currently text being converted; the text conversion selection control is used to select the original language of the text to be converted and the conversion target language.
  16. 根据权利要求14所述的方法,其中,所述若检测到有作用于所述第一触发标识的触控操作,显示处于第一状态的状态栏之后还包括:The method according to claim 14, wherein, after the displaying the status bar in the first state if a touch operation acting on the first triggering mark is detected, the method further comprises:
    若在指定时长内没有作用于所述状态栏的操作,将所述状态栏切换为处于第二状态,所述第二状态的状态栏中包括有所述文本转换状态标识。If there is no operation acting on the status bar within a specified time period, the status bar is switched to be in a second state, and the status bar of the second state includes the text conversion state identifier.
  17. 根据权利要求1-16任一所述的方法,其中,所述转换包括以下处理方式中的至少一种:对文本进行语种翻译;切换文本的字体样式;以及切换文本的字体大小。The method according to any one of claims 1-16, wherein the conversion includes at least one of the following processing methods: performing language translation on the text; switching the font style of the text; and switching the font size of the text.
  18. 一种文本处理装置,其中,运行于电子设备,所述装置包括:A text processing apparatus, wherein, running on an electronic device, the apparatus includes:
    界面显示单元,用于在第一界面上层叠显示第二界面,所述第二界面中包括有对第一界面中的第一文本进行转换后得到的第二文本;an interface display unit, configured to display a second interface in layers on the first interface, where the second interface includes second text obtained by converting the first text in the first interface;
    界面关闭单元,用于若检测到有作用于屏幕的触控操作,且所述触控操作的作用位置位于所述第二界面内,将所述第二界面从所述触控位置处移除;an interface closing unit, configured to remove the second interface from the touch position if a touch operation acting on the screen is detected and the action position of the touch operation is located in the second interface ;
    界面控制单元,用于基于所述触控操作对所述第一界面进行操作。An interface control unit, configured to operate the first interface based on the touch operation.
  19. 一种电子设备,其中,包括处理器以及存储器;An electronic device, including a processor and a memory;
    一个或多个程序被存储在所述存储器中并被配置为由所述处理器执行以实现权利要求1-17任一所述的方法。One or more programs are stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-17.
  20. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行权利要求1-17任一所述的方法。A computer-readable storage medium, wherein a program code is stored in the computer-readable storage medium, wherein the method of any one of claims 1-17 is executed when the program code is executed by a processor.
PCT/CN2022/071644 2021-02-26 2022-01-12 Text processing method and apparatus, and electronic device and storage medium WO2022179329A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110220954.3 2021-02-26
CN202110220954.3A CN114967994A (en) 2021-02-26 2021-02-26 Text processing method and device and electronic equipment

Publications (3)

Publication Number Publication Date
WO2022179329A1 true WO2022179329A1 (en) 2022-09-01
WO2022179329A9 WO2022179329A9 (en) 2022-10-20
WO2022179329A8 WO2022179329A8 (en) 2023-11-02

Family

ID=82974127

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071644 WO2022179329A1 (en) 2021-02-26 2022-01-12 Text processing method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN114967994A (en)
WO (1) WO2022179329A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080172219A1 (en) * 2007-01-17 2008-07-17 Novell, Inc. Foreign language translator in a document editor
CN104636326A (en) * 2014-12-30 2015-05-20 小米科技有限责任公司 Text message translation method and device
CN110781688A (en) * 2019-09-20 2020-02-11 华为技术有限公司 Method and electronic device for machine translation
CN111401323A (en) * 2020-04-20 2020-07-10 Oppo广东移动通信有限公司 Character translation method, device, storage medium and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002759A (en) * 2018-06-07 2018-12-14 Oppo广东移动通信有限公司 text recognition method, device, mobile terminal and storage medium
CN110119234B (en) * 2019-04-08 2022-09-23 广州视源电子科技股份有限公司 Operation method of intelligent interactive panel, storage medium and related equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080172219A1 (en) * 2007-01-17 2008-07-17 Novell, Inc. Foreign language translator in a document editor
CN104636326A (en) * 2014-12-30 2015-05-20 小米科技有限责任公司 Text message translation method and device
CN110781688A (en) * 2019-09-20 2020-02-11 华为技术有限公司 Method and electronic device for machine translation
CN112183121A (en) * 2019-09-20 2021-01-05 华为技术有限公司 Method and electronic device for machine translation
CN111401323A (en) * 2020-04-20 2020-07-10 Oppo广东移动通信有限公司 Character translation method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114967994A (en) 2022-08-30
WO2022179329A9 (en) 2022-10-20
WO2022179329A8 (en) 2023-11-02

Similar Documents

Publication Publication Date Title
WO2022052832A1 (en) Interface display method and apparatus for application program, device and medium
CN111858522A (en) File sharing method and device, terminal and storage medium
EP4187378A1 (en) Application interface switching method and apparatus, and terminal and storage medium
US10452747B2 (en) Dynamically formatting scalable vector graphics
CN111147660B (en) Control operation method and electronic equipment
KR20130093672A (en) Method, apparatus, and computer program product for overlapped handwriting
CN111476209B (en) Handwriting input recognition method, handwriting input recognition equipment and computer storage medium
US20230117213A1 (en) Page display method and electronic device
CN111767554A (en) Screen sharing method and device, storage medium and electronic equipment
US20220189136A1 (en) Image generation method and apparatus, device, and storage medium
EP4131055A1 (en) Annotation method and electronic device
WO2022179330A1 (en) Text processing method and apparatus, and electronic device and storage medium
WO2022179329A1 (en) Text processing method and apparatus, and electronic device and storage medium
CN112163432A (en) Translation method, translation device and electronic equipment
WO2020124454A1 (en) Font switching method and related product
WO2018194853A1 (en) Enhanced inking capabilities for content creation applications
CN115329720A (en) Document display method, device, equipment and storage medium
WO2021185098A1 (en) Character selection method and apparatus employing character recognition, and terminal device
CN114491087A (en) Text processing method and device, electronic equipment and storage medium
CN113436297A (en) Picture processing method and electronic equipment
CN112328339A (en) Notification message display method and device, storage medium and electronic equipment
CN111399722A (en) Mail signature generation method, device, terminal and storage medium
CN104850316A (en) Method and device for adjusting fonts of electronic books
WO2022252872A1 (en) Device control method and apparatus, electronic device, and storage medium
CN114745585A (en) Subtitle display method, device, terminal and storage medium

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: 22758695

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22758695

Country of ref document: EP

Kind code of ref document: A1