WO2023024566A1 - 一种翻译方法及电子设备 - Google Patents

一种翻译方法及电子设备 Download PDF

Info

Publication number
WO2023024566A1
WO2023024566A1 PCT/CN2022/091046 CN2022091046W WO2023024566A1 WO 2023024566 A1 WO2023024566 A1 WO 2023024566A1 CN 2022091046 W CN2022091046 W CN 2022091046W WO 2023024566 A1 WO2023024566 A1 WO 2023024566A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
text
electronic device
user
translation
Prior art date
Application number
PCT/CN2022/091046
Other languages
English (en)
French (fr)
Inventor
陈佳子
丁一晏
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to EP22859916.3A priority Critical patent/EP4280041A1/en
Priority to US18/547,239 priority patent/US20240134504A1/en
Publication of WO2023024566A1 publication Critical patent/WO2023024566A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • 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/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas

Definitions

  • the present application relates to the technical field of terminals, in particular to a translation method and electronic equipment.
  • electronic devices When a user uses electronic devices such as mobile phones, there may be a need to perform corresponding operations on selected text. For example, the need to translate selected text, the need to share selected text, etc.
  • electronic devices usually provide the following functions: after the mobile phone detects the operation of selecting text by the user, it can display shortcut entries of one or more functions to the user, so that the user can quickly select and use it.
  • the one or more functions may be a copy function, a search function, and the like.
  • the inventors found in the process of implementing the embodiments of the present application that there are at least the following problems in the prior art: the above-mentioned one or more functions are usually only some fixed functions, and it is very likely that they cannot meet the needs of users.
  • the embodiments of the present application provide a translation method and an electronic device, which can intelligently display a shortcut entry for a translation function, and can realize rapid continuous translation.
  • the embodiment of the present application provides a translation method, which can be applied to electronic devices such as mobile phones and tablets that can implement translation functions.
  • the electronic device may display a first interface, and the first interface includes text in the first language.
  • the first language is English.
  • the electronic device may receive a user's first operation (such as a selection operation) on the first text in the first interface.
  • the first text is a text in the first language.
  • the electronic device may trigger recognition of the user's intention to input the first operation. If it is recognized that there is an intention to perform translation, the first control may be displayed on the first interface. The first control is used to trigger the electronic device to perform translation.
  • the electronic device can intelligently recognize the user's intention, and display a shortcut entry (such as the first control) on the first interface, so as to quickly realize the intention.
  • the electronic device may receive a second operation (such as a click operation) by the user on the first control.
  • the electronic device may display a first pop-up window on the first interface, and display a first translation result of the first text in the first pop-up window.
  • the first translation result includes a first translation of the first text, and the first translation is a text in the second language. In this way, a translation is completed.
  • the electronic device may receive the user's third operation on the first interface (such as a click operation on an area other than the first pop-up window).
  • the electronic device closes the first pop-up window in response to the user's third operation on the first interface. That is to say, if there is a demand for continuous translation, the electronic device may not close the first pop-up window, but only close the first pop-up window.
  • the electronic device may receive a fourth user operation (such as a copy operation) on the second text in the first interface.
  • the electronic device can expand the first pop-up window and display the second translation result of the second text in the first pop-up window.
  • the second translation result includes the second translation of the second text.
  • the electronic device may trigger the electronic device to directly display the translation result of the new text only in response to the user's fourth operation on the new text.
  • the electronic device can trigger the display of the first control for performing translation through the first operation input by the user, thereby providing the user with a quick entry to obtain the translation result. And, after a translation is finished, the electronic device may not close the first pop-up window, but put away the first pop-up window, and after the user inputs operations such as selecting or copying new text, the first pop-up window may be automatically expanded. window and display the translation results for the new text.
  • the second language is a default language set by the electronic device
  • the first language is a language other than the second language.
  • the default language set on the electronic device is the language familiar to the user. For example, if Chinese is the native language of the user, the user may set the default language of the electronic device to Chinese. It should be understood that the default language set on the electronic device is a language familiar to the user, and translation is usually not required. On the contrary, the first language is most likely not the language the user is familiar with, so translation is required. In other words, different languages have different translation needs.
  • the electronic device may display a first control in response to the user's first operation on the text in the first language (such as the first text) in the first interface, so that the user can quickly obtain the text in the first language translation results for .
  • the default translation is the translation in the second language, so as to facilitate the user's understanding.
  • the first interface also includes text in the second language, and the electronic device recognizes that the text in the second language (such as the third text) in the first interface does not exist in response to the first operation of the user on the first interface. Translate the requirements so that the first control is not displayed. In short, for the user's first operation on the text in different languages, the electronic device can identify whether there is an intention to perform translation, so as to determine whether to display the first control.
  • the electronic device can display the first control in a targeted manner, so as to accurately satisfy the user's intention to perform translation.
  • the first language is a language supported by a system of the electronic device or an application on the electronic device for translation. If the electronic device does not support translation of the first language, the displayed first control will be unavailable. That is, the translation result cannot be obtained when the user inputs the second operation on the first control.
  • the electronic device can display the first control for the language that the electronic device supports translation.
  • the usability of the first control is improved.
  • the first text is not a URL link, an email address, or a password generated by a machine.
  • URL links, email addresses, and machine-generated passwords are just identifiers used to distinguish different objects. For example, it is used to distinguish different web pages, different mailboxes, different Taobao products, etc., but does not have linguistic meaning. Therefore, for such texts, there is usually no need for translation.
  • the electronic device can display the first control for ordinary text.
  • the first operation includes any one of a selection operation, a copy operation, a long press operation, a line operation, and a double click operation.
  • the fourth operation includes any one of a selection operation, a copy operation, a long press operation, a line operation and a double click operation.
  • the electronic device can flexibly respond to various operations of the user on the text to display the first control. Thereby, the difficulty of fast translation can be reduced. And, the electronic device can flexibly respond to various operations of the user on the text to expand the first pop-up window. Thereby, the difficulty of continuous translation can be reduced.
  • the third operation includes the user's click operation or long press operation on an area outside the first pop-up window in the first interface, or the third operation includes the user's operation on the first The sliding operation of the pop-up window.
  • the electronic device can close the pop-up window in response to the user's operation on the non-pop-up window area or the sliding operation on the pop-up window area. This facilitates continuous translation.
  • the above-mentioned retracting the first pop-up window includes: hiding the first pop-up window, or retracting the first pop-up window to an edge position of the first interface.
  • the electronic device can retract the pop-up window to the edge of the interface or hide the pop-up window instead of closing the pop-up window. This makes it easy to expand again.
  • the electronic device displays at least one second control on the first interface in response to the user's first operation on the first text on the first interface, and the at least one second control uses to trigger the electronic device to add a memo; and/or, at least one second control is used to trigger the electronic device to add a schedule; and/or, at least one second control is used to trigger the electronic device to share to the application; and/or, at least one second The control is used to trigger the electronic device to add favorites; and/or, at least one second control is used to trigger the electronic device to add to the dictionary; and/or, at least one second control is used to trigger the electronic device to open map navigation.
  • the electronic device can not only recognize the intention of performing translation and display a shortcut entry for performing translation, but also recognize other intentions and display a corresponding shortcut entry. So as to meet the various needs of users.
  • the first control includes the first text or the first translation.
  • the electronic device can directly display the text targeted by the first operation or its translation at the shortcut entry.
  • displaying the text targeted by the first operation may facilitate the user to specify the targeted text.
  • Displaying the translation can directly provide the translation result to the user, further improving the efficiency of human-computer interaction.
  • the electronic device displays the first logo on the first interface in response to the user's first operation on the first text on the first interface.
  • the first identifier is used to indicate that the electronic device is recognizing the intention of the user to input the first operation. That is to say, during the process of recognizing the user's intention, the electronic device may display a state of being recognized. Thereby, clear instructions can be provided to the user. Then, the electronic device displays the first control on the first interface in response to the event that the intent recognition is completed.
  • the electronic device can provide the user with an indication during identification, so that the user can know the current state.
  • the electronic device may completely present shortcut entries for realizing intentions in the interface. If there are multiple intents, multiple shortcut entries corresponding to multiple intents are tiled and presented in the interface.
  • the mobile phone may display the interface 404 shown in (c) in FIG. 4 .
  • the interface 404 includes a floating window 405, and the floating window 405 displays three quick entries for performing translation, adding a memo, and sharing to a chat APP. And, the 3 shortcut entrances are displayed in tiles. However, the shortcut entry is complete and tiled in the interface, which may obscure the content of the interface.
  • the above method further includes: when the electronic device does not detect the second operation within a preset time, the electronic device retracts the first control to the edge position of the first interface .
  • the electronic device can put away the first control when the user has not operated the first control for a long time. It should be understood that if the user has not operated the first control for a long time, it may indicate that there is no need for translation. In this case, putting away the first control can reduce the occlusion of the content of the interface, and at the same time, it will not hinder the needs of the user.
  • the electronic device may expand the first control again in response to a user's preset operation (such as a click operation or a slide operation).
  • the method further includes: the electronic device closes the first control in response to a fifth operation of the user.
  • the fifth operation is used to trigger the electronic device to exit the first interface or exit the first application to which the first interface belongs.
  • the second operation is a click operation or a long press operation.
  • the electronic device can display the translation result to the user in response to the user's click operation or long press operation on the first control.
  • the embodiment of the present application further provides an electronic device, where the electronic device supports a translation function.
  • the system of the electronic device or the application installed on the electronic device can be used for translation.
  • the electronic device includes a display screen, memory and one or more processors.
  • the display screen, the memory and the processor are coupled.
  • the memory is used to store computer program codes, the computer program codes include computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the following steps: the electronic device displays a first interface, the The first interface includes text in the first language.
  • the electronic device displays a first control in the first interface in response to a user's first operation on the first text in the first interface; the first text is text in the first language, and the The first control is used to trigger the electronic device to perform translation.
  • the electronic device displays a first pop-up window on the first interface, and displays a first translation result of the first text in the first pop-up window;
  • the first translation result includes a first translation of the first text, and the first translation is a text in a second language.
  • the electronic device closes the first pop-up window in response to a third operation performed by the user on the first interface.
  • the electronic device expands the first pop-up window in response to the user's fourth operation on the second text in the first interface, and displays a second translation result of the second text in the first pop-up window;
  • the second translation result includes the second translation of the second text.
  • the second language is a default language set by the electronic device, and the first language is a language other than the second language; the first The interface also includes text in the second language.
  • the electronic device further executes the following step: the electronic device does not display the third text in the first interface in response to the user's first operation A control; the third text is text in the second language.
  • the first language is a language supported by a system of the electronic device or an application on the electronic device for translation.
  • the first text is not a URL link, an email address, or a password generated by a machine.
  • the first operation includes any one of a selection operation, a copy operation, a long press operation, a line operation, and a double-click operation; and/or, the fourth The operation includes any one of a selection operation, a copy operation, a long-press operation, a line operation, and a double-click operation.
  • the third operation includes a click operation or a long press operation of the user on an area outside the first pop-up window in the first interface, or, the The third operation includes a user's sliding operation on the first pop-up window.
  • the first pop-up window is hidden, or the first pop-up window is retracted to an edge position of the first interface.
  • the electronic device when the computer instructions are executed by the processor, the electronic device further executes the following step: the electronic device responds to the user's response to the first interface In the first operation of the first text, at least one second control is displayed in the first interface, and the at least one second control is used to trigger the electronic device to add a memo; and/or, the at least one second The control is used to trigger the electronic device to add a schedule; and/or, the at least one second control is used to trigger the electronic device to share to the application; and/or, the at least one second control is used to trigger the electronic The device adds favorites; and/or, the at least one second control is used to trigger the electronic device to add to the dictionary; and/or, the at least one second control is used to trigger the electronic device to open map navigation.
  • the first control includes the first text or a translation of the first text.
  • the electronic device displays a first logo on the first interface in response to a user's first operation on the first text on the first interface; the The first identifier is used to indicate that the electronic device is identifying the user's intention to input the first operation.
  • the electronic device further executes the following step: the electronic device displays the first control on the first interface in response to the event that the intent identification is completed .
  • the electronic device when the computer instruction is executed by the processor, the electronic device further performs the following step: when the electronic device fails to detect During the second operation, the electronic device retracts the first control to an edge of the first interface.
  • the electronic device when the computer instruction is executed by the processor, the electronic device further performs the following step: the electronic device responds to the fifth operation of the user, turning off The first control; the fifth operation is used to trigger the electronic device to exit the first interface or exit the first application to which the first interface belongs.
  • the second operation is a click operation or a long press operation.
  • an embodiment of the present application provides a chip system, which is applied to an electronic device including a display screen and a memory; the chip system includes one or more interface circuits and one or more processors; the interface The circuit and the processor are interconnected by a line; the interface circuit is configured to receive a signal from a memory of the electronic device and send the signal to the processor, the signal including computer instructions stored in the memory; When the processor executes the computer instruction, the electronic device executes the method described in the first aspect and any possible design manner thereof.
  • the present application provides a computer storage medium, the computer storage medium includes computer instructions, and when the computer instructions are run on the electronic device, the electronic device executes the first aspect and any possible design method thereof. the method described.
  • the present application provides a computer program product.
  • the computer program product runs on a computer, the computer executes the method described in the first aspect and any possible design manner thereof.
  • Fig. 1 shows one of the schematic diagrams of the mobile phone interface provided by the embodiment of the present application
  • Fig. 2 shows the second schematic diagram of the mobile phone interface provided by the embodiment of the present application
  • Fig. 3 shows the comparative schematic diagram of the scheme of the present application and the conventional technology
  • Fig. 4 shows the third schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • FIG. 5 shows a schematic diagram of a hardware structure of a mobile phone provided by an embodiment of the present application
  • FIG. 6A shows a schematic diagram of a software function module of a mobile phone provided by an embodiment of the present application
  • Fig. 6B shows the fourth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Fig. 7 shows the fifth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Fig. 8 shows the sixth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Fig. 9 shows the seventh schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Figure 10 shows the eighth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Fig. 11 shows the ninth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Figure 12 shows one of the flowcharts of the translation method provided by the embodiment of the present application.
  • Fig. 13 shows the tenth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Figure 14 shows the second flowchart of the translation method provided by the embodiment of the present application.
  • Figure 15 shows the eleventh schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Fig. 16 shows the twelveth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Fig. 17 shows the thirteenth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Figure 18 shows the fourteenth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • Figure 19 shows the fifteenth schematic diagram of the mobile phone interface provided by the embodiment of the present application.
  • FIG. 20 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, “plurality” means two or more.
  • the mobile phone can display a shortcut menu 101, which includes a copy function, a search function, a dashed Quick access to 4 functions including functions and sharing functions.
  • the shortcut menu 101 does not include a translation function.
  • the translation function is blocked by the APP. If the user needs translation, the translation can only be completed by copying the text "enormous” and pasting it into the translation application or translation webpage. In the above translation process, the user needs to jump back and forth between the two applications, which is cumbersome and inefficient.
  • the mobile phone first starts the service of copying and translating.
  • the application settings of the translation APP installed on the mobile phone there is provided a setting item of "click to translate" in the interface 201 shown in (a) of FIG. 2 .
  • the interface 201 includes a button 202 for enabling "click to translate".
  • the copy translation service can be started.
  • the mobile phone can display a shortcut entry for realizing the translation function on any currently displayed interface.
  • the mobile phone can display the interface 203 shown in (b) in Figure 2, which includes a floating window 204 in the interface 203, and the floating window 204 is used to Trigger the mobile phone to translate and copy the text, that is, the floating window 204 is a quick entry for realizing the translation function. Then, after the user copies the text, he clicks on the floating window to get the translation result of the copied text. For example, after the user selects the text "enormous" in the reading interface, the mobile phone may display the interface 205 shown in (c) in FIG. 2 .
  • the interface 205 includes a shortcut menu 206 and a floating window 207 .
  • the mobile phone can copy "enormous" to the clipboard. Then, in response to the user's click operation on the floating window 207, the mobile phone obtains the translation result of the text "enormous" in the clipboard.
  • the user if the user needs to quickly realize the translation function for the copied text, before the user performs the copy operation, the user also needs to manually trigger the mobile phone to enable related services in advance (such as the copy translation service) . After the relevant services are enabled, the mobile phone can display the shortcut entry of the translation function on the interface. Then, after the user performs the translation operation, he can click the shortcut entry to realize the translation function, thereby obtaining the translation result.
  • related services such as the copy translation service
  • the embodiment of the present application provides a translation method, which can be applied to electronic devices such as mobile phones.
  • the electronic device monitors the content change in the clipboard, it will trigger to identify the user's intention to copy the text.
  • the electronic device may display an identification on the current interface indicating that the electronic device is recognizing the user's intention to input the copy operation.
  • the mobile phone may receive a user's copy operation on the text "enormous" in the interface 401 shown in (a) of FIG. 4 .
  • the mobile phone can put the text "enormous" into the clipboard, and can display the interface 402 shown in (b) of FIG. 4 , which includes the logo 403 .
  • the identifier 403 is used to indicate that the mobile phone is identifying the user's intention.
  • the mobile phone can recognize the intent based on the text content of the copied text, user portraits and other data.
  • the electronic device can display a shortcut to realize the intention.
  • the mobile phone recognizes that the user's intention to copy the text "enormous" in (a) in Figure 4 includes: performing translation, adding a memo, and sharing to a chat application
  • the mobile phone can actively display the text in Figure 4.
  • (c) shows an interface 404, which includes a floating window 405, and the floating window 405 includes shortcuts for performing translation, adding memos, and sharing through chat applications.
  • the mobile phone can display the identification in or near the logo 403 in (b) in Figure 4 success information; then, the mobile phone displays the interface 404 shown in (c) in FIG. 4 in response to the user's click operation on the logo 403 .
  • the interface 404 shown in (c) of FIG. 4 multiple intended shortcut entries are displayed in the same floating window 405 .
  • the shortcut entry of each intention can also be displayed in an independent floating window, which is not specifically limited in this embodiment of the present application.
  • the electronic device can realize the corresponding intention according to the user's selection of the shortcut entry. For example, after the user clicks the shortcut entry "translate" in the floating window 405 in the interface 404 shown in (c) of FIG. 4 , the mobile phone can execute the translation. In order to realize the translation intention of the user.
  • the electronic device in the embodiment of the present application can trigger the identification based on the copy operation of the user.
  • the intention of the user so that the intention of the copy operation can be intelligently recognized, without the need for the user to manually enable the corresponding service.
  • the realization of the quick translation function does not depend on the activation of the "click to translate" button 202 shown in (a) of FIG. 2 .
  • the electronic device may provide the user with a shortcut to realize the intention. Therefore, various intentions of users can be flexibly satisfied, and the efficiency of human-computer interaction can be improved.
  • the copy operation shown in (a) in FIG. 4 is mainly used as an example to trigger the identification intention of the mobile phone.
  • the recognition intention of the mobile phone may also be triggered by operations such as selecting text, long-pressing, crossing out, and double-clicking.
  • the operation that triggers the mobile phone's recognition intention may be referred to as the first operation.
  • the interface through which the user inputs the first operation is called the first interface, and the sign indicating that the electronic device is recognizing the intent is called the first sign.
  • the shortcut entry shown in (c) in FIG. 4 is only exemplary, and the recognized intention is not limited thereto during actual implementation.
  • the identified intent may also include one or more of the intents of adding a schedule, sharing to an application, adding a favorite, adding to a dictionary, and opening map navigation.
  • the shortcut entry for realizing the translation intention is called the first control
  • the shortcut entry for realizing other intentions is called the second control.
  • the "translation" shortcut entry in the floating window 405 in the interface 404 shown in (c) of FIG. 4 is called the first control
  • the "memo" and “chat” shortcut entries are called the second control.
  • the electronic device in the embodiment of the present application may be a mobile phone, a smart watch, a bracelet, a tablet computer, a desktop type, a laptop type, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC ), netbooks, and cellular phones, personal digital assistants (personal digital assistant, PDA), augmented reality (augmented reality, AR) ⁇ virtual reality (virtual reality, VR) equipment and other equipment, the embodiment of the present application to the specific form of the equipment No special restrictions are made.
  • FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the mobile phone 500 may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (universal serial bus, USB) interface 530, and a charging management module 540 , power management module 541, battery 542, antenna 1, antenna 2, mobile communication module 550, wireless communication module 560, audio module 570, speaker 570A, receiver 570B, microphone 570C, earphone jack 570D, sensor module 580, button 590, motor 591, an indicator 592, a camera 593, a display screen 594, and a subscriber identification module (subscriber identification module, SIM) card interface 595, etc.
  • SIM subscriber identification module
  • the structure shown in this embodiment does not constitute a specific limitation on the mobile phone 500 .
  • the mobile phone 500 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 510 may include one or more processing units, for example: the processor 510 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit, NPU
  • the controller may be the nerve center and command center of the handset 500 .
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 510 for storing instructions and data.
  • the memory in processor 510 is a cache memory.
  • the memory may hold instructions or data that the processor 510 has just used or recycled. If the processor 510 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 510 is reduced, thus improving the efficiency of the system.
  • the charging management module 540 is used for receiving charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 540 can receive charging input from a wired charger through the USB interface 530 .
  • the charging management module 540 can receive wireless charging input through the wireless charging coil of the mobile phone 500 . While the charging management module 540 is charging the battery 542 , it can also provide power for the mobile phone through the power management module 541 .
  • the power management module 541 is used for connecting the battery 542 , the charging management module 540 and the processor 510 .
  • the power management module 541 receives the input of the battery 542 and/or the charging management module 540, and supplies power for the processor 510, the internal memory 521, the external memory, the display screen 594, the camera 593, and the wireless communication module 560, etc.
  • the power management module 541 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 541 may also be set in the processor 510 .
  • the power management module 541 and the charging management module 540 may also be set in the same device.
  • the wireless communication function of the mobile phone 500 can be realized by the antenna 1, the antenna 2, the mobile communication module 550, the wireless communication module 560, the modem processor and the baseband processor.
  • the mobile phone 500 realizes the display function through the GPU, the display screen 594, and the application processor.
  • the GPU is a microprocessor for image processing, connected to the display screen 594 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 510 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 594 is used to display images, videos and the like.
  • the display screen 594 is the aforementioned folding screen (such as a flexible folding screen or a multi-screen folding screen).
  • Display 594 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED active matrix organic light emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed
  • the mobile phone 500 can realize the shooting function through ISP, camera 593, video codec, GPU, display screen 594 and APP processor.
  • the external memory interface 520 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 500.
  • the external memory card communicates with the processor 510 through the external memory interface 520 to implement a data storage function. Such as saving music, video and other media files in the external memory card.
  • the internal memory 521 may be used to store computer-executable program codes including instructions.
  • the processor 510 executes various functions APP and data processing of the mobile phone 500 by executing instructions stored in the internal memory 521 .
  • the internal memory 521 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the mobile phone 500 .
  • the internal memory 521 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the mobile phone 500 can implement audio functions through an audio module 570 , a speaker 570A, a receiver 570B, a microphone 570C, an earphone interface 570D, and an application processor. Such as music playback, recording, etc.
  • the keys 590 include a power key, a volume key and the like.
  • the key 590 may be a mechanical key. It can also be a touch button.
  • the mobile phone 500 can receive key input and generate key signal input related to user settings and function control of the mobile phone 500 .
  • the motor 591 can generate a vibrating reminder.
  • the motor 591 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 591 can also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 594 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 592 can be an indicator light, which can be used to indicate the charging status, the change of the battery capacity, and can also be used to indicate messages, missed calls, notifications and so on.
  • the SIM card interface 595 is used for connecting a SIM card.
  • the SIM card can be inserted into the SIM card interface 595 or pulled out from the SIM card interface 595 to realize contact and separation with the mobile phone 500 .
  • the mobile phone 500 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 595 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 595 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 595 is also compatible with different types of SIM cards.
  • the SIM card interface 595 is also compatible with external memory cards.
  • the mobile phone 500 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the mobile phone 500 adopts an eSIM, ie, an embedded SIM card.
  • the eSIM card can be embedded in the mobile phone 500 and cannot be separated from the mobile phone 500 .
  • FIG. 6A shows a schematic diagram of software function modules of a mobile phone 500 provided in an embodiment of the present application.
  • the software functional modules of the mobile phone 500 include a perception module 601, a computer vision (computer vision, CV) module 602, a natural language processing (Natural Language Processing, NLP) module 603, a calculation engine 604, a voice (Voice) module 605 , suggestion module 606 and number of applications 607 .
  • the calculation engine 604 further includes an intention prediction module 608 and a service selection module 609 .
  • the perception module 601 can listen to the clipboard after the user copies text in the current interface (also referred to as the first interface), and learn the content of the clipboard (such as the copied text), the clipboard User context such as the source APP (such as news APP, reading APP), copy time, and copy location of the board content.
  • the actions of the functional modules in the mobile phone 500 are essentially the actions of the mobile phone.
  • the action of the sensing module 601 acquiring context information may also be understood as an action of the mobile phone 500 .
  • Other functional modules are also similar, and will not be repeated in this article.
  • the CV module 602 is used to extract the text aligned with the camera by using Optical Character Recognition (OCR) technology after the user aligns the text with the camera, and obtain the text, the source APP of the text, the time of camera acquisition, the acquisition location, etc. user context.
  • OCR Optical Character Recognition
  • the mobile phone may display an interface 601a as shown in FIG. 6B , the interface 601a includes a preview image captured by the camera, and the preview image includes text content 602a.
  • the CV module 602 can extract the text in the text content 602a, and obtain relevant context data.
  • the NLP module 603 can identify the above copied text or the text extracted by the OCR technology. Specifically, the NLP module 603 may recognize that the text is at least one of types such as schedule, link to be shared, Taobao password, and URL. Alternatively, the NLP module 603 can also identify the language of the text.
  • the intent prediction module 608 can identify a user's intent, for example, an intent to copy text or an intent to point a camera at text. After the intents are identified, the intents can be further sorted to select stronger intents.
  • the business selection module 609 can perform single task, multi-task and selection of current business.
  • the voice module 605 can be used for processing voice-related tasks. For example, it can be used to translate translations (such as English) to read aloud. As another example, it can be used to read text (TextToSpeech, TSS).
  • the suggestion module 606 can display the shortcut entry to realize the intention in the current interface.
  • the shortcut entry can be linked to a corresponding APP. That is to say, the suggestion module 606 can invoke an external APP. For example, to implement translation, you need to call the translation APP.
  • the suggestion module 606 may also update the user portrait label according to the user's operation on the shortcut entry.
  • Multiple applications 609 can receive calls and implement intents.
  • the mobile phone can complete the translation method provided in the embodiment of the present application. Specifically, as shown in Figure 6A, including S1-S7:
  • the perception module 601 sends the user context to the intention prediction module 608, so that the intention prediction module 608 can predict the user's intention to copy text.
  • the CV module 602 sends the user context to the intention prediction module 608, so that the intention prediction module 608 can predict the user's intention to point the camera at the text.
  • the solution of the present application is mainly described by taking a scenario in which a mobile phone identification intention is triggered by a copy operation as an example.
  • the translation method provided by the present application can also be used in the above-mentioned scene where the camera is aimed at the text to trigger the recognition intention of the mobile phone (as shown in FIG. 6B ).
  • the intention prediction module 608 receives the user context sent by the perception module 601 , and sends the copied text in the user context to the NLP module 603 .
  • the NLP module 603 receives the copied text sent by the intention prediction module 608, and identifies the type and language of the copied text. For example, identify whether the copied text is an agenda, link, Taobao password, URL, etc. Then, the intention prediction module 608 can identify the user's intention to copy the text according to the user portrait tag, the user history data and/or the recognition result of the NLP module 603 .
  • the user portrait tags mainly include tags such as occupation and age.
  • User historical data mainly refers to the statistical data of various operations performed after copying text in user history, such as frequency and times.
  • the NLP module 603 can identify the user's intention including performing translation. For example, if the default language set on the mobile phone is Simplified Chinese, the first language may be English, Japanese, French, etc. other than Simplified Chinese. Generally speaking, the default language set on the mobile phone is the language the user is familiar with, and there is no need to translate it.
  • the default language set on the mobile phone is called the second language, and the languages other than the second language are called the first language.
  • the NLP module 603 also needs to recognize that the language of the copied text is a preset language, where the preset language refers to a language supported by the translation application on the mobile phone system or mobile phone, so that it can recognize that the user's intention includes Perform translation. If the mobile phone does not support the translation of the language of the copied text at all, the translation result cannot be obtained. In this case, it will be recognized that there is no intention to perform translation.
  • the NLP module 603 also needs to recognize that the copied text is not a URL link, an email address, or a character string with a specific meaning such as a password generated by a machine (such as a Taobao password), so as to recognize the user's intention including performing translation .
  • a character string with a specific meaning such as a password generated by a machine (such as a Taobao password)
  • These above-mentioned character strings with specific meanings are usually just identifiers, for example, used to distinguish different web pages, different mailboxes, different Taobao products, etc., and do not have linguistic meaning. Therefore, there is no need for translation.
  • the intention prediction module 608 sorts the identified intentions, and selects N intentions with the highest scores. Wherein, the intention prediction module 608 may score the identified intention according to the frequency of use of the target function corresponding to the identified intention by the user. For example, recognized intents include performing translations, adding notes, and sharing to chat apps. If in the user's historical usage data, the number of translations performed by the user after copying the text is the highest, the score for the intention to perform translation is the highest. Then, the intent prediction module 608 sends the N intents to the service selection module 609 .
  • the service selection module 609 selects a target function that can realize the N intentions from the mobile phone.
  • the target function includes at least one of functions such as performing translation, adding a schedule reminder, opening map navigation, opening Taobao, and opening Douyin. Then, the service selection module 609 sends the information of the target function to the suggestion module 606 .
  • the service selection module 609 completes the service selection, if the selected target function includes a function requiring voice support, notify the voice module 605 to enable it, so as to assist in realizing the purpose. For example, pronunciation is read aloud to perform translation, and voice navigation is required to open map navigation.
  • the suggestion module 606 displays the shortcut entry of the target function on the current interface (such as the interface where the copied text is located). Moreover, after the shortcut entry is displayed, the suggestion module 605 may receive the user's selection operation on the shortcut entry. The suggestion module 605 may be linked to the corresponding APP in response to the user's selection operation on the shortcut entry (such as a click operation or a long press operation, which may also be referred to as a second operation).
  • the shortcut entry for realizing the intent is completely presented in the interface; if there are multiple intents, multiple shortcut entries corresponding to the multiple intents are tiled and presented in the interface.
  • the mobile phone may display the interface 404 shown in (c) in FIG. 4 .
  • the interface 404 includes a floating window 405, and the floating window 405 displays three quick entries for performing translation, adding a memo, and sharing to a chat APP. And, the 3 shortcut entrances are displayed in tiles.
  • the shortcut entry is complete and tiled in the interface, which may block the content of the interface. Based on this, in some embodiments, after the shortcut entry is displayed, if the mobile phone (such as the suggestion module 606) does not detect the user's selection operation on the shortcut entry within a preset time, the mobile phone can store the shortcut entry to the edge of the interface place. Thus, the occlusion of the interface content can be reduced.
  • the mobile phone displays the floating window 405 in the interface 404 shown in (c) of FIG.
  • the mobile phone can display the interface 701 shown in FIG. 7 .
  • the right edge of the interface 701 includes a floating window 702, and three shortcut entries in the floating window 702 are stacked and displayed.
  • the mobile phone may display the interface 801 shown in (a) of FIG. 8 after only recognizing that there is an intention to perform translation.
  • the interface 801 includes a floating window 802 .
  • the floating window 802 only provides a shortcut entry 803 for implementing translation.
  • the mobile phone may display the interface 804 shown in (b) in FIG. 8 .
  • the right edge of the interface 804 includes a floating window 805, and the floating window 805 only partially displays a shortcut entry 806 for implementing translation.
  • the translation result may also be displayed in the shortcut entry for performing translation.
  • the translation result can be the translated original text (such as copied text) and/or the translated translation.
  • the mobile phone may display the interface 901 shown in FIG. There is a translation of "huge". For example, if the text "enormous" in (a) in Fig. 4 is the original translation, then the translation result "enormous" in Fig. 9 is the translation.
  • the mobile phone can receive the user's operation 1 (also called the fifth operation), which is used to trigger the mobile phone to exit the interface currently displaying the shortcut entry (that is, the current interface), such as operation 1 is the operation of sliding from the left edge of the current interface to the right.
  • operation 1 is used to trigger the mobile phone to exit the application to which the current interface belongs, for example, operation 1 is an operation of sliding upward from the bottom of the current interface.
  • the mobile phone may close the shortcut entry for realizing the intent.
  • the shortcut entry for realizing the intention can be automatically closed, and at the same time, it can Avoid affecting the user's use of mobile phones. There is no need for the user to manually close the corresponding service to trigger the closing of the shortcut entry.
  • the mobile phone may receive the user's operation of sliding up from the bottom of the interface 1001 shown in (a) in FIG. 10 .
  • the mobile phone can display the main interface 1002 shown in (b) in FIG.
  • the main interface 1002 does not include a shortcut entry for implementing translation, while interface 1001 includes a shortcut entry for implementing translation.
  • the mobile phone can trigger the recognition of the user's intention after listening to the content change in the clipboard, or after the camera is aligned with the text, and provide the user with a shortcut to realize the intention .
  • it is convenient for the user to quickly trigger and realize the corresponding intention after copying the text or aiming the camera at the text, improving the efficiency of human-computer interaction.
  • the mobile phone may receive the user's click operation on the floating window 207 in (c) in FIG. 2 .
  • the mobile phone may display the interface 1101 shown in (a) in FIG. 11 .
  • the interface 1101 includes a pop-up window 1102, and the pop-up window 1102 includes a translation result of the copied text "enormous".
  • the pop-up window 1102 also includes a close control “ ⁇ ” 1103 . If the user needs to continue translating, he needs to click the closing control “ ⁇ ” 1103 .
  • the mobile phone can close the pop-up window displaying the translation result, and display the interface 1104 shown in (b) in FIG. 11 .
  • the interface 1104 includes a floating window 1105 .
  • the user can reselect the text "husband” in the interface 1106 shown in (c) in FIG. 11, and click the "Copy” button 1107 to copy the text "husband”.
  • the user needs to further click on the pop-up window 1108 in the interface 1106 shown in (c) in FIG. 11 to trigger a new translation. That is, after the copying of "husband" is completed, the mobile phone can display the interface 1109 shown in (d) in FIG. 11 in response to the user's click operation on the pop-up window 1108 .
  • the interface 1109 includes a pop-up window 1110, and the pop-up window 1110 includes the translation result of the copied text "husband".
  • the embodiment of the present application provides a translation method, which can be applied to mobile phones with the hardware structure and software system shown above.
  • a translation method which can be applied to mobile phones with the hardware structure and software system shown above.
  • multiple consecutive rapid translations can be realized. Specifically, as shown in FIG. 12, S1200-S1204 are included.
  • the mobile phone displays interface a, where interface a includes text in the first language.
  • the interface a is the currently displayed interface, so it may also be referred to as the first interface.
  • the first language refers to a language other than the default language set by the mobile phone. For example, if the default language set on the mobile phone is Simplified Chinese, then the first language can be English, Japanese, French, etc.
  • the mobile phone displays entry a in interface a in response to the user's copy operation on text 1 in interface a.
  • text 1 is the text in the first language
  • entry a is used to trigger the mobile phone to perform translation.
  • text 1 may be referred to as the first text.
  • the copy operation is an operation that triggers the recognition intention of the mobile phone, so it can also be called the first operation.
  • Entry a is a shortcut entry for performing translation, so it can also be called the first control.
  • the mobile phone may trigger the mobile phone to recognize the intention of the copy operation. If the text 1 is a text in the first language, the mobile phone can recognize that the intention of the copy operation includes the intention of performing translation. Wherein, if the first language is not the default language set on the mobile phone, it is very likely that the user intends to perform translation. For example, the text 1 needs to be translated into the default language set by the mobile phone.
  • the first language also needs to be a preset language (that is, a language supported by the mobile phone system or an application on the mobile phone); and/or, the text 1 cannot be a URL link, an email address, or a password generated by a machine.
  • the mobile phone can recognize that there is an intention to perform translation.
  • the intention of the user to copy text 1 in interface a is only to perform translation.
  • the entry displayed by the mobile phone in interface a is usually only entry a.
  • the interface 801 shown in (a) in FIG. 8 is the display result corresponding to the first case.
  • the interface 801 only includes a shortcut entry 803 for triggering the mobile phone to perform translation, that is, the shortcut entry 803 is entry a.
  • the intention of the user to copy the text 1 in the interface a includes performing translation and other intentions, and the other intentions may be at least one of the intention of adding a schedule, the intention of sharing, and the intention of adding a memo.
  • the interface 404 shown in (c) in FIG. 4 is the display result corresponding to the second case.
  • the floating window 405 in the interface 404 not only has a shortcut entry for performing translation (namely entry a), but also has a shortcut entry for adding a memo and a shortcut entry for sharing to a chat APP.
  • the mobile phone actively recognizes the user's execution of translation and displays the entry a for illustration, it is not limited to this in actual implementation.
  • the entry a may also be displayed after the user starts a related service (such as copying and translation service) in advance.
  • the entry a may be displayed in the floating window for a long time after the mobile phone is started.
  • the interface a also includes the text in the default language set by the mobile phone (that is, the second language)
  • the mobile phone responds to the user's copy operation of the text 4 (also called the third text) in the interface a.
  • Interface a displays entry a.
  • the text 4 is the text of the default language set by the mobile phone. That is to say, if the copy operation is aimed at the default language set by the mobile phone, the mobile phone will not recognize that there is an intention to perform translation, so entry a will not be displayed.
  • the mobile phone after the mobile phone displays the entry a, the mobile phone can be triggered to translate the text 1 copied by the user through the entry a. In this way, after the entry a is displayed, the mobile phone can quickly present the translation result of text 1 without the need for the user to select again. Specifically, as shown in S1202a below:
  • the mobile phone In response to the user's operation 2 on entry a, the mobile phone displays pop-up window a in interface a, and displays the translation result of text 1 in pop-up window a.
  • operation 2 may trigger the mobile phone to perform translation, so this operation 2 may also be called the second operation.
  • Pop-up window a may be called the first pop-up window.
  • the translation result of Text 1 may be referred to as a first translation result.
  • the translation result of text 1 includes the translation of text 1.
  • This translation of text 1 may be referred to as the first translation.
  • the translation of the text 1 is the text in the default language set by the mobile phone, so as to facilitate the user's understanding.
  • the translation may be performed by the mobile phone system or a translation application on the mobile phone.
  • the mobile phone may receive the user's operation 2 on entry a.
  • the operation 2 may be a click operation or a long press operation.
  • ⁇ operation 2 takes operation 2 as a click operation as an example.
  • text 1 is the text "enormous" in the interface 401 shown in (a) in FIG. 4
  • entry a is the shortcut entry 803 in the interface 801 shown in (a) in FIG. 8
  • the mobile phone may receive the user's click operation on the shortcut entry 803 in the interface 801 shown in (a) of FIG. 8 .
  • the mobile phone can display the interface a 1301 shown in (a) in FIG. 13 in response to the user's click operation on the shortcut entry 803 in the interface 801 shown in (a) in FIG. 8 .
  • the interface 1301 includes a pop-up window a 1302.
  • the translation result of "enormous" is displayed in the pop-up window a 1302. For example, translate the original text "enormous" and the translated text "huge; gigantic; enormous”.
  • the pop-up window a also includes a translation identifier.
  • the translation mark may be a translation icon and/or a translation character, which is used to indicate that the function of the pop-up window a is to display a translation result.
  • the popup window a 1302 in the interface a 1301 shown in (a) of FIG. 13 includes a translation identifier 1305.
  • the pop-up window a further includes a language switch button, which is used to trigger the mobile phone to switch between the language of the original text and the language of the translated text.
  • a language switch button which is used to trigger the mobile phone to switch between the language of the original text and the language of the translated text.
  • the popup window a 1302 in the interface a 1301 shown in (a) of FIG. 13 includes a language switching button 1306.
  • the pop-up window a further includes a control a for triggering the mobile phone to close the pop-up window a (for details, please refer to the description in S1203).
  • the popup window a 1302 in the interface a 1301 shown in (a) of FIG. 13 includes a control a 1307.
  • the pop-up window a further includes a control b for triggering the mobile phone to close the pop-up window a.
  • the “ ⁇ ” button 1308 in the pop-up window a 1302 in the interface a 1301 shown in (a) of FIG. 13 is the control b.
  • the mobile phone may receive a user's click operation or long press operation on the control b. In response to the user's click operation or long press operation on the control b, the mobile phone can close the pop-up window a, and display the entry a in the interface a. In this way, the pop-up window a can be quickly closed after the translation result is obtained. Thereby improving the efficiency of human-computer interaction.
  • the pop-up window a 1302 is close to the bottom of the interface a 1301.
  • the pop-up window a for displaying the translation result may be different according to the location of the translated original text (such as text 1).
  • the pop-up window not to block the original translation.
  • the text "enormous” is located near the upper edge of the interface a 1301
  • the pop-up window a 1302 is displayed near the bottom of the interface a 1301.
  • the text "dramatic" is located near the lower edge of the interface a 1303, and the pop-up window a 1304 is displayed near the top of the interface a 1303.
  • the pop-up window displayed near the lower edge of the interface a will be used as an example for illustration.
  • S1202a it is mainly illustrated by directly triggering the mobile phone to translate text 1 through entry a after displaying entry a.
  • the user can also re-copy the text in the interface a (denoted as text 2), and then trigger the translation of the re-copied text through the entry a.
  • the translation of any text in interface a can be flexibly triggered through entry a.
  • the above S1202a may be replaced by S1202b.
  • the mobile phone After the mobile phone detects that the user copies the text 2 in the interface a, the mobile phone responds to the user's operation 2 on the entry a, and displays a pop-up window a in the interface a.
  • the pop-up window a includes the translation result of the text 2.
  • the mobile phone may receive the copy operation of the user on the text 2 in the interface a.
  • text 2 is different from text 1, but not always.
  • Text 2 can also be the same as Text 1.
  • the mobile phone may receive the user's operation 2 on entry a.
  • operation 2 refer to the relevant description in S1202a above, and details will not be repeated here.
  • the mobile phone closes the pop-up window a to the edge of the interface a in response to the user's operation 3 on the interface a.
  • operation 3 may be referred to as a third operation.
  • the mobile phone may receive the user's operation 3 on the interface a.
  • the operation 3 may be a click operation or a long press operation by the user on an area of the interface a other than the pop-up window a.
  • the interface a1601 shown in (a) of FIG. 16 includes a pop-up window a 1602, and operation 3 may be a click operation on an area of the interface a 1601 except the pop-up window a 1602. Such as the click operation on position 1603.
  • operation 3 can be the user’s sliding operation from the upper edge of the pop-up window a to the lower edge of the interface a; if the pop-up window a is close to the top of the interface a, then operation 3 can be The user slides from the lower edge of pop-up window a to the upper edge of interface a.
  • take pop-up window a near the bottom of interface a as an example.
  • the interface a 1604 shown in (b) in FIG. 16 includes a pop-up window a 1605, and operation 3 may be a sliding operation from the upper edge of the pop-up window a 1605 to the lower edge of the interface a 1604.
  • the pop-up window a includes a control a
  • the control a is used to trigger the mobile phone to close the pop-up window a.
  • operation 3 may be a click operation or a long press operation on the control a by the user.
  • the interface a 1606 shown in (c) of FIG. 16 includes a pop-up window a 1607
  • the pop-up window a 1607 includes a control a 1608.
  • Operation 3 may be a user's click operation on the control a 1608.
  • the mobile phone may display the interface a 1701 shown in FIG. 17 in response to the user's click operation on a position 1603 outside the pop-up window a 1602 in the interface a 1601 shown in (a) in FIG. 16 .
  • the interface a 1701 includes a pop-up window a 1702. The difference from the pop-up window a 1602 in (a) in FIG. 16 is that the pop-up window a 1702 in FIG. 17 is collapsed at the lower edge of the interface a 1701, rather than completely displayed in the interface a 1701.
  • the pop-up window a cannot be fully presented in the interface a.
  • the translation result is not displayed in the closed pop-up window a, but the translation logo, control b and/or control c may be displayed.
  • the control c is used to trigger the mobile phone to expand the pop-up window a.
  • the interface a 1701 shown in FIG. 17 includes a pop-up window a 1702 in a collapsed state, and the pop-up window a 1702 does not include translation results, but shows a translation mark 1703, a " ⁇ " button 1705 (ie, control b) and Control c 1704 .
  • the user can trigger the mobile phone to expand the pop-up window a by operating 4 on the interface a, so as to quickly view the last copied text (text 1 or text 2 ) translation results.
  • operation 4 can be the user’s sliding operation from the lower edge of the pop-up window a to the upper edge of the interface a; if the pop-up window a is close to the top of the interface a, then operation 4 can be The user slides from the upper edge of pop-up window a to the lower edge of interface a. For example, take pop-up window a near the bottom of interface a as an example. Operation 4 may be a sliding operation by the user from the lower edge of the pop-up window a 1802 in the interface a 1801 shown in (a) of FIG. 18 to the upper edge of the interface a 1801.
  • operation 4 may be a user's click operation on control c.
  • operation 4 may be the user's click operation on the control c 1805 in the pop-up window a 1804 in the interface a 1803 shown in (b) in FIG. 18 .
  • the last copied text is "enormous".
  • the mobile phone can display the interface shown in (a) in FIG. a 1301.
  • the interface a 1301 includes a pop-up window a 1302, and the translation result of "enormous" is displayed in the pop-up window a 1302.
  • the mobile phone may also hide the pop-up window a in response to the user's operation 3 on the interface a, so as to minimize the occupation of the interface a.
  • the user can trigger the mobile phone to expand the pop-up window a by copying a new text (such as text 3), so as to quickly view the translation result of the new text. Specifically, as shown in S1204 below.
  • the mobile phone In response to the user's copy operation on the text 3 in the interface a, the mobile phone expands a pop-up window a in the interface a, and displays the translation result of the text 3 in the pop-up window a.
  • the text 3 can be in any language, for example, it can be the default language set in the mobile phone. This text 3 can be called the second text.
  • the translation result of text 3 may be called the second translation result.
  • the translation result of text 3 includes the translation of text 3, and the translation of text 3 may be called the second translation. If Text 3 is not the default language of the mobile phone, the translation of Text 3 is the text of the default language set by the mobile phone; if Text 3 is the default language of the mobile phone, the language of the translation of Text 3 is usually the translation that is often selected by the user Language, or the default translation language (such as English) of the translation function of the mobile phone.
  • the mobile phone may receive the copy operation of the user on the text 3 in the interface a.
  • text 3 may be different from text 1 and text 2, or may be the same as text 1 or text 2.
  • the mobile phone may receive a user's selection operation on the text 3 in the interface a.
  • the electronic device may display a shortcut menu in interface a.
  • the shortcut menu includes two shortcut entries of "Copy" and "Search".
  • the mobile phone can receive the user's click operation on the "copy" shortcut entry in the interface a 1903 shown in (b) in Figure 19, and the mobile phone can display the interface a 1905 shown in (c) in Figure 19.
  • the difference from the interface a 1903 is that the pop-up window a 1904 in the interface a 1905 is in the expanded state, and the translation result of "I am standing in the...the Northern Rockies" is displayed in the pop-up window a 1906.
  • the pop-up window a1904 in the interface a1903 is in the collapsed state.
  • the mobile phone may repeatedly execute S1203 and S1204 to complete more than two consecutive translations. For example, if the third translation is to be continued, the mobile phone may close the pop-up window a through S1203. Then the mobile phone can display the translation result of the new text through S1204.
  • the mobile phone can close the pop-up window for displaying the translation result in response to the user's operation 3 . Then, the mobile phone can directly trigger another translation in response to the copying operation of the new text by the user, expand the collapsed pop-up window, and display the copying result of the new text in the expanded pop-up window. That is to say, compared with the conventional technology, in the process of multiple consecutive translations, as long as the pop-up window is not closed, after the user copies the new text, the mobile phone can directly trigger the mobile phone to translate the new text and display the translation result. There is no need for the user to manually trigger the translation again after copying the new text. Thereby, the rapidity of continuous translation can be improved.
  • an electronic device which may include: the above-mentioned display screen (such as a touch screen), a memory, and one or more processors.
  • the display screen, memory and processor are coupled.
  • the memory is used to store computer program code comprising computer instructions.
  • the processor executes the computer instructions, the electronic device can execute various functions or steps performed by the mobile phone in the foregoing method embodiments.
  • the structure of the electronic device reference may be made to the structure of the electronic device 500 shown in FIG. 2 .
  • the chip system 2000 includes at least one processor 2001 and at least one interface circuit 2002 .
  • the processor 2001 and the interface circuit 2002 can be interconnected through lines.
  • interface circuit 2002 may be used to receive signals from other devices, such as memory of an electronic device.
  • the interface circuit 2002 may be used to send signals to other devices (such as the processor 2001).
  • the interface circuit 2002 can read instructions stored in the memory, and send the instructions to the processor 2001 .
  • the electronic device may be made to execute various steps in the foregoing embodiments.
  • the chip system may also include other discrete devices, which is not specifically limited in this embodiment of the present application.
  • the embodiment of the present application also provides a computer storage medium, the computer storage medium includes computer instructions, and when the computer instructions are run on the above-mentioned electronic device, the electronic device is made to perform the various functions or steps performed by the mobile phone in the above-mentioned method embodiment .
  • the embodiment of the present application also provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute each function or step performed by the mobile phone in the method embodiment above.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.

Landscapes

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

Abstract

本申请提供一种翻译方法及电子设备,涉及终端技术领域,可以实现快速连续翻译。其中,电子设备显示第一界面,第一界面中包括第一语言的文本。电子设备响应于用户对第一界面中第一文本的第一操作,在第一界面中显示第一控件。第一文本是第一语言的文本,第一控件用于触发电子设备执行翻译。电子设备响应于用户对第一控件的第二操作,在第一界面显示第一弹窗,在第一弹窗显示第一翻译结果。第一翻译结果中包括第一文本的译文。电子设备响应于用户对第一界面的第三操作,收起第一弹窗。电子设备响应于用户对第一界面中第二文本的第四操作,展开第一弹窗,在第一弹窗显示第二翻译结果。

Description

一种翻译方法及电子设备
本申请要求于2021年8月27日提交国家知识产权局、申请号为202110996636.6、发明名称为“一种翻译方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种翻译方法及电子设备。
背景技术
在用户使用手机等电子设备的过程中,可能会存在针对选中的文本执行相应的操作的需求。例如,翻译选中的文本的需求、分享选中的文本的需求等。为了满足用户的上述需求,电子设备中通常提供有如下功能:手机在检测到用户选中文本的操作后,可以向用户显示一种或多种功能的快捷入口,以便用户快速选择使用。例如,该一种或多种功能可以是复制功能、搜索功能等。
然而,发明人在实施本申请实施例的过程中发现,现有技术中至少存在如下问题:上述一种或多种功能通常仅仅是一些固定的功能,极有可能无法满足用户的需求。
发明内容
本申请实施例提供一种翻译方法及电子设备,可以智能的显示实现翻译功能的快捷入口,并且可以实现快速连续翻译。
第一方面,本申请实施例提供一种翻译方法,可应用于手机、平板等可以实现翻译功能的电子设备。其中,电子设备可显示第一界面,第一界面中包括第一语言的文本。如,第一语言是英语。电子设备可接收用户对第一界面中第一文本的第一操作(如选中操作)。其中,第一文本是第一语言的文本。电子设备响应于用户对第一界面中第一文本的第一操作,则可以触发识别用户输入第一操作的意图。若识别出存在执行翻译的意图,则可在第一界面中显示第一控件。第一控件用于触发电子设备执行翻译。也就是说,电子设备可以智能的识别用户的意图,并在第一界面中显示快捷入口(如第一控件),以便快捷的实现意图。在显示第一控件后,电子设备可接收用户对该第一控件的第二操作(如点击操作)。电子设备响应于用户对第一控件的第二操作,可以在第一界面显示第一弹窗,在第一弹窗显示第一文本的第一翻译结果。第一翻译结果中包括第一文本的第一译文,第一译文是第二语言的文本。如此,在完成了一次翻译。
而后,若有连续翻译的需求,则电子设备可接收用户对第一界面的第三操作(如对非第一弹窗的区域的点击操作)。电子设备响应于用户对第一界面的第三操作,收起第一弹窗。也就是说,若存在连续翻译的需求,则电子设备可不关闭第一弹窗,而只是将第一弹窗收起。再后,电子设备可接收用户对第一界面中第二文本的第四操作(如复制操作)。电子设备响应于用户对第一界面中第二文本的第四操作,则可以展开第一弹窗,并在第一弹窗显示第二文本的第二翻译结果。第二翻译结果中包括第二文本的第二译文。如此,在电子设备收起第一弹窗后,电子设备可以仅响应于用户对新的文本的第四操作,而触发电子设备直接显示该新的文本的翻译结果。
综上所述,采用本申请实施例的方法,电子设备可以通过用户输入的第一操作来触发显示执行翻译的第一控件,从而为用户提供了获取翻译结果的快捷入口。以及,在一次翻译结束后,电子设备可以不关闭第一弹窗,而是将第一弹窗收起,并在用户输入对新的文本的选中或者复制等操作后,可以自动展开第一弹窗并显示新的文本的翻译结果。相较于现有技术中在每次翻译完成后关闭弹窗,并在复制新的文本后需要再次点击快捷入口才能触发显示新的翻译结果的方式,本申请中在用户输入对新的文本的选中或者复制等操作后,自动展开第一弹窗并显示新的文本的翻译结果,可以简化连续翻译的操作,提高连续翻译的效率。
在第一方面的另一种可能的设计方式中,第二语言是电子设备设置的默认语言,第一语言是除第二语言之外的语言。通常而言,电子设备设置的默认语言是用户熟悉的语言。例如,汉语是用户的母语,则用户可能会将电子设备的默认语言设置为中文。应理解,该电子设备设置的默认语言是用户熟悉的语言,则通常是无需翻译的。相反的,第一语言则极有可能不是用户熟悉的语言,因此需要翻译。也就是说,不同语言对应的翻译需求是不同的。
在一种情况中,电子设备响应于用户对第一界面中第一语言的文本(如第一文本)的第一操作,可显示第一控件,以供用户快捷的获取该第一语言的文本的翻译结果。并且,该情况下显示的翻译结果中,默认翻译为第二语言的译文,以方便用户理解。在另一种情况中,第一界面中还包括第二语言的文本,电子设备响应于用户对第一界面中第二语言的文本(如第三文本)的第一操作,则识别为不存在翻译需求,从而不显示第一控件。简言之,针对用户对不同语言的文本的第一操作,电子设备可以识别是否存在执行翻译的意图,从而确定是否显示第一控件。
也就是说,采用本实施例的方法,电子设备可以有针对性的显示第一控件,从而准确的满足用户执行翻译的意图。
在第一方面的另一种可能的设计方式中,第一语言是电子设备的系统或者电子设备上的应用支持翻译的语言。若电子设备不支持翻译该第一语言,则会导致显示的第一控件不可用。即,用户输入对第一控件的第二操作,无法获取到翻译结果。
也就是说,采用本实施例的方法,电子设备可以针对电子设备支持翻译的语言显示第一控件。从而提高第一控件的可用性。
在第一方面的另一种可能的设计方式中,第一文本不是网址链接、邮箱或者利用机器生成的口令。通常而言,网址链接、邮箱以及利用机器生成的口令(如淘口令)都只是标识符,用于区别不同的对象。例如,用于区别不同的网页、不同的邮箱、不同的淘宝商品等,而并不具备语言上的含义。因此,对于这类文本,通常不存在翻译需求。
也就是说,采用本实施例的方法,电子设备可以针对普通的文本显示第一控件。
在第一方面的另一种可能的设计方式中,第一操作包括选中操作、复制操作、长按操作、划线操作和双击操作中的任一种。和/或,第四操作包括选中操作、复制操作、长按操作、划线操作和双击操作中的任一种。
也就是说,采用本实施例的方法,电子设备可以灵活响应用户对文本的各种操作而显示第一控件。从而可以降低快捷翻译的难度。以及,电子设备可以灵活响应用户对文本的各种操作而展开第一弹窗。从而可以降低连续翻译的难度。
在第一方面的另一种可能的设计方式中,第三操作包括用户对第一界面中第一弹窗之外的区域的点击操作或者长按操作,或者,第三操作包括用户对第一弹窗的滑动操作。
也就是说,采用本实施例的方法,电子设备可以响应于用户对非弹窗区域的操作,或者对弹窗区域的滑动操作,而收起弹窗。从而方便连续翻译。
在第一方面的另一种可能的设计方式中,上述收起第一弹窗,包括:隐藏第一弹窗,或者,将第一弹窗收起至第一界面的边缘位置。
也就是说,采用本实施例的方法,电子设备可以将弹窗收起至界面边缘或者隐藏弹窗,而不是关闭弹窗。从而方便再次展开。
在第一方面的另一种可能的设计方式中,电子设备响应于用户对第一界面中第一文本的第一操作,在第一界面中显示至少一个第二控件,至少一个第二控件用于触发电子设备添加备忘录;和/或,至少一个第二控件用于触发电子设备添加日程;和/或,至少一个第二控件用于触发电子设备分享到应用;和/或,至少一个第二控件用于触发电子设备添加收藏;和/或,至少一个第二控件用于触发电子设备添加到词典;和/或,至少一个第二控件用于触发电子设备打开地图导航。
也就是说,采用本实施例的方法,电子设备不仅可以识别出执行翻译的意图并显示实现执行翻译的快捷入口,也可以识别出其他意图并显示相应的快捷入口。从而可以满足用户的各种需求。
在第一方面的另一种可能的设计方式中,第一控件中包括第一文本或者第一译文。
也就是说,采用本实施例的方法,电子设备可以直接将第一操作针对的文本或者其译文显示在快捷入口处。其中,显示第一操作针对的文本,则可以方便用户明确针对的文本。显示译文则可以直接将翻译结果提供给用户,进一步提升人机交互的效率。
在第一方面的另一种可能的设计方式中,电子设备响应于用户对第一界面中第一文本的第一操作,在第一界面中显示第一标识。第一标识用于指示电子设备正在识别用户输入第一操作的意图。也就是说,电子设备在识别用户的意图的过程中,可以显示处于识别中的状态。从而可以向用户提供明确的指示。而后,电子设备响应于意图识别完成的事件,在第一界面中显示第一控件。
也就是说,采用本实施例的方法,电子设备可以向用户提供识别中的指示,以便用户明确当前所处的状态。
在第一方面的另一种可能的设计方式中,通常情况下,为了方便用户操作,电子设备可将实现意图的快捷入口完整的呈现在界面内。若意图有多个,则将多个意图对应的多个快捷入口平铺呈现在界面内。例如,手机可显示图4中的(c)示出的界面404。该界面404中包括悬浮窗405,悬浮窗405中显示有执行翻译、添加备忘录、分享到聊天APP共3个意图的快捷入口。并且,该3个快捷入口平铺显示。但是,快捷入口完整且平铺呈现在界面内,可能会遮挡界面内容。基于此,在第一界面中显示第一控件之后,上述方法还包括:当电子设备在预设时间内未检测到第二操作时,电子设备将第一控件收起至第一界面的边缘位置。
也就是说,采用本实施例的方法,电子设备可以在用户长时间未操作第一控件的情况下,收起第一控件。应理解,用户长时间未操作第一控件,则可以表明未产生翻译需求。该情况下,收起第一控件,可以减少对界面内容的遮挡,同时也不会妨碍用户的需求。
另外,在收起第一控件后,电子设备可以响应于用户的预设操作(如点击操作、滑动操作),再次展开第一控件。
在第一方面的另一种可能的设计方式中,在第一界面显示第一弹窗之后,方法还包括:电子设备响应于用户的第五操作,关闭第一控件。第五操作用于触发电子设备退出第一界面或者退出第一界面所属的第一应用。
也就是说,采用本实施例的方法,相较于常规技术中开启相应的服务(如复制翻译的服务)后则长期显示快捷入口的方式,本申请方案中可以在用户的意图消失后,自动关闭实现意图的快捷入口,同时可以避免影响用户使用手机。而无需用户来手动关闭相应的服务以触发关闭快捷入口。从而提高第一控件的智能显示与关闭。
在第一方面的另一种可能的设计方式中,第二操作是点击操作或者长按操作。
也就是说,采用本实施例的方法,电子设备响应于用户对第一控件的点击操作或者长按操作,则可向用户显示翻译结果。
第二方面,本申请实施例还提供一种电子设备,所述电子设备支持翻译功能。例如,所述电子设备的系统或者所述电子设备上安装的应用可以用于翻译。所述电子设备包括显示屏、存储器和一个或多个处理器。所述显示屏、所述存储器和所述处理器耦合。所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述计算机指令被所述处理器执行时,使得所述电子设备执行如下步骤:电子设备显示第一界面,所述第一界面中包括第一语言的文本。所述电子设备响应于用户对所述第一界面中第一文本的第一操作,在所述第一界面中显示第一控件;所述第一文本是所述第一语言的文本,所述第一控件用于触发所述电子设备执行翻译。所述电子设备响应于用户对所述第一控件的第二操作,在所述第一界面显示第一弹窗,在所述第一弹窗显示所述第一文本的第一翻译结果;所述第一翻译结果中包括所述第一文本的第一译文,所述第一译文是第二语言的文本。所述电子设备响应于用户对所述第一界面的第三操作,收起所述第一弹窗。所述电子设备响应于用户对所述第一界面中第二文本的第四操作,展开所述第一弹窗,在所述第一弹窗显示所述第二文本的第二翻译结果;所述第二翻译结果中包括所述第二文本的第二译文。
在第二方面的另一种可能的设计方式中,所述第二语言是所述电子设备设置的默认语言,所述第一语言是除所述第二语言之外的语言;所述第一界面中还包括所述第二语言的文本。当所述计算机指令被所述处理器执行时,使得所述电子设备还执行如下步骤:所述电子设备响应于用户对所述第一界面中第三文本的第一操作,不显示所述第一控件;所述第三文本是所述第二语言的文本。
在第二方面的另一种可能的设计方式中,所述第一语言是所述电子设备的系统或者所述电子设备上的应用支持翻译的语言。
在第二方面的另一种可能的设计方式中,所述第一文本不是网址链接、邮箱或者利用机器生成的口令。
在第二方面的另一种可能的设计方式中,所述第一操作包括选中操作、复制操作、长按操作、划线操作和双击操作中的任一种;和/或,所述第四操作包括选中操作、复制操作、长按操作、划线操作和双击操作中的任一种。
在第二方面的另一种可能的设计方式中,所述第三操作包括用户对所述第一界面中所述第一弹窗之外的区域的点击操作或者长按操作,或者,所述第三操作包括用户对所述第 一弹窗的滑动操作。
在第二方面的另一种可能的设计方式中,隐藏所述第一弹窗,或者,将所述第一弹窗收起至所述第一界面的边缘位置。
在第二方面的另一种可能的设计方式中,当所述计算机指令被所述处理器执行时,使得所述电子设备还执行如下步骤:所述电子设备响应于用户对所述第一界面中第一文本的第一操作,在所述第一界面中显示至少一个第二控件,所述至少一个第二控件用于触发所述电子设备添加备忘录;和/或,所述至少一个第二控件用于触发所述电子设备添加日程;和/或,所述至少一个第二控件用于触发所述电子设备分享到应用;和/或,所述至少一个第二控件用于触发所述电子设备添加收藏;和/或,所述至少一个第二控件用于触发所述电子设备添加到词典;和/或,所述至少一个第二控件用于触发所述电子设备打开地图导航。
在第二方面的另一种可能的设计方式中,所述第一控件中包括所述第一文本或者所述第一文本的译文。
在第二方面的另一种可能的设计方式中,所述电子设备响应于用户对所述第一界面中第一文本的第一操作,在所述第一界面中显示第一标识;所述第一标识用于指示所述电子设备正在识别用户输入所述第一操作的意图。当所述计算机指令被所述处理器执行时,使得所述电子设备还执行如下步骤:所述电子设备响应于所述意图识别完成的事件,在所述第一界面中显示所述第一控件。
在第二方面的另一种可能的设计方式中,当所述计算机指令被所述处理器执行时,使得所述电子设备还执行如下步骤:当所述电子设备在预设时间内未检测到所述第二操作时,所述电子设备将所述第一控件收起至所述第一界面的边缘位置。
在第二方面的另一种可能的设计方式中,当所述计算机指令被所述处理器执行时,使得所述电子设备还执行如下步骤:所述电子设备响应于用户的第五操作,关闭所述第一控件;所述第五操作用于触发所述电子设备退出所述第一界面或者退出所述第一界面所属的第一应用。
在第二方面的另一种可能的设计方式中,所述第二操作是点击操作或者长按操作。
第三方面,本申请实施例提供一种芯片系统,该芯片系统应用于包括显示屏和存储器的电子设备;所述芯片系统包括一个或多个接口电路和一个或多个处理器;所述接口电路和所述处理器通过线路互联;所述接口电路用于从所述电子设备的存储器接收信号,并向所述处理器发送所述信号,所述信号包括所述存储器中存储的计算机指令;当所述处理器执行所述计算机指令时,所述电子设备执行如第一方面及其任一种可能的设计方式所述的方法。
第四方面,本申请提供一种计算机存储介质,该计算机存储介质包括计算机指令,当所述计算机指令在电子设备上运行时,使得电子设备执行如第一方面及其任一种可能的设计方式所述的方法。
第五方面,本申请提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如第一方面及其任一种可能的设计方式所述的方法。
可以理解地,上述提供的第二方面所述的电子设备,第三方面所述的芯片系统,第四方面所述的计算机存储介质,第五方面所述的计算机程序产品所能达到的有益效果,可参考第一方面及其任一种可能的设计方式中的有益效果,此处不再赘述。
附图说明
图1示出了本申请实施例提供的手机界面的示意图之一;
图2示出了本申请实施例提供的手机界面的示意图之二;
图3示出了本申请方案与常规技术的对比示意图;
图4示出了本申请实施例提供的手机界面的示意图之三;
图5示出了本申请实施例提供的一种手机的硬件结构示意图;
图6A示出了本申请实施例提供的一种手机的软件功能模块的示意图;
图6B示出了本申请实施例提供的手机界面的示意图之四;
图7示出了本申请实施例提供的手机界面的示意图之五;
图8示出了本申请实施例提供的手机界面的示意图之六;
图9示出了本申请实施例提供的手机界面的示意图之七;
图10示出了本申请实施例提供的手机界面的示意图之八;
图11示出了本申请实施例提供的手机界面的示意图之九;
图12示出了本申请实施例提供的翻译方法的流程图之一;
图13示出了本申请实施例提供的手机界面的示意图之十;
图14示出了本申请实施例提供的翻译方法的流程图之二;
图15示出了本申请实施例提供的手机界面的示意图之十一;
图16示出了本申请实施例提供的手机界面的示意图之十二;
图17示出了本申请实施例提供的手机界面的示意图之十三;
图18示出了本申请实施例提供的手机界面的示意图之十四;
图19示出了本申请实施例提供的手机界面的示意图之十五;
图20为本申请实施例提供的一种芯片系统的结构示意图。
具体实施方式
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
为便于对本申请方案的理解,下面以电子设备是手机为例,说明常规技术以及常规技术中存在的技术问题。
在常规技术中,有一些应用(Application,APP)屏蔽了特定功能,如,屏蔽了翻译功能。相应的,在这些应用中,手机在检测到用户选中文本的操作后,向用户显示的一种或多种功能的快捷入口中通常不包括这些特定功能的快捷入口。从而无法满足用户对特定功能使用需求,会降低人机交互的效率。
示例性的,如图1所示,在某APP(如阅读APP)中,用户选中文本内容“enormous”后,手机可显示快捷菜单101,该快捷菜单101中包括复制功能、搜索功能、划线功能以及分享功能共4种功能的快捷入口。很显然,快捷菜单101中并不包括翻译功能。也就是说,翻译功能被该APP屏蔽了。若用户存在翻译的需求,则只能先复制该文本内容“enormous”,而后粘贴到翻译应用或者翻译网页中,才能完成翻译。上述翻译过程中,用户需要在两个应用之间来回跳转,操作繁琐且效率低下。
为了解决上述应用屏蔽特定功能所导致的问题,针对翻译功能,常规技术中还提供有一种改进的方案,具体如下:手机先启动复制翻译的服务。例如,在手机安装的翻译APP的应用设置中,提供有如图2中的(a)示出的界面201中的“点选翻译”设置项。该界面201中包括启用“点选翻译”的按钮202。用户点击该按钮202则可开启复制翻译的服务。在手机启动复制翻译的服务后,手机可在任意当前显示的界面上显示实现翻译功能的快捷入口。例如,在手机启动复制翻译的服务后,若进入阅读APP的阅读界面,手机可显示图2中的(b)示出的界面203,该界面203中包括悬浮窗204,该悬浮窗204用于触发手机翻译复制文本,即该悬浮窗204为实现翻译功能的快捷入口。而后,在用户复制文本后,点击悬浮窗,则可得到复制文本的翻译结果。例如,用户在阅读界面中选中文本“enormous”后,手机可显示图2中的(c)示出的界面205。该界面205中包括快捷菜单206和悬浮窗207。手机响应于用户对快捷菜单205中“复制”按钮的点击操作,可将“enormous”复制到剪切板。而后,手机响应于用户对悬浮窗207的点击操作,则得到剪切板中文本“enormous”的翻译结果。
如图3所示,在上述改进的方案中,若用户需要针对复制文本快捷的实现翻译功能,则在用户执行复制操作前,用户还需要手动触发手机提前开启相关服务(如复制翻译的服务)。在开启相关服务后,手机才能在界面中显示翻译功能的快捷入口。而后,用户在执行翻译操作后,才可以通过点击该快捷入口来实现翻译功能,从而获得翻译结果。
很显然,在上述改进的方案中,用户需要提前开启相关服务,而后才能在复制文本后通过点击快捷入口实现特定功能。若用户未及时开启相关服务,则无法快捷的实现特定功能,该方案的智能性很差。
基于上述常规技术中的问题,本申请实施例提供了一种翻译的方法,该方法可应用于手机等电子设备。如图3所示,在本申请实施例中,电子设备在监听到剪切板中的内容变化后,则会触发识别用户复制文本的意图。应理解,在用户执行对文本的复制操作后,复制的文本则会被存入剪切板中,从而剪切板中的内容会发生变化。因此,剪切板中的内容变化后,也即用户输入复制操作后。在一些实施例中,在用户输入复制操作后,电子设备可以在当前界面中显示用于指示电子设备正在识别用户输入复制操作的意图的标识。示例性的,手机可接收用户对图4中的(a)示出的界面401中的文本“enormous”的复制操作。手机响应于该复制操作,可将文本“enormous”放入剪切板,并可显示图4中的(b)示出的界面402,该界面402中包括标识403。该标识403用于指示手机正在识别用户的意图。例如,手机可根据复制文本的文本内容、用户画像等数据识别出意图。
在识别出意图后,电子设备则可显示实现意图的快捷入口。示例性的,在手机识别出用户对图4中的(a)中的文本“enormous”的复制操作的意图包括:执行翻译、添加备忘录和分享到聊天应用后,手机则可主动显示图4中的(c)示出的界面404,该界面404中包括悬浮窗405,该悬浮窗405中包括执行翻译、添加备忘录和通过聊天应用分享的快捷入口。或者,在手机识别出用户对图4中的(a)中的文本“enormous”的复制操作的意图后,手机可在图4中的(b)中的标识403中或者标识403的附近显示识别成功的信息;而后,手机响应于用户对该标识403的点击操作,才显示图4中的(c)示出的界面404。应注意,图4中的(c)示出的界面404中,在同一个悬浮窗405中显示多个意图的快捷入口。但是实际实施,也可以将每个意图的快捷入口显示在独立的悬浮窗中,本申请实施例 并不对此做具体限定。
而后,电子设备根据用户对快捷入口的选择,可以实现相应的意图。例如,在用户点击图4中的(c)示出的界面404中悬浮窗405中“翻译”快捷入口后,手机则可执行翻译。从而实现用户的翻译意图。
综上所述,采用本申请实施例的方法,相较于常规技术中需要用户预先手动开启相应服务以快捷实现特定功能的方案,本申请实施例中电子设备可基于用户的复制操作而触发识别用户的意图,从而可以智能的识别出复制操作的意图,而无需用户手动开启相应服务。例如,快捷翻译功能的实现,不依赖于图2中的(a)中示出的“点选翻译”的按钮202的开启。并且,在识别出意图后,电子设备可将实现意图的快捷入口提供给用户。从而可以灵活满足用户的各种意图,提高人机交互的效率。
应注意,在本申请实施例中,主要以如图4中的(a)中示出的复制操作为例,来触发手机识别意图。但是实际实施时,并不以此为限。例如,也可以以对文本的选中操作、长按操作、划线操作、双击操作等操作触发手机识别意图。并且,为便于说明,在本文中,可将触发手机识别意图的操作称为第一操作。以及,将用户输入第一操作的界面称为第一界面,将指示电子设备正在识别意图的标识称为第一标识。
另外,图4中的(c)示出的快捷入口仅为示例性的,实际实施时,识别出的意图不仅限于此。例如,识别出的意图还可以包括添加日程、分享到应用、添加收藏、添加到词典和打开地图导航等意图中一项或多项。并且,为便于说明,在本文中,将实现翻译意图的快捷入口称为第一控件,而将实现其他意图的快捷入口称为第二控件。例如,将图4中的(c)示出的界面404中悬浮窗405中“翻译”快捷入口称为第一控件,将“备忘录”、“聊天”快捷入口称为第二控件。
示例性的,本申请实施例中的电子设备可以是手机、智能手表、手环、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等设备,本申请实施例对该设备的具体形态不作特殊限制。
下面将结合附图对本申请实施例的实施方式进行详细描述。
请参考图5,为本申请实施例提供的一种电子设备的结构示意图。如图5所示,以电子设备是手机500为例,手机500可以包括处理器510,外部存储器接口520,内部存储器521,通用串行总线(universal serial bus,USB)接口530,充电管理模块540,电源管理模块541,电池542,天线1,天线2,移动通信模块550,无线通信模块560,音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,传感器模块580,按键590,马达591,指示器592,摄像头593,显示屏594,以及用户标识模块(subscriber identification module,SIM)卡接口595等。
可以理解的是,本实施例示意的结构并不构成对手机500的具体限定。在另一些实施例中,手机500可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器510可以包括一个或多个处理单元,例如:处理器510可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU), 图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以是手机500的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器510中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器510中的存储器为高速缓冲存储器。该存储器可以保存处理器510刚用过或循环使用的指令或数据。如果处理器510需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器510的等待时间,因而提高了系统的效率。
充电管理模块540用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块540可以通过USB接口530接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块540可以通过手机500的无线充电线圈接收无线充电输入。充电管理模块540为电池542充电的同时,还可以通过电源管理模块541为手机供电。
电源管理模块541用于连接电池542,充电管理模块540与处理器510。电源管理模块541接收电池542和/或充电管理模块540的输入,为处理器510,内部存储器521,外部存储器,显示屏594,摄像头593,和无线通信模块560等供电。电源管理模块541还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块541也可以设置于处理器510中。在另一些实施例中,电源管理模块541和充电管理模块540也可以设置于同一个器件中。
手机500的无线通信功能可以通过天线1,天线2,移动通信模块550,无线通信模块560,调制解调处理器以及基带处理器等实现。
手机500通过GPU,显示屏594,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏594和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器510可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏594用于显示图像,视频等。该显示屏594是上述折叠屏(如柔性折叠屏或多屏折叠屏)。显示屏594包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。
手机500可以通过ISP,摄像头593,视频编解码器,GPU,显示屏594以及APP处理器等实现拍摄功能。
外部存储器接口520可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机500的存储能力。外部存储卡通过外部存储器接口520与处理器510通信,实现数据存储功能。例如将音乐,视频等媒体文件保存在外部存储卡中。
内部存储器521可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器510通过运行存储在内部存储器521的指令,从而执行手机500的各种功能APP以 及数据处理。内部存储器521可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机500使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器521可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
手机500可以通过音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
按键590包括开机键,音量键等。按键590可以是机械按键。也可以是触摸式按键。手机500可以接收按键输入,产生与手机500的用户设置以及功能控制有关的键信号输入。
马达591可以产生振动提示。马达591可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏594不同区域的触摸操作,马达591也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器592可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口595用于连接SIM卡。SIM卡可以通过插入SIM卡接口595,或从SIM卡接口595拔出,实现和手机500的接触和分离。手机500可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口595可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口595可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口595也可以兼容不同类型的SIM卡。SIM卡接口595也可以兼容外部存储卡。手机500通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,手机500采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在手机500中,不能和手机500分离。
请参考图6A,其示出本申请实施例提供的一种手机500的软件功能模块的示意图。如图6A所示,手机500的软件功能模块包括感知模块601、计算机视觉(computer vision,CV)模块602、自然语言处理(Natural Language Processing,NLP)模块603、计算引擎604、语音(Voice)模块605、建议模块606和多个应用607。其中,计算引擎604进一步包括意图预测模块608和业务选择模块609。
如图6A所示,感知模块601可以在用户在当前界面(也可以称为第一界面)中复制文本后,监听剪切板,以及获知剪切板内容(如复制的文本)、该剪切板内容的来源APP(如新闻APP、阅读APP)、复制时间、复制地点等用户上下文。应理解,手机500中的功能模块的动作,实质就是手机的动作。例如,感知模块601获取上下文信息的动作也可以理解为手机500的动作。其它功能模块也类似,本文中将不再赘述。
CV模块602用于在用户使用相机对准文字后,采用光学字符识别(Optical Character Recognition,OCR)技术提取相机对准的文字,并获取文字、文字的来源APP、相机采集的时间、采集地点等用户上下文。示例性的,在打开手机的相机功能后,手机可显示如图6B所示界面601a,该界面601a中包括摄像头采集的预览图像,预览图像中包括文本内容602a。此时,CV模块602则可以提取文本内容602a中的文字,并获取相关上下文数据。
NLP模块603可以识别上述复制文本或者OCR技术提取的文本。具体的,NLP模块603可以识别出文本为日程、待分享链接、淘宝口令、网址等类型中的至少一种。或者,NLP模块603还可以识别出文本的语种。
意图预测模块608可以识别用户的意图,例如,识别复制文本的意图或者识别相机对准文字的意图。在识别出意图后,还可以进一步对意图排序,从而选出较强的意图。业务选择模块609可以进行单任务、多任务以及对当前业务的选择。
voice模块605可以用于语音相关任务的处理。例如,可以用于翻译译文(如英文)的发音朗读。又如,可以用于朗读文本(TextToSpeech,TSS)。
建议模块606可以将实现意图的快捷入口展示在当前界面中。其中,该快捷入口可链接至相应的APP。也就是说,建议模块606可调用外部的APP。例如,实现执行翻译则需调用翻译APP。并且,建议模块606还可以根据用户对快捷入口的操作来更新用户画像标签。
多个应用609可接收调用并实现意图。
利用上述软件系统,手机可完成本申请实施例提供的翻译方法。具体的,如图6A所示,包括S1-S7:
S1、感知模块601将用户上下文发送给意图预测模块608,以供意图预测模块608预测用户复制文本的意图。或者,CV模块602将用户上下文发送给意图预测模块608,以供意图预测模块608预测用户将相机对准文字的意图。应注意,在本文实施例中,主要以复制操作触发手机识别意图的场景为例来说明本申请方案。但是实际实施时,并不以此为限,本申请提供的翻译方法还可以用于上述相机对准文字触发手机识别意图的场景(如图6B所示的场景)中。
S2、意图预测模块608接收感知模块601发送来的用户上下文,并将该用户上下文中的复制文本发送给NLP模块603。NLP模块603接收意图预测模块608发送来的复制文本,并识别复制文本的类型和语种。例如,识别复制文本是否为日程、链接、淘宝口令、网址等等。而后,意图预测模块608可以根据用户画像标签、用户历史数据和/或NLP模块603的识别结果,识别用户复制文本的意图。其中,用户画像标签主要包括职业、年龄等标签。用户历史数据主要是指用户历史复制文本后执行的各种操作的统计数据,如频率、次数。
示例性的,以执行翻译为例。若NLP模块603识别出复制文本的语言不是手机当前的系统语言(即手机设置的默认语言),则可以识别出用户的意图包括执行翻译。例如,手机设置的默认语言是简体中文,则第一语言可以是英文、日文、法文等除简体中文之外的语言。通常而言,手机设置的默认语言是用户熟悉的语言,无需对其进行翻译。
在本文中,为了方便说明,将手机设置的默认语言称为第二语言,将第二语言之外的语言称为第一语言。
在一些实施例中,NLP模块603还需要识别出复制文本的语言是预设语言,其中,预设语言是指手机系统或者手机上的翻译应用支持翻译的语言,才可以识别出用户的意图包括执行翻译。若手机根本不支持翻译复制文本的语言,则无法得到翻译结果,针对该情况,则将识别为不存在执行翻译的意图。
在另一些实施例中,NLP模块603还需要识别出复制文本不是网址链接、邮箱或者利用机器生成的口令(如淘宝口令)等具有特定含义的字符串,才可以识别出用户的意图包 括执行翻译。上述这些具有特定含义的字符串,通常只是标识符,例如,用于区别不同的网页、不同的邮箱、不同的淘宝商品等,并不具备语言上的含义。因此,不存在翻译的需求。
S3、意图预测模块608对识别出的意图排序,从中选出得分最高的N个意图。其中,意图预测模块608可以根据用户对识别出的意图对应的目标功能的使用频次,对识别出的意图打分。例如,识别出的意图包括执行翻译、添加备忘录和分享到聊天应用。若在用户的历史使用数据中,用户复制文本后执行翻译的次数最多,则执行翻译的意图得分最高。而后,意图预测模块608将该N个意图发送给业务选择模块609。
S4、业务选择模块609在接收到N个意图后,从手机中选中可以实现该N个意图的目标功能。示例性的,目标功能包括执行翻译、添加日程提醒、打开地图导航、打开淘宝、打开抖音等功能中的至少一种。而后,业务选择模块609将目标功能的信息发送给建议模块606。
S5、在业务选择模块609完成业务选择后,若选择的目标功能中包括需要语音支持的功能,则通知voice模块605开启,以辅助实现意图。例如,执行翻译需要朗读发音、打开地图导航需要语音导航。
S6、建议模块606在接收到目标功能后,在当前界面(如复制文本所在界面)上显示目标功能的快捷入口。并且,在显示快捷入口后,建议模块605可接收用户对快捷入口的选择操作。建议模块605响应于用户对快捷入口的选择操作(如点击操作或者长按操作,也可以称为第二操作),可链接至相应的APP。
其中,为了方便用户操作,通常是将实现意图的快捷入口完整的呈现在界面内;若意图有多个,则将多个意图对应的多个快捷入口平铺呈现在界面内。例如,手机可显示图4中的(c)示出的界面404。该界面404中包括悬浮窗405,悬浮窗405中显示有执行翻译、添加备忘录、分享到聊天APP共3个意图的快捷入口。并且,该3个快捷入口平铺显示。
应理解,快捷入口完整且平铺呈现在界面内,可能会遮挡界面内容。基于此,在一些实施例中,在显示快捷入口后,若手机(如建议模块606)在预设时间内未检测到用户对快捷入口的选择操作,手机可将快捷入口收起到界面的边缘处。从而可以减少对界面内容的遮挡。
示例性的,在手机显示图4中的(c)示出的界面404中悬浮窗405中执行翻译、添加备忘录、分享到聊天APP的3个快捷入口后,若手机在预设时间内未检测到用户对上述3个快捷入口的操作,手机可显示图7示出的界面701。该界面701的右边缘处包括悬浮窗702,该悬浮窗702中的3个快捷入口堆叠显示。
又示例性的,在仅识别出存在执行翻译的意图后,手机可显示图8中的(a)示出的界面801。该界面801中包括悬浮窗802。该悬浮窗802中仅提供有实现执行翻译的快捷入口803。而后,若手机在预设时间内未检测到用户对快捷入口803的点击操作,手机可显示图8中的(b)示出的界面804。该界面804的右边缘处包括悬浮窗805,该悬浮窗805中仅部分显示实现执行翻译的快捷入口806。
应注意,上述图8中的(a)的示例中,在识别出执行翻译的意图后,仅显示了实现执行翻译的快捷入口。在一些实施例中,在识别出执行翻译的意图后,还可以在执行翻译的快捷入口中显示翻译结果。其中,该翻译结果可以是翻译原文(如复制文本)和/或翻译译 文。如此,手机可以根据识别出的执行翻译的意图直接呈现翻译结果。从而可以快速满足用户执行翻译的意图。
示例性的,在识别出存在执行翻译的意图后,手机可显示图9示出的界面901,该界面901中包括悬浮窗902,悬浮窗902中显示有实现执行翻译的快捷入口903,还显示有翻译结果“庞大的”。例如,若图4中的(a)中的文本“enormous”是翻译原文,那么图9中的翻译结果“庞大的”为翻译译文。
另外,在显示实现意图的快捷入口后,手机可接收用户的操作1(也可以称为第五操作),该操作1用于触发手机退出当前显示快捷入口的界面(即当前界面),如操作1是从当前界面左边缘向右滑动的操作。或者,该操作1用于触发手机退出当前界面所属的应用,如操作1是从当前界面底部向上滑动的操作。手机响应于该操作1,可关闭实现意图的快捷入口。如此,相较于常规技术中开启相应的服务(如复制翻译的服务)后则长期显示快捷入口的方式,本申请方案中可以在用户的意图消失后,自动关闭实现意图的快捷入口,同时可以避免影响用户使用手机。而无需用户来手动关闭相应的服务以触发关闭快捷入口。
示例性的,以操作1是从当前界面底部向上滑动的操作为例。手机可接收用户从图10中的(a)示出的界面1001底部向上滑动的操作。手机响应于用户从图10中的(a)示出的界面1001底部向上滑动的操作,可显示图10中的(b)示出的主界面1002。该主界面1002中不包括实现执行翻译的快捷入口,而界面1001中包括实现执行翻译的快捷入口。
S7、多个应用609中的任一应用在接收到来自建议模块605的调用请求后,则启动应用以供用户实现相应的意图。
由此可见,采用本申请实施例的方法,手机可以在监听到剪切板中的内容变化后,或者在相机对准文字后触发识别用户的意图,并且将实现该意图的快捷入口提供给用户。从而可以方便用户在复制文本或者相机对准文字后,快捷的触发实现相应的意图,提高人机交互效率。
进一步的,针对执行翻译的意图,在如图2中的(a)、图2中的(b)和图2中的(c)所示的常规技术中,每完成一次翻译后,用户需要关闭翻译结果(第1步操作),再次选中新的文本(第2步操作)并复制(第3步操作),而后再次点击翻译功能的快捷入口(第4步操作)才能完成下一次翻译,即至少4步操作才能完成下一次翻译。从而导致连续翻译的过程十分复杂。
示例性的,用户在复制图2中的(c)中的文本“enormous”后,手机可接收用户对图2中的(c)中的悬浮窗207的点击操作。手机响应于用户对悬浮窗207的点击操作,可显示图11中的(a)示出的界面1101。该界面1101中包括弹窗1102,弹窗1102中包括有复制文本“enormous”的翻译结果。弹窗1102中还包括有关闭控件“×”1103。若用户需要继续翻译,则需点击该关闭控件“×”1103。手机响应于用户对关闭控件“×”1103的点击操作,可关闭显示有翻译结果的弹窗,并显示图11中的(b)示出的界面1104。该界面1104中包括悬浮窗1105。在关闭翻译结果后,用户可重新选中图11中的(c)示出的界面1106中的文本“husband”,点击“复制”按钮1107,从而复制文本“husband”。而后,用户需要进一步点击图11中的(c)示出的界面1106中的弹窗1108,才能触发新一次的翻译。即,在完成对“husband”的复制后,手机响应于用户对弹窗1108的点击操作,才可显示图11中的(d)示出的界面1109。该界面1109中包括弹窗1110,弹窗1110中包括复 制文本“husband”的翻译结果。
基于此,本申请实施例提供一种翻译方法,可应用于具有前文所示的硬件结构和软件系统的手机。在本实施例中,针对识别出存在执行翻译的意图的情况,可实现连续多次快速翻译。具体的,如图12所示,包括S1200-S1204。
S1200、手机显示界面a,界面a中包括第一语言的文本。
其中,界面a即为当前显示的界面,因此也可以称为第一界面。第一语言是指除手机设置的默认语言之外的语言。例如,手机设置的默认语言是简体中文,那么第一语言可以是英文、日文、法文等。
S1201、手机响应于用户对界面a中文本1的复制操作,在界面a中显示入口a。其中,文本1为第一语言的文本,入口a用于触发手机执行翻译。
其中,文本1可以称为第一文本。复制操作是一种触发手机识别意图的操作,因此也可以称为第一操作。入口a是执行翻译的快捷入口,因此也可以称为是第一控件。
手机响应于用户对界面a中文本1的复制操作,可以触发手机识别该复制操作的意图。该文本1是第一语言的文本,则手机可以识别出该复制操作的意图包括执行翻译的意图。其中,第一语言不是手机设置的默认语言,则极有可能用户存在执行翻译的意图。例如,需要将该文本1翻译为手机设置的默认语言。
在一些实施例中,第一语言还需要是预设语言(即手机系统或者手机上的应用支持翻译的语言);和/或,文本1还不能是网址链接、邮箱或者利用机器生成的口令。此时,手机才能识别出存在执行翻译的意图。
其中,用户复制界面a中文本1的意图包括执行翻译的意图的情况有两种:
第一种,用户复制界面a中文本1的意图仅为执行翻译的意图。在第一种情况中,手机在界面a中显示的入口通常仅有入口a。例如,图8中的(a)示出的界面801就是第一种情况对应的显示结果。该界面801中仅包括用于触发手机执行翻译的快捷入口803,即快捷入口803为入口a。
第二种,用户复制界面a中文本1的意图包括执行翻译和其他意图,该其他意图可以是添加日程意图、分享意图、添加备忘录意图等中的至少一个。例如,图4中的(c)示出的界面404就是第二种情况对应的显示结果。该界面404中的悬浮窗405中不仅有执行翻译的快捷入口(即入口a),还有添加备忘录的快捷入口和分享到聊天APP的快捷入口。
在下文实施例中,主要是上述第一种情况来说明本申请方案。
应注意,在本实施例中,虽然仅以手机主动识别出用户的执行翻译并显示入口a的场景来说明,但是实际实施时,并不以此为限。例如,该入口a也可以是用户预先开启相关服务(如复制翻译的服务)后显示的。或者,该入口a可以是启动手机后就长期显示在悬浮窗中的。
与S1201不同的是,若界面a中还包括手机设置的默认语言(即第二语言)的文本,手机响应于用户对界面a中文本4(也可以称为第三文本)的复制操作,不在界面a中显示入口a。其中,文本4为手机设置的默认语言的文本。也就是说,若复制操作针对的是手机设置的默认语言,手机则不会识别出存在执行翻译的意图,从而不会显示入口a。
在本申请实施例中,手机在显示入口a后,则可通过该入口a来触发手机对用户复制的文本1进行翻译。如此,在显示入口a后,无需用户再次选择,手机可以快捷的呈现文 本1的翻译结果。具体的,如下S1202a所示:
S1202a、手机响应于用户对入口a的操作2,在界面a中显示弹窗a,并在弹窗a中显示文本1的翻译结果。
其中,操作2可以触发手机执行翻译,因此该操作2也可以称为第二操作。弹窗a可以称为第一弹窗。文本1的翻译结果可称为第一翻译结果。
其中,文本1的翻译结果中包括文本1的译文。该文本1的译文可以称为第一译文。默认情况下,该文本1的译文是手机设置的默认语言的文本,以便于用户理解。
其中,可以由手机系统或者是手机上的翻译应用来执行翻译。
在S1202a之前,手机可接收用户对入口a的操作2。该操作2可以是点击操作或者长按操作。
示例性的,以操作2是点击操作为例。假设文本1是图4中的(a)示出的界面401中的文本“enormous”,入口a是图8中的(a)示出的界面801中的快捷入口803。手机可接收用户对图8中的(a)示出的界面801中的快捷入口803的点击操作。手机响应于用户对图8中的(a)示出的界面801中的快捷入口803的点击操作,可显示图13中的(a)示出的界面a 1301。该界面1301中包括弹窗a 1302。弹窗a 1302中显示有“enormous”的翻译结果。例如,翻译原文“enormous”和翻译译文“巨大的;庞大的;极大的”。
在一些实施例中,弹窗a中还包括翻译标识。该翻译标识可以是翻译图标和/或翻译字符,用于指示弹窗a的作用是显示翻译结果。例如,图13中的(a)示出的界面a 1301中的弹窗a 1302中包括翻译标识1305。
在另一些实施例中,弹窗a中还包括语种切换按钮,用于触发手机切换翻译原文的语种和翻译译文的语种。例如,图13中的(a)示出的界面a 1301中的弹窗a 1302中包括语种切换按钮1306。
在另一些实施例中,弹窗a中还包括控件a,用于触发手机收起弹窗a(具体可参见S1203中的说明)。例如,图13中的(a)示出的界面a 1301中的弹窗a 1302中包括控件a1307。
在另一些实施例中,弹窗a中还包括控件b,用于触发手机关闭弹窗a。例如,图13中的(a)示出的界面a 1301中的弹窗a 1302中的“×”按钮1308即为控件b。并且,手机可接收用户对控件b的点击操作或者长按操作。手机响应于用户对控件b的点击操作或者长按操作,可关闭弹窗a,并在界面a中显示入口a。如此,可以在得到翻译结果后,快速关闭弹窗a。从而提高人机交互效率。
在上述图13中的(a)示出的界面1301中,弹窗a 1302靠近界面a 1301的底部。实际实施时,并不以此为限。示例性的,用于显示翻译结果的弹窗a可以随翻译原文(如文本1)所在位置的不同而不同。通常情况下,弹窗以不遮挡翻译原文为宜。例如,图13中的(a)所示的界面a 1301中,文本“enormous”位于界面a 1301中靠近上边缘的位置,则弹窗a 1302显示在界面a 1301中靠近底部的位置。又如,图13中的(b)所示的界面a1303中,文本“dramatic”位于界面a 1303中靠近下边缘的位置,则弹窗a 1304显示在界面a 1303中靠近顶部的位置。
下文实施例中,将主要以在界面a中靠近下边缘的位置显示弹窗为例来说明。
上述关于S1202a中,主要以显示入口a后,直接通过入口a来触发手机翻译文本1 来说明。而在另一些实施例中,在显示入口a后,用户也可以重新复制界面a中的文本(记为文本2),而后通过入口a来触发对该重新复制的文本进行翻译。如此,可以通过入口a灵活的触发对界面a中任意文本的翻译。具体地,如图14所示,上述S1202a可以替换为S1202b。
S1202b、在手机检测到用户复制界面a中的文本2后,手机响应于用户对入口a的操作2,在界面a中显示弹窗a。其中,弹窗a中包括文本2的翻译结果。
在S1202b之前,手机可接收用户对界面a中文本2的复制操作。通常情况下,文本2与文本1不同,但是并不绝对。有些情况下,文本2也可以与文本1相同。
同样的,与S1202a中类似,在S1202b之前,手机可以接收用户对入口a的操作2。关于操作2,可参见前文S1202a中的相关说明,此处不再赘述。
示例性的,以操作2是点击操作为例。假设文本2是图15中的(a)示出的界面a 1501中的“peaks of”,入口a是图15中的(a)示出的界面a 1501中的快捷入口1502。在手机显示图15中的(a)示出的界面a 1501后,若手机依次检测到用户对图15中的(a)示出的界面a 1501中“peaks of”的复制操作和对快捷入口1502的点击操作,手机可显示图15中的(b)示出的界面a 1503。该界面a 1503中包括弹窗a 1504。弹窗a 1504中显示有“peaks of”的翻译结果。
S1203、手机响应于用户对界面a的操作3,将弹窗a收起至界面a的边缘处。
其中,操作3可以称为第三操作。
在S1203之前,手机可接收用户对界面a的操作3。其中,该操作3可以用户对界面a除弹窗a之外的区域的点击操作或者长按操作。示例性的,图16中的(a)示出的界面a1601中包括弹窗a 1602,操作3可以是对界面a 1601中除弹窗a 1602之外的区域的点击操作。如对位置1603的点击操作。或者,若弹窗a靠近界面a的底部,则操作3可以是用户从弹窗a的上边缘向界面a的下边缘的滑动操作;若弹窗a靠近界面a的顶部,则操作3可以是用户从弹窗a的下边缘向界面a的上边缘的滑动操作。示例性的,以弹窗a靠近界面a的底部为例。图16中的(b)示出的界面a 1604中包括弹窗a 1605,操作3可以是从弹窗a 1605的上边缘向界面a 1604的下边缘的滑动操作。或者,弹窗a中包括控件a,该控件a用于触发手机收起弹窗a。相应的,操作3可以是用户对控件a的点击操作或者长按操作。示例性的,图16中的(c)示出的界面a 1606中包括弹窗a 1607,该弹窗a 1607中包括控件a 1608。操作3可以是用户对控件a 1608的点击操作。
下文实施例中,将主要以操作3是用户对界面a中除弹窗a之外的区域的点击操作为例来说明本申请方案。
示例性的,手机响应于用户对图16中的(a)示出的界面a 1601中弹窗a 1602之外的位置1603的点击操作,可显示图17示出的界面a 1701。该界面a 1701中包括弹窗a 1702。与图16中的(a)中的弹窗a 1602不同的是:图17中的弹窗a 1702收起在界面a 1701的下边缘处,而不是完整的显示在界面a 1701中。
也就是说,将弹窗a收起到边缘后,弹窗a则无法完整的呈现在界面a中。在本申请实施例中,收起后的弹窗a中通常不显示翻译结果,而可以显示翻译标识、控件b和/或控件c。其中,控件c用于触发手机展开弹窗a。例如,图17示出的界面a 1701中包括收起状态的弹窗a 1702,该弹窗a 1702中不包括翻译结果,但是显示有翻译标识1703、“×” 按钮1705(即控件b)和控件c 1704。
在弹窗a处于收起状态的情况下,在一种场景中,用户可以通过对界面a的操作4来触发手机展开弹窗a,以快捷查看最次一次复制的文本(文本1或者文本2)的翻译结果。
其中,若弹窗a靠近界面a的底部,则操作4可以是用户从弹窗a的下边缘向界面a的上边缘的滑动操作;若弹窗a靠近界面a的顶部,则操作4可以是用户从弹窗a的上边缘向界面a的下边缘的滑动操作。例如,以弹窗a靠近界面a的底部为例。操作4可以是用户从图18中的(a)示出的界面a 1801中弹窗a 1802的下边缘向界面a 1801的上边缘的滑动操作。或者,操作4可以是用户对控件c的点击操作。例如,操作4可以是用户对图18中的(b)示出的界面a 1803中弹窗a 1804中控件c 1805的点击操作。
示例性的,最近一次复制的文本是“enormous”。手机响应于用户对图18中的(a)示出的界面a 1801中弹窗a 1802的下边缘向界面a 1801的上边缘的滑动操作,可显示图13中的(a)示出的界面a 1301。该界面a 1301中包括弹窗a 1302,弹窗a 1302中显示有“enormous”的翻译结果。
实际中,手机响应于用户对界面a的操作3,也可以隐藏弹窗a,以最大程度减小对界面a的占用。
在另一种场景中,用户可以通过复制新的文本(如文本3)来触发手机展开弹窗a,以快捷查看该新的文本的翻译结果。具体的,如下S1204所示。
S1204、手机响应于用户对界面a中文本3的复制操作,在界面a中展开弹窗a,并在弹窗a中显示文本3的翻译结果。
其中,文本3可以是任一语言,例如,可以是手机设置的默认语言。该文本3可以称为第二文本。
其中,文本3的翻译结果可以称为第二翻译结果。文本3的翻译结果中包括文本3的译文,文本3的译文可以称为第二译文。若文本3不是手机默认设置的语言,则文本3的译文默认是手机设置的默认语言的文本;若文本3是手机默认设置的语言,则文本3的译文的语言通常是用户常选择的译文的语言,或者是手机的翻译功能默认的译文的语言(如英文)。
在S1204之前,手机可接收用户对界面a中文本3的复制操作。其中,文本3可以与文本1和文本2都不同,也可以与文本1或者文本2相同。
示例性的,在弹窗a处于收起状态的情况下,手机可接收用户对界面a中的文本3的选中操作。电子设备响应于该选中操作,可在界面a中显示快捷菜单。例如,电子设备响应于用户对图19中的(a)中示出的界面a 1901中的文本3“I am standing in the……the Northern Rockies”的选中操作,可以在界面a 1901中显示快捷菜单,快捷菜单中包括“复制”和“搜索”两个快捷入口。而后,手机可接收用户对图19中的(b)示出的界面a 1903中“复制”快捷入口的点击操作,手机可显示图19中的(c)示出的界面a 1905。与界面a 1903不同的是:界面a 1905中的弹窗a 1904处于展开状态,并且弹窗a 1906中显示有“I am standing in the……the Northern Rockies”的翻译结果。而界面a 1903中的弹窗a1904处于收起状态。
应注意,在S1204中,主要说明了以复制操作触发手机连续翻译的具体实现。实际实施时,并不以此为限,手机也可以是选中操作、长按操作、划线操作和双击操作中的任一 种。其中,上述触发手机连续翻译的操作可以统称为第四操作。
前述实施例中,仅说明了两次连续翻译的过程。若存在两次以上的连续翻译的需求,手机可以重复执行S1203和S1204,以完成两次以上的连续翻译。例如,若要继续完成第三次翻译,手机可通过S1203来收起弹窗a。而后手机可通过S1204来显示新的文本的翻译结果。
综上所述,采用本申请实施例的方法,在一次翻译完成后,手机响应于用户的操作3,可以收起用于显示翻译结果的弹窗。而后,手机响应于用户对新的文本的复制操作,则可直接触发另一次翻译,并将收起的弹窗展开,在展开的弹窗内显示新的文本的复制结果。也就是说,相较于常规技术,本申请方案在多次连续翻译的过程中,只要弹窗未关闭,则在用户复制新的文本后,就可直接触发手机翻译该新的文本并显示翻译结果。而无需用户在复制新的文本后再次手动触发翻译。从而可以提升连续翻译的快捷性。
本申请另一些实施例提供了一种电子设备,该电子设备可以包括:上述显示屏(如触摸屏)、存储器和一个或多个处理器。该显示屏、存储器和处理器耦合。该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令。当处理器执行计算机指令时,电子设备可执行上述方法实施例中手机执行的各个功能或者步骤。该电子设备的结构可以参考图2所示的电子设备500的结构。
本申请实施例还提供一种芯片系统,如图20所示,该芯片系统2000包括至少一个处理器2001和至少一个接口电路2002。处理器2001和接口电路2002可通过线路互联。例如,接口电路2002可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路2002可用于向其它装置(例如处理器2001)发送信号。示例性的,接口电路2002可读取存储器中存储的指令,并将该指令发送给处理器2001。当所述指令被处理器2001执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。
本申请实施例还提供一种计算机存储介质,该计算机存储介质包括计算机指令,当所述计算机指令在上述电子设备上运行时,使得该电子设备执行上述方法实施例中手机执行的各个功能或者步骤。
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述方法实施例中手机执行的各个功能或者步骤。
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的 部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (15)

  1. 一种翻译方法,其特征在于,包括:
    电子设备显示第一界面,所述第一界面中包括第一语言的文本;
    所述电子设备响应于用户对所述第一界面中第一文本的第一操作,在所述第一界面中显示第一控件;所述第一文本是所述第一语言的文本,所述第一控件用于触发所述电子设备执行翻译;
    所述电子设备响应于用户对所述第一控件的第二操作,在所述第一界面显示第一弹窗,在所述第一弹窗显示所述第一文本的第一翻译结果;所述第一翻译结果中包括所述第一文本的第一译文,所述第一译文是第二语言的文本;
    所述电子设备响应于用户对所述第一界面的第三操作,收起所述第一弹窗;
    所述电子设备响应于用户对所述第一界面中第二文本的第四操作,展开所述第一弹窗,在所述第一弹窗显示所述第二文本的第二翻译结果;所述第二翻译结果中包括所述第二文本的第二译文。
  2. 根据权利要求1所述的方法,其特征在于,所述第二语言是所述电子设备设置的默认语言,所述第一语言是除所述第二语言之外的语言;所述第一界面中还包括所述第二语言的文本;
    所述方法还包括:
    所述电子设备响应于用户对所述第一界面中第三文本的第一操作,不显示所述第一控件;所述第三文本是所述第二语言的文本。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一语言是所述电子设备的系统或者所述电子设备上的应用支持翻译的语言。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一文本不是网址链接、邮箱或者利用机器生成的口令。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一操作包括选中操作、复制操作、长按操作、划线操作和双击操作中的任一种;和/或,所述第四操作包括选中操作、复制操作、长按操作、划线操作和双击操作中的任一种。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述第三操作包括用户对所述第一界面中所述第一弹窗之外的区域的点击操作或者长按操作,或者,所述第三操作包括用户对所述第一弹窗的滑动操作。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述收起所述第一弹窗,包括:
    隐藏所述第一弹窗,或者,将所述第一弹窗收起至所述第一界面的边缘位置。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述方法还包括:
    所述电子设备响应于用户对所述第一界面中第一文本的第一操作,在所述第一界面中显示至少一个第二控件,所述至少一个第二控件用于触发所述电子设备添加备忘录;和/或,所述至少一个第二控件用于触发所述电子设备添加日程;和/或,所述至少一个第二控件用于触发所述电子设备分享到应用;和/或,所述至少一个第二控件用于触发所述电子设备添加收藏;和/或,所述至少一个第二控件用于触发所述电子设备添加到词典;和/或,所述至少一个第二控件用于触发所述电子设备打开地图导航。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,所述第一控件中包括所述第一文本或者所述第一文本的译文。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述方法还包括:
    所述电子设备响应于用户对所述第一界面中第一文本的第一操作,在所述第一界面中显示第一标识;所述第一标识用于指示所述电子设备正在识别用户输入所述第一操作的意图;
    其中,所述在所述第一界面中显示第一控件,包括:
    所述电子设备响应于所述意图识别完成的事件,在所述第一界面中显示所述第一控件。
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,在所述第一界面中显示第一控件之后,所述方法还包括:
    当所述电子设备在预设时间内未检测到所述第二操作时,所述电子设备将所述第一控件收起至所述第一界面的边缘位置。
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,在所述第一界面显示第一弹窗之后,所述方法还包括:
    所述电子设备响应于用户的第五操作,关闭所述第一控件;所述第五操作用于触发所述电子设备退出所述第一界面或者退出所述第一界面所属的第一应用。
  13. 根据权利要求1-12中任一项所述的方法,其特征在于,所述第二操作是点击操作或者长按操作。
  14. 一种电子设备,其特征在于,所述电子设备包括显示屏、存储器和一个或多个处理器;所述显示屏、所述存储器和所述处理器耦合;所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述计算机指令被所述处理器执行时,使得所述电子设备执行如权利要求1-13中任一项所述的方法。
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任一项所述的方法。
PCT/CN2022/091046 2021-08-27 2022-05-05 一种翻译方法及电子设备 WO2023024566A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22859916.3A EP4280041A1 (en) 2021-08-27 2022-05-05 Translation method and electronic device
US18/547,239 US20240134504A1 (en) 2021-08-27 2022-05-05 Translation method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110996636.6 2021-08-27
CN202110996636.6A CN115729421A (zh) 2021-08-27 2021-08-27 一种翻译方法及电子设备

Publications (1)

Publication Number Publication Date
WO2023024566A1 true WO2023024566A1 (zh) 2023-03-02

Family

ID=85290347

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091046 WO2023024566A1 (zh) 2021-08-27 2022-05-05 一种翻译方法及电子设备

Country Status (4)

Country Link
US (1) US20240134504A1 (zh)
EP (1) EP4280041A1 (zh)
CN (1) CN115729421A (zh)
WO (1) WO2023024566A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402372A (zh) * 2010-09-09 2012-04-04 腾讯科技(深圳)有限公司 一种文字翻译方法及系统
CN104615592A (zh) * 2013-11-05 2015-05-13 Lg电子株式会社 移动终端和控制该终端的方法
CN107153541A (zh) * 2017-04-20 2017-09-12 北京小米移动软件有限公司 浏览交互处理方法及装置
CN111680521A (zh) * 2020-05-19 2020-09-18 北京搜狗科技发展有限公司 一种翻译处理方法、装置和用于翻译处理的装置
CN112905093A (zh) * 2021-03-10 2021-06-04 Oppo广东移动通信有限公司 内容显示方法、装置、存储介质及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402372A (zh) * 2010-09-09 2012-04-04 腾讯科技(深圳)有限公司 一种文字翻译方法及系统
CN104615592A (zh) * 2013-11-05 2015-05-13 Lg电子株式会社 移动终端和控制该终端的方法
CN107153541A (zh) * 2017-04-20 2017-09-12 北京小米移动软件有限公司 浏览交互处理方法及装置
CN111680521A (zh) * 2020-05-19 2020-09-18 北京搜狗科技发展有限公司 一种翻译处理方法、装置和用于翻译处理的装置
CN112905093A (zh) * 2021-03-10 2021-06-04 Oppo广东移动通信有限公司 内容显示方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN115729421A (zh) 2023-03-03
EP4280041A1 (en) 2023-11-22
US20240134504A1 (en) 2024-04-25

Similar Documents

Publication Publication Date Title
US20200293715A1 (en) Text editing
US10078376B2 (en) Multimodel text input by a keyboard/camera text input module replacing a conventional keyboard text input module on a mobile device
US8244284B2 (en) Mobile communication device and the operating method thereof
US8775969B2 (en) Contact searching method and apparatus, and applied mobile terminal
CN111263002B (zh) 一种显示方法和电子设备
KR20140063873A (ko) 터치 스크린 단말 대상 프로세싱 방법 및 터치 스크린 단말
US20160156774A1 (en) Techniques for enhancing content on a mobile device
CN114816167B (zh) 应用图标的显示方法、电子设备及可读存储介质
WO2019200942A1 (zh) 一种交互方法及终端设备
WO2009141725A1 (en) System and method for excerpt creation
WO2023030030A9 (zh) 翻译方法及电子设备
KR20140100315A (ko) 이동 단말기 및 그것의 제어 방법
US20140288916A1 (en) Method and apparatus for function control based on speech recognition
CN112181253A (zh) 信息显示方法、装置和电子设备
WO2021244459A1 (zh) 一种输入方法及电子设备
CN115801943A (zh) 显示方法、电子设备及存储介质
CN108628461B (zh) 一种输入方法和装置、一种更新词库的方法和装置
WO2023024566A1 (zh) 一种翻译方法及电子设备
CN113497835A (zh) 多屏交互方法、电子设备及计算机可读存储介质
CN115033153B (zh) 应用程序推荐方法及电子设备
CN114461312B (zh) 显示的方法、电子设备及存储介质
KR20110088707A (ko) 이동 단말기 및 그 제어 방법
EP2806364B1 (en) Method and apparatus for managing audio data in electronic device
CN116661645B (zh) 显示应用卡片的方法、电子设备及可读存储介质
WO2023231645A1 (zh) 搜索方法、装置、电子设备和可读存储介质

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18547239

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022859916

Country of ref document: EP

Effective date: 20230816

NENP Non-entry into the national phase

Ref country code: DE