Machine translation method and electronic device

The machine translation method on electronic devices addresses the cumbersome process of translating long content by enabling seamless scrolling screenshots, improving user experience and translation efficiency.

JP7536090B2Active Publication Date: 2024-08-19HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2022517924
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-20
Filing Date
2020-09-18
Publication Date
2024-08-19
Estimated Expiration
2040-09-18

AI Technical Summary

Technical Problem

Current text translation methods on electronic devices require cumbersome operations such as taking screenshots and switching between applications, leading to poor user experience and low efficiency, especially when translating long content like news posts.

Method used

A machine translation method that allows for scrolling screenshots, where the device automatically translates content as the user scrolls, eliminating the need to take multiple screenshots and switch applications, and enabling seamless translation of multi-screen content.

Benefits of technology

Improves user experience by allowing continuous translation of multiple screens with a single scrolling operation, enhancing intelligence and efficiency in viewing translated content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007536090000072
    Figure 0007536090000072
  • Figure 0007536090000024
    Figure 0007536090000024
  • Figure 0007536090000033
    Figure 0007536090000033
Patent Text Reader

Abstract

The present application provides a machine translation method and an electronic device, which relate to fields such as artificial intelligence (AI), natural language processing, and machine translation. The method includes: an electronic device displays a first user interface, source text content is displayed on the first user interface, and after detecting a user's operation triggering scrolling screenshot capture, the electronic device automatically starts capturing a scrolling screenshot, the electronic device acquires a first photo through the scrolling screenshot capture, the electronic device acquires translation content corresponding to the source text content displayed in the first photo, and the electronic device automatically displays a second user interface, and some or all of the translation content is displayed on the second user interface. According to embodiments of the present application, the intelligence of an electronic device (e.g., an intelligent terminal device such as a mobile phone) can be improved, and the user experience of viewing translations by a user can also be improved.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 201910895234.X, filed with the State Intellectual Property Office of the People's Republic of China on September 20, 2019, and entitled "MACHINE TRANSLATION METHOD AND ELECTRONIC DEVICE," the entirety of which is incorporated herein by reference.

[0002] The present application relates to the field of artificial intelligence, and more specifically to machine translation methods and electronic devices. [Background technology]

[0003] Currently, text translation has been widely applied to multiple types of electronic devices, such as mobile phones, tablet computers, and personal computers (PCs), in order to provide users with convenient translation services.

[0004] Text translation includes a single-photo-based translation method. When a user wants to translate the current interface content when taking a picture of a page of a foreign book or browsing a foreign news application (APP), the user needs to take a screenshot of the current interface content and then input the picture obtained after taking the screenshot into the translation APP to obtain the translation result. When a user is browsing a relatively long news post, the user needs to constantly take a screenshot in the news APP and then switch to the translation APP to input the corresponding picture to obtain the translation result. Through such repeated operations, the user can finish reading the foreign news post. In this way, the user's operation is tedious, the user experience is relatively poor, and the efficiency is relatively low. Summary of the Invention [Means for solving the problem]

[0005] The present application relates to the fields of artificial intelligence, natural language processing and machine translation, to provide a machine translation method and electronic device, and to improve the intelligence and user experience of electronic devices.

[0006] According to a first aspect, a machine translation method is provided. The method is applied to an electronic device having a touch screen, and includes the following: The electronic device displays a first user interface on the touch screen. The first user interface includes a first content, and a language of the first content is a first language. The electronic device detects a first operation in the first user interface. The first operation includes a user operation triggering a scrolling translation by a user. In response to the first operation, the electronic device takes a scrolling screenshot starting from a first position of the first user interface. In the scrolling screenshot process, when a second operation of the user is detected in the second user interface or an end position is reached through scrolling of the second user interface, the electronic device stops taking the scrolling screenshot at a second position of the second user interface and obtains a first picture. The first picture is a picture corresponding to the second content, the second content includes a content from the first position to the second position, and the language of the second content is a first language. The electronic device automatically obtains a translation result of the second content based on the first picture. The language of the translation result of the second content is the second language. After the electronic device automatically obtains a part or all of the translation result of the second content, it automatically displays a third user interface. The third user interface includes a part or all of the translation result of the second content.

[0007] In this embodiment of the present application, when a user wants to view a translation content corresponding to a source text content on an electronic device, the user may perform a user operation to trigger a scroll translation, so that the electronic device first takes a scroll screenshot, and then obtains a translation content corresponding to the source text content obtained through the scroll screenshot. In this way, the cumbersome operation of the user browsing the translation can be avoided, and multiple screens of translation content can be obtained in one scroll translation, making it easy for the user to browse the translation content, thereby improving the intelligence of the electronic device and improving the user experience of the user browsing the translation.

[0008] Referring to the first aspect, in some implementation forms of the first aspect, the method includes: the electronic device detects a third operation in a fourth user interface; the fourth user interface includes a last part of the translation result of the second content, and the third operation includes a user operation triggering a scrolling translation by the user; in response to the third operation, the electronic device automatically displays a fifth user interface and takes a scrolling screenshot starting from a third position of the fifth user interface; the fifth user interface includes a third content, the third position is associated with a first picture, and the language of the third content is a first language; in the scrolling screenshot process, when a fourth operation of the user is detected in a sixth user interface or an end position is reached through scrolling, the electronic device stops taking the scrolling screenshot at a fourth position of the sixth user interface and obtains a second picture; the second picture is a picture corresponding to the fourth content, the fourth content includes content from the third position to the fourth position, and the language of the fourth content is a first language. The electronic device automatically obtains a translation result of the fourth content based on the second picture. The language of the translation result of the fourth content is the second language. After the electronic device automatically obtains a part or all of the translation result of the fourth content, it automatically displays a seventh user interface. The seventh user interface includes a part or all of the translation result of the fourth content.

[0009] In this embodiment of the present application, when the user further wants to view more translation content after performing the first scroll translation, the user can trigger the scroll translation again. In this way, the cumbersome operation of the user browsing the translation can be avoided, and multiple screens of translation content can be obtained in one scroll translation, making it easy for the user to browse the translation content, thereby improving the intelligence of the electronic device and improving the user experience of the user browsing the translation.

[0010] Referring to the first aspect, in some implementation forms of the first aspect, the method includes: the electronic device detects a fifth operation in the eighth user interface; the eighth user interface includes a last part of the translation result of the second content, and the fifth operation includes a user operation triggering further translation by the user; the electronic device automatically acquires the translation result of the fifth content in response to the fifth operation; the fifth content includes a part or all of the content other than the second content among all the contents corresponding to the first language, and the language of the translation result of the fifth content is the second language; the electronic device automatically displays the ninth user interface after automatically acquiring a part or all of the translation result of the fifth content, or displays the ninth user interface after receiving a user's slide operation; the ninth user interface includes a part or all of the translation result of the fifth content.

[0011] In this embodiment of the present application, if the user further wants to view more translation content after performing the first scroll translation, the user can trigger further translation, and the electronic device can jump to the source text interface to automatically obtain more source text content for translation to obtain more translation content. Alternatively, the electronic device does not need to jump to the source text interface, but automatically loads more translation content in the background to display more translation content to the user, thereby facilitating the user to browse the translation content.

[0012] Referring to the first aspect, in some implementations of the first aspect, the method further includes automatically taking a screenshot to obtain a third picture in response to the fifth operation, the third picture being a picture corresponding to the fifth content.

[0013] In some possible implementations, the automatic screenshot taking may be a screenshot taking or a scrolling screenshot taking.

[0014] Referring to the first aspect, in some implementation forms of the first aspect, the step of automatically obtaining a translation result of the fifth content includes: the electronic device sends the third photo or a photo corresponding to a portion of the third photo to the server; the electronic device receives a translation result of the third photo or a photo corresponding to a portion of the third photo, returned by the server.

[0015] In this embodiment of the present application, after obtaining the third photo, the electronic device sends the third photo or a photo corresponding to a part of the third photo to the server, so that the server translates the source text content displayed on the third photo or a photo corresponding to a part of the third photo to obtain a translation result. The server can send the translation result to the electronic device, so that the electronic device displays the translation result to the user. The third photo or a photo corresponding to a part of the third photo may include a multi-screen photo. This can improve the translation efficiency, so that the user experience of browsing the translation can be improved by the user, compared with the conventional technology that can only send one screen of photos at a time.

[0016] Referring to the first aspect, in some implementations of the first aspect, the step of automatically taking a screenshot to obtain a third photograph includes automatically capturing the contents of one or more screens to obtain the third photograph. The automatic screenshot process is visible or invisible to the user.

[0017] In some possible implementations, the electronic device can capture one screen's contents through screenshot taking.

[0018] In some possible implementations, the electronic device can instead capture multiple screen content through scrolling screenshot taking.

[0019] In this embodiment of the present application, the automatic screenshot process may be invisible to the user. If the user wants to continue to view more translations after obtaining the translation through the first full-screen translation or scrolling translation, the user may directly trigger further translation to obtain more translations. The user directly views more translations based on the previous translation without the need for the electronic device to jump to the source text to display the screenshot or scrolling screenshot process, so that the user experience of browsing the translations can be further improved by the user.

[0020] Referring to the first aspect, in some implementation forms of the first aspect, before automatically obtaining the translation result of the second content, the method further includes: the electronic device automatically segments the first photo into a plurality of photos; the third position relates to a specific position in a last photo of the plurality of photos, the specific position being a start position, an end position, a middle position, or a predetermined percentage position of the last photo, or a start position of the last paragraph, or a start position of the last n lines, where n is a positive integer, and n is 1 or more.

[0021] In this embodiment of the present application, the electronic device allows a long screenshot that captures an interface currently displaying a first language (also called source text), automatically scrolls down the screen, and stops the long screenshot capture when the electronic device detects that the user can tap the screen. Then, the text data translated into the second language (also called translation) is displayed in a new interface, and the user can view the text data through up / down sliding. Then, the user can directly select to continue viewing the subsequent content in the translation interface (the interface provides a "scroll translation" button that the user taps). After the user taps the "scroll translation" button again, the electronic device jumps to the source text interface and jumps to the vicinity of the position where the previous long screenshot capture stopped (the electronic device has memorized the position). The electronic device can enable scrolling screenshot capture and translation that starts again from the vicinity of the position where the previous long screenshot capture stopped (or a few lines before that position, where the user can remember where the previous reading ended by maintaining some redundant content). The method is not limited to translation of web-based browser clients, but can also be used in non-browser scenarios such as third-party information APPs, so that the applicable scenarios are greatly expanded and the continuity of the user's reading experience is further ensured.

[0022] Referring to the first aspect, in some implementations of the first aspect, the step of automatically obtaining a translation result of the second content includes: the electronic device sends a plurality of photos to a server; the electronic device receives the translation result of the server for each of the plurality of photos; the electronic device generates a part of the translation result of the second content from the translation results of some of the plurality of photos, or generates the translation result of the second content from the translation results of all of the plurality of photos.

[0023] In this embodiment of the present application, after obtaining the first photo, the electronic device can segment the first photo into multiple photos and send the multiple photos to the server for translation. The server can send the translation result of the multiple photos to the electronic device, so that the electronic device displays the translation result to the user. The first photo can include multiple photos. This can improve the translation efficiency compared to the conventional technology that can only send one screen of photos at a time, and thus improve the user experience of browsing the translation by the user.

[0024] Referring to the first aspect, in some implementation forms of the first aspect, the third position being associated with the first photo includes the following: The third position is associated with a specific position in the first photo, the specific position being an end position, a middle position, or a predetermined percentage position of the first photo, or a start position of the last paragraph, or a start position of the last n lines of the first photo, where n is a positive integer, and n is 1 or more.

[0025] In this embodiment of the present application, the electronic device may segment the first photograph or may not segment the first photograph. The starting position of the second scrolling screenshot capture may be related to the first photograph.

[0026] Referring to the first aspect, in some implementation forms of the first aspect, the third position being associated with the first photo includes: the third position is associated with the second content; the third position is associated with an end position, a middle position, or a predetermined percentage position of the second content, or the third position is associated with a start position of the last paragraph or a start position of the last n lines of the second content, where n is a positive integer and n is 1 or more.

[0027] In this embodiment of the present application, the electronic device may segment the first photograph or may not segment the first photograph. The starting position of the second scrolling screenshot capture may be related to the second content displayed in the first photograph.

[0028] Referring to the first aspect, in some implementation forms of the first aspect, the step of automatically obtaining a translation result of the second content includes the steps of sending the first photo, or a photo corresponding to a portion of the first photo, to a server, and receiving a translation result, the translation result being of the first photo or a photo corresponding to a portion of the first photo, returned by the server.

[0029] Referring to the first aspect, in some implementations of the first aspect, the translation result of the second content includes content obtained after text content obtained by performing optical character recognition (OCR) text recognition on the first photograph is translated from the first language to the second language.

[0030] In this embodiment of the present application, the electronic device can determine whether a word or a picture is cut through OCR. If the mobile phone determines that a word or a picture is cut at the segmentation position, the mobile phone can move the segmentation position to a blank line position. The electronic device can send the text content obtained through OCR to a server, and the server can translate the corresponding text content.

[0031] Referring to the first aspect, in some implementation forms of the first aspect, the step of automatically obtaining a translation result of the second content includes: the electronic device sends the first photo or a photo corresponding to a portion of the first photo to a server; the electronic device receives a translation result of the first photo or a photo corresponding to a portion of the first photo, returned by the server.

[0032] Referring to the first aspect, in some implementations of the first aspect, the translation result of the second content includes content obtained after text content obtained by performing optical character recognition (OCR) text recognition on the first photograph is translated from the first language to the second language.

[0033] In this embodiment of the present application, the electronic device can determine whether a word or a picture is cut through OCR. If the mobile phone determines that a word or a picture is cut at the segmentation position, the mobile phone can move the segmentation position to a blank line position.

[0034] In this embodiment of the present application, it should be understood that OCR text recognition may be performed by an electronic device and text translation may be performed by a server, or OCR text recognition and text translation may be completed by a server, or OCR text recognition and text translation may be completed by the same server or together by different servers.

[0035] Referring to the first aspect, in some implementations of the first aspect, the method further includes a step of displaying first prompt information at or near the third position, where the first prompt information is used to indicate to the user a start position for taking a scrolling screenshot, and / or a step of displaying second prompt information at or near the second position, where the second prompt information is used to indicate to the user that the previous reading ended at the second position.

[0036] By displaying the first prompt information and / or the second prompt information before reading the translation of the second scrolling screenshot, the user can re-familiarize himself / herself with the source text content in the second scrolling screenshot, which has the function of retrieving memory and assisting the user in continuous reading.

[0037] Referring to the first aspect, in some implementations of the first aspect, the first operation includes a user tapping a first control that can trigger a scrolling translation function or a user inputting a voice command that can trigger a scrolling translation function.

[0038] Referring to the first aspect, in some implementations of the first aspect, the third operation includes a user tapping a first control that can trigger a scrolling translation function, or a user inputting a voice command that can trigger a scrolling translation function.

[0039] Referring to the first aspect, in some implementations of the first aspect, the method further includes a step of displaying a tenth user interface after a user's slide operation is received in the third user interface, the tenth user interface including a subsequent translation result associated with the translation result included in the third user interface.

[0040] Referring to the first aspect, in some implementation forms of the first aspect, before detecting the third operation, the method further includes displaying, in a fourth user interface, a control that can trigger scrolling translation.

[0041] Referring to the first aspect, in some implementations of the first aspect, before detecting the fifth operation, the method further includes displaying, in an eighth user interface, a control that can trigger further translation.

[0042] Referring to the first aspect, in some implementation forms of the first aspect, the step of detecting a first operation in the first user interface includes a step of displaying a plurality of function controls after a user's multi-finger pressing operation is detected in the first user interface, the plurality of function controls including a first control that can trigger a scrolling translation, and a step of detecting that a user has tapped the first control or that a user has input a voice command that can trigger a scrolling translation function.

[0043] Referring to the first aspect, in some implementation forms of the first aspect, the second content includes the first content and some or all of the content other than the first content among all the content corresponding to the first language.

[0044] Referring to the first aspect, in some implementation forms of the first aspect, the third content includes a portion of the content other than the second content among all the content corresponding to the first language, and the fourth content includes a portion or all of the content other than the second content among all the content corresponding to the first language.

[0045] Referring to the first aspect, in some implementations of the first aspect, the method further includes a step of displaying an eleventh user interface after a user's slide operation is received in the ninth user interface, the eleventh user interface including a subsequent translation result associated with the translation result included in the ninth user interface.

[0046] According to a second aspect, a machine translation method is provided. The method is applied to an electronic device having a touch screen, and includes the following: The electronic device displays a first user interface on the touch screen. The first user interface includes a first content, and a language of the first content is a first language. The electronic device detects a first operation of a user in the first user interface. The first operation includes a user operation triggering a full-screen translation by the user. In response to the first operation, the electronic device acquires a first photo, which is acquired by taking a screenshot of the first user interface. The electronic device automatically acquires a translation result of the first content based on the first photo. The language of the translation result of the first content is a second language. After automatically acquiring the translation result of the first content, the electronic device automatically displays a second user interface. The second user interface includes a part or all of the translation result of the first content. The electronic device detects a second operation of a user in the second user interface. The second operation includes a user operation triggering a scroll translation by the user. In response to the second operation, the electronic device automatically displays a third user interface and takes a scrolling screenshot starting from a first position of the third user interface. The third user interface includes a second content, the first position is associated with a first photo, and the language of the second content is a first language. In the scrolling screenshot process, when a third operation of the user is detected in the fourth user interface or an end position is reached through scrolling in the fourth user interface, the electronic device stops taking the scrolling screenshot at a second position of the fourth interface to obtain a second photo. The second photo is a photo corresponding to the third content, the third content includes content from the first position to the second position, and the language of the third content is the first language. The electronic device automatically obtains a translation result of the third content based on the second photo. The language of the translation result of the third content is a second language. The electronic device automatically displays a fifth user interface after automatically obtaining a part or all of the translation result of the third content. The fifth user interface includes a part or all of the translation result of the third content.

[0047] This embodiment of the present application provides a process of first performing full-screen translation and then performing scroll translation. Specifically, the user can first perform full-screen translation, and a "scroll translation" control may appear in the translation interface of the full-screen translation, and then the user can perform scroll translation. In this way, after performing full-screen translation, the user can first determine whether the user is interested in the source text content. If the user is interested in the source text content, the user can continue to perform scroll translation to view more translation content. If the user is not interested in the source text content, the user can end the reading of the current source text, and then search for the source text that the user is interested in.

[0048] In some possible implementations, the second content and the first content may be the same, or the second content includes a portion of the first content.

[0049] Referring to the second aspect, in some implementations of the second aspect, before automatically obtaining the translation result of the third content, the method further includes: the electronic device automatically segments the second photo into a plurality of photos; the electronic device transmits the plurality of photos to a server; the electronic device receives the translation result of the server for each of the plurality of photos; the electronic device generates a part of the translation result of the third content from the translation results of some of the plurality of photos, or generates the translation result of the third content from the translation results of all of the plurality of photos.

[0050] Referring to the second aspect, in some implementations of the second aspect, the translation result of the third content includes content obtained after text content obtained by performing OCR text recognition on the second photograph is translated from the first language to the second language.

[0051] In this embodiment of the present application, the electronic device can determine whether a word or a picture is cut through OCR. If the mobile phone determines that a word or a picture is cut at the segmentation position, the mobile phone can move the segmentation position to a blank line position. The electronic device can send the text content obtained through OCR to a server, and the server can translate the corresponding text content.

[0052] Referring to the second aspect, in some implementations of the second aspect, the method further includes: the electronic device displays first prompt information at or near the first position, the first prompt information is used to indicate to the user a start position of the scrolling screenshot capture, and / or the electronic device displays second prompt information at an end position of the first photo, the second prompt information is used to indicate to the user that the previous reading has ended at the end position.

[0053] In this embodiment of the present application, by displaying the first prompt information and / or the second prompt information before reading the translation of the second scrolling screenshot, the user can re-familiarize himself / herself with the source text content in the second scrolling screenshot, which has the function of stimulating memory and assisting the user in continuous reading.

[0054] Referring to the second aspect, in some implementations of the second aspect, the second operation includes a user tapping a first control that can trigger the scrolling translation function, or a user inputting a voice command that can trigger the scrolling translation function.

[0055] Referring to the second aspect, in some implementation forms of the second aspect, the first position being associated with the first photo includes: the first position is associated with a specific position in the first photo, the specific position being an end position, a middle position, or a predetermined percentage position of the first photo, or a start position of the last paragraph, or a start position of the last n lines of the first photo, where n is a positive integer and n is 1 or more.

[0056] Referring to the second aspect, in some implementation forms of the second aspect, associating the first position with the first photo includes: the first position is associated with an end position, a middle position, or a position at a predetermined percentage of the first content, or the first position is associated with a start position of the last paragraph or a start position of the last n lines of the first content, where n is a positive integer and n is 1 or more.

[0057] In this embodiment of the present application, the electronic device can enable scrolling screenshot taking and translation starting from the position on the first photo acquired through previous screenshot taking (or a few lines before that position, where the user can remember where the previous reading ended by maintaining some redundant content). The method is not limited to translation in web-based browser clients, and can further be used in non-browser scenarios such as third-party information APPs, so that the applicable scenarios are greatly expanded and the continuity of the user's reading experience is further guaranteed.

[0058] Referring to the second aspect, in some implementations of the second aspect, the method further includes: the electronic device displays a sixth user interface after receiving a user's slide operation on the fifth user interface, and the sixth user interface includes a subsequent translation result associated with the translation result included in the fifth user interface.

[0059] Referring to the second aspect, in some implementations of the second aspect, before detecting a second operation of the user in the second user interface, the method further includes: the electronic device displays, in the second user interface, a control capable of triggering a scroll translation.

[0060] Referring to the second aspect, in some implementation forms of the second aspect, the step of detecting a first operation of a user on a first user interface includes: the electronic device displays a plurality of function controls after detecting a multi-finger pressing operation of the user on the first user interface; the plurality of function controls includes a first control capable of triggering a full-screen translation; the electronic device detects that the user has tapped the first control or that the user has input a voice command capable of triggering a full-screen translation function.

[0061] Referring to the second aspect, in some implementation forms of the second aspect, the step of automatically obtaining a translation result of the second content includes: the electronic device sends the second photo or a photo corresponding to a portion of the second photo to a server; the electronic device receives a translation result, which is of the second photo or a photo corresponding to a portion of the second photo and is returned by the server.

[0062] According to a third aspect, a machine translation method is provided. The method is applied to an electronic device having a touch screen, and includes the following: The electronic device displays a first user interface on the touch screen. The first user interface includes a first content, and a language of the first content is a first language. The electronic device detects a first operation of a user on the first user interface. The first operation includes a user operation triggering a full-screen translation by the user. In response to the first operation, the electronic device takes a screenshot of the first user interface to obtain a first photo. The electronic device automatically obtains a translation result of the first content based on the first photo. The language of the translation result of the first content is a second language. After automatically obtaining the translation result of the first content, the electronic device automatically displays a second user interface. The second user interface includes a part or all of the translation result of the first content. The electronic device detects a second operation of the user on the second user interface, where the second operation includes a user operation triggering further translation by the user, and in response to the second operation, automatically obtains a translation result of the second content, where the second content includes some or all of the content other than the first content among all the content corresponding to the first language, and the language of the translation result of the second content is the second language. The electronic device automatically displays the third user interface after automatically obtaining some or all of the translation result of the second content, or displays the third user interface after receiving the user's slide operation. The third user interface includes some or all of the translation result of the second content.

[0063] In this embodiment of the present application, after the electronic device performs one full-screen translation, the electronic device can provide the user with a "continue translation" control. After detecting that the user taps the "continue translation" control, the electronic device can directly load all or part of the translation corresponding to the remainder of the source text in the background. In this way, the electronic device does not need to jump to the source text interface for taking a scrolling screenshot, so that the user can further improve the user experience of reading the translation.

[0064] Referring to the third aspect, in some implementations of the third aspect, the method further includes automatically taking a screenshot to obtain a second picture in response to the second operation. The second picture is a picture corresponding to the second content. The automatically obtaining a translation result of the second content includes automatically obtaining a translation result of the second content based on the second picture.

[0065] Referring to the third aspect, in some implementations of the third aspect, the step of automatically obtaining a translation result of the second content includes: the electronic device sends the second photo or a photo corresponding to a portion of the second photo to a server; the electronic device receives a translation result, which is of the second photo or a photo corresponding to a portion of the second photo and is returned by the server.

[0066] Referring to the third aspect, in some implementation forms of the third aspect, the step of automatically taking a screenshot to obtain a second photograph includes: the electronic device automatically captures the content of one or more screens to obtain the second photograph. The automatic screenshot process is visible or invisible to the user.

[0067] In this embodiment of the present application, after a user triggers a scrolling screenshot operation, the electronic device may not jump to the source text interface to take the screenshot, but may automatically load, in the background, some or all of the translation that corresponds to the remainder of the source text, thereby avoiding the impact to the user caused by switching between the source text and the translation.

[0068] Referring to the third aspect, in some implementations of the third aspect, the step of automatically obtaining a translation result of the second content includes: the electronic device automatically segments the second photo into a plurality of photos; the electronic device transmits the plurality of photos to a server; the electronic device receives the translation result of the server for each of the plurality of photos; the electronic device generates a portion of the translation result of the second content from the translation results of some of the plurality of photos, or generates the translation result of the second content from the translation results of all of the plurality of photos.

[0069] Referring to the third aspect, in some implementations of the third aspect, the second operation includes tapping a first control by the user that can trigger a further translation function, or inputting a voice command by the user that can trigger a further translation function.

[0070] Referring to the third aspect, in some implementations of the third aspect, the method further includes: the electronic device displays a fourth user interface after receiving a user's slide operation on the third user interface, and the fourth user interface includes a subsequent translation result associated with the translation result included in the third user interface.

[0071] Referring to the third aspect, in some implementations of the third aspect, before detecting the first operation of the user in the first user interface, the method further includes: the electronic device displays, in the first user interface, a control capable of triggering a full-screen translation.

[0072] Referring to the third aspect, in some implementations of the third aspect, before detecting a second user operation in the second user interface, the method further includes displaying a control in the second user interface that can trigger further translation.

[0073] Referring to the third aspect, in some implementation forms of the third aspect, the step of detecting a user's first operation in the first user interface includes the steps of displaying a plurality of function controls after a user's multi-finger pressing operation is detected in the first user interface, the plurality of function controls including a first control that can trigger a full-screen translation, and detecting that the user has tapped the first control or that the user has input a voice command that can trigger a full-screen translation function.

[0074] According to a fourth aspect, an apparatus is provided. The apparatus is included in an electronic device, and the apparatus has functions for implementing the operation of the electronic device in the above-mentioned aspects and possible implementations of the above-mentioned aspects. The functions may be performed by hardware, or may be implemented by hardware by executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions.

[0075] According to a fifth aspect, there is provided an electronic device including a touch screen, one or more processors, a memory, and one or more computer programs. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device performs a machine translation method of any possible implementation of the first aspect, the second aspect, or the third aspect.

[0076] According to a sixth aspect, the technical solution provides a computer storage medium including computer instructions, which, when executed in an electronic device, causes the electronic device to perform a machine translation method of any possible implementation of any one of the preceding aspects.

[0077] According to a seventh aspect, the technical solution provides a computer program product, which, when executed in an electronic device, causes the electronic device to execute a machine translation method of any possible design of any one of the preceding aspects.

[0078] According to an eighth aspect, the technical solution provides a chip system, which includes at least one processor, and when program instructions are executed by the at least one processor, the functions of any one of the aforementioned possible methods of the first aspect on an electronic device are realized. [Brief description of the drawings]

[0079] [Figure 1] FIG. 1 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application. [Diagram 2] FIG. 2 is a block diagram of the software structure of an electronic device according to one embodiment of the present application. [Figure 3(a)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(b)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(c)]FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(d)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(e)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(f)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(g)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(h)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(i)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(j)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(k)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(l)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 3(m)] FIG. 2 illustrates a group of GUIs according to an embodiment of the present application. [Figure 4(a)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(b)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(c)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(d)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(e)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(f)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(g)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(h)]FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(i)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(j)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(k)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 4(l)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 5(a)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 5(b)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 5(c)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 5(d)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 5(e)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 5(f)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 6(a)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 6(b)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 6(c)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 6(d)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 7(a)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 7(b)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 7(c)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 7(d)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 8(a)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 8(b)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 8(c)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 8(d)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 8(e)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 9(a)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 9(b)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 9(c)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 9(d)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 9(e)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 9(f)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 10(a)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 10(b)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 10(c)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 10(d)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 10(e)] FIG. 13 illustrates another group of GUIs according to an embodiment of the present application. [Figure 11] 1 is a schematic flowchart of a machine translation method according to an embodiment of the present application; [Figure 12] 1 is a schematic flowchart of a machine translation method according to an embodiment of the present application; [Figure 13] 1 is a schematic flowchart of a machine translation method according to an embodiment of the present application; [Figure 14] 1 is a schematic flowchart of a machine translation method according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0080] The terms used in the following embodiments are merely for describing certain embodiments and are not intended to limit the present application. The singular terms "one", "a", "above", "this", and "the one" used in this specification and the appended claims of this application are intended to include the plurals such as "one or more", unless the context clearly indicates otherwise. It should be further understood that in the following embodiments of this application, "at least one" or "one or more" means one, two, or more. The term "and / or" is used to describe an association relationship between associated objects, and represents that three relationships may exist. For example, A and / or B may represent the cases where only A is present, where both A and B are present, and where only B is present. A and B may be singular or plural. The character " / " generally indicates an "or" relationship between associated objects.

[0081] References to "an embodiment," "some embodiments," and the like described herein indicate that one or more embodiments of the present application include the particular feature, structure, or characteristic described with reference to the embodiment. Thus, in this specification, statements such as "in one embodiment," "in some embodiments," "in some other embodiments," and "in other embodiments" appearing in different places are not necessarily meant to refer to the same embodiment, unless specifically emphasized otherwise, but instead mean "one or more, but not all, embodiments." The terms "including," "comprising," "having," and variations of these terms all mean "including but not limited to," unless specifically emphasized otherwise.

[0082] The following describes an electronic device, a user interface used in the electronic device, and an embodiment used to use the electronic device. In some embodiments, the electronic device may be a portable electronic device, such as a mobile phone, a tablet computer, or a wearable electronic device with wireless communication capabilities (e.g., a smart watch), which further includes other functions such as a personal digital assistant function and / or a music player function. Exemplary embodiments of a portable electronic device include, but are not limited to, portable electronic devices using iOS®, Android®, Microsoft®, or another operating system. The portable electronic device may alternatively be another portable electronic device, such as a laptop computer. It should be further understood that in some other embodiments, the aforementioned electronic device may be a desktop computer rather than a portable electronic device.

[0083] 1 is a schematic diagram of the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a subscriber identification module (SIM) card interface 195, and the like.

[0084] It may be understood that the structure shown in this embodiment of the present application does not constitute any particular limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figures, may combine some components, may split some components, or may have a different component arrangement. The components shown in the figures may be implemented using hardware, software, or a combination of software and hardware.

[0085] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), and the like. Different processing units may be independent components or may be integrated into one or more processors. In some embodiments, the electronic device 101 may alternatively include one or more processors 110. The controller may generate operation control signals based on the instruction operation code and the time series signal to complete the control of reading the instruction and executing the instruction. In some other embodiments, a memory may be further disposed in the processor 110 to store instructions and data. For example, the memory in the processor 110 may be a cache memory. The memory may store instructions or data that have just been used by the processor 110 or that are periodically used by the processor 110. When the processor 110 needs to use the instruction or data again, the processor 110 can directly recall the instruction or data from the memory, thus avoiding repeated accesses, reducing the latency of the processor 110, and improving the efficiency of processing data or executing instructions by the electronic device 101.

[0086] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may alternatively include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, a USB interface, and the like. The USB interface 130 is an interface that complies with the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 may be configured to connect to a charger to charge the electronic device 101, or may be configured to transmit data between the electronic device 101 and a peripheral device. Alternatively, the USB interface 130 may be configured to connect to a headset and play audio using the headset.

[0087] It may be understood that the interfacing relationships between modules illustrated in this embodiment of the present application are merely an example for illustrative purposes and do not constitute limitations on the structure of the electronic device 100. In some other embodiments of the present application, the electronic device 100 may alternatively use a different interfacing method or combination of interfacing methods than those in this embodiment.

[0088] The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 may receive the charging input from the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may further provide power to the electronic device by using the power management module 141 while charging the battery 142.

[0089] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives inputs of the battery 142 and / or the charging management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 may be further configured to monitor parameters such as battery capacity, battery cycle count, battery health (leakage or impedance), etc. In some other embodiments, the power management module 141 may alternatively be located in the processor 110. Alternatively, in some other embodiments, the power management module 141 and the charging management module 140 may be located within the same component.

[0090] The wireless communication function of the electronic device 100 may be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, a baseband processor, and the like.

[0091] Antenna 1 and Antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be configured to cover one or more communication bands. Different antennas may be further multiplexed to improve antenna utilization. For example, Antenna 1 may be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas may be used in combination with tuning switches.

[0092] The mobile communication module 150 can provide a solution applied to the electronic device 100 for wireless communication, including 2G, 3G, 4G, 5G, etc. The mobile communication module 150 can include at least one filter, switch, power amplifier, and low noise amplifier (LNA), etc. The mobile communication module 150 can receive the processed electromagnetic wave via the antenna 1, perform processing such as filtering or amplification on the received electromagnetic wave, and send the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 can further amplify the signal modulated by the modem processor and convert the signal into an electromagnetic wave for emission through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be disposed within the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be disposed within the same component.

[0093] The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including wireless local area network (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) technology, infrared (IR) technology, etc. The wireless communication module 160 may be one or more components incorporating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves through the antenna 2, performs frequency modulation and filtering on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 further receives signals to be transmitted from the processor 110, performs frequency modulation and amplification on the signal, and converts the processed signal into electromagnetic waves for emission through the antenna 2.

[0094] The electronic device 100 performs display functions by using a GPU, a display screen 194, an application processor, etc. The GPU is a microprocessor for image processing and is connected to the display screen 194 and the application processor. The GPU is configured to perform mathematical and geometric calculations and render images. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0095] The display screen 194 is configured to display images, videos, and the like. The display screen 194 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLED), and the like. In some embodiments, the electronic device 100 can include one or more display screens 194.

[0096] In some embodiments of the present application, when the display panel is made of a material such as OLED, AMOLED, or FLED, the display screen 194 in FIG. 1 can be bent. Here, the display screen 194 can be bent means that any part of the display screen can be bent to any angle and can be held at that angle. For example, the display screen 194 can be folded left and right from the center. Alternatively, the display screen 194 can be folded up and down from the center.

[0097] The display screen 194 of the electronic device 100 may be a flexible screen. Currently, flexible screens have attracted great attention due to the unique characteristics and great possibilities of flexible screens. Compared with traditional screens, flexible screens have strong flexibility and bendability characteristics, and can provide users with new interaction modes based on the bendability characteristics to meet more demands of users on electronic devices. For electronic devices configured with a foldable display, the foldable display of the electronic device can be switched at any time to a small screen in a folded form and a large screen in an extended form. Therefore, users use the split screen function more frequently on electronic devices configured with a foldable display.

[0098] The electronic device 100 can achieve the photography function by using an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.

[0099] The ISP is configured to process data fed back by the camera 193. For example, during shooting, the shutter is pressed, light is transmitted through the lens to the camera's light receiving element, the light signal is converted to an electrical signal, and the camera's light receiving element sends the electrical signal to the ISP for processing to convert the electrical signal into a visible image. The ISP may further perform algorithmic optimization on image noise, brightness, and skin tone. The ISP can further optimize parameters such as exposure and color temperature for the shooting scenario. In some embodiments, the ISP may be located within the camera 193.

[0100] The camera 193 is configured to capture still images or videos. An optical image of an object is generated through a lens and projected onto a light receiving element. The light receiving element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light receiving element converts the optical signal into an electrical signal, which is then sent to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard image signal, such as an RGB format or a YUV format. In some embodiments, the electronic device 100 may include one or more cameras 193.

[0101] The digital signal processor is configured to process digital signals and may process other digital signals in addition to digital image signals, for example, once the electronic device 100 has selected a frequency, the digital signal processor may be configured to perform a Fourier transform or the like on the frequency energy.

[0102] A video codec is configured to compress or decompress digital video. Electronic device 100 may support one or more video codecs, in which case electronic device 100 may play or record video in multiple encoding formats, such as moving picture experts group (MPEG)-1 format, MPEG-2 format, MPEG-3 format, and MPEG-4 format.

[0103] The NPU is a neural-network (NN) computing processor, which can rapidly process input information and further continuously perform self-learning by referring to the structure of biological neural networks, for example, by referring to the transmission mode between neurons in the human brain. Intelligent cognition of the electronic device 100, for example, applications such as image recognition, face recognition, voice recognition, and text understanding, can be implemented using the NPU.

[0104] The external memory interface 120 may be configured to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external storage card communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, the external storage card stores files such as music and videos.

[0105] The internal memory 121 may be configured to store one or more computer programs, the one or more computer programs including instructions. The processor 110 may execute the instructions stored in the internal memory 121 so that the electronic device 101 executes the machine translation method provided in some embodiments of the present application, various applications, data processing, and the like. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system. The program storage area may further store one or more applications (such as a gallery and contacts), and the like. The data storage area may store data (e.g., photos and contacts), and the like, created during use of the electronic device 101. In addition, the internal memory 121 may include a high-speed random access memory, or may include a non-volatile memory, for example, one or more magnetic disk storage devices, flash memory devices, or universal flash storage (UFS). In some embodiments, the processor 110 may execute instructions stored in the internal memory 121 and / or instructions stored in memory provided within the processor 110 such that the electronic device 101 performs the machine translation methods, other applications, and data processing provided in this embodiment of the present application. The electronic device 100 may perform audio functions, such as music playback and recording functions, using the audio module 170, speaker 170A, receiver 170B, microphone 170C, headset jack 170D, application processor, etc.

[0106] The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0107] The pressure sensor 180A is configured to sense a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are multiple types of pressure sensor 180A, for example, a resistive pressure sensor, an inductive pressure sensor, or a capacitive pressure sensor. The capacitive pressure sensor can include at least two parallel plates made of a conductive material. When a force is applied to the pressure sensor 180A, a capacitance between the electrodes changes. The electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is performed on the display screen 194, the electronic device 100 detects the intensity of the touch operation using the pressure sensor 180A. The electronic device 100 can calculate the touch position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations performed at the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity smaller than a first pressure threshold is performed on a message icon, an instruction to view an SMS message is executed. When a touch having a touch strength equal to or greater than a first pressure threshold is performed over the message icon, instructions are executed to compose an SMS message.

[0108] The gyro sensor 180B may be configured to determine the movement attitude of the electronic device 100. In some embodiments, the gyro sensor 180B may be used to determine the angular velocity of the electronic device 100 around three axes (i.e., X-axis, Y-axis, and Z-axis). The gyro sensor 180B may be configured to perform image stabilization during photography. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device 100 jitters, and through calculations based on the angle, obtains the distance that the lens module needs to compensate, allowing the lens to offset the jitter of the electronic device 100 through inverse motion, thereby achieving image stabilization. The gyro sensor 180B may further be used in navigation scenarios and motion sensing game scenarios.

[0109] The acceleration sensor 180E can detect the magnitude of acceleration in various directions (usually on three axes) of the electronic device 100, as well as the magnitude and direction of gravity when the electronic device 100 is stationary. The acceleration sensor 180E may be further configured to identify the orientation of the electronic device, and is used for applications such as switching between landscape and portrait modes or as a pedometer.

[0110] The ambient light sensor 180L is configured to sense the brightness of the ambient light. The electronic device 100 may adaptively adjust the brightness of the display screen 194 based on the sensed brightness of the ambient light. The ambient light sensor 180L may also be configured to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the optical proximity sensor 180G to detect whether the electronic device 100 is in a pocket for the purpose of avoiding accidental touches.

[0111] Fingerprint sensor 180H is configured to collect a fingerprint. Electronic device 100 may use the collected fingerprint characteristics to implement fingerprint-based unlocking, application lock access, fingerprint-based photographing, fingerprint-based call answering, and the like.

[0112] The temperature sensor 180J is configured to detect temperature. In some embodiments, the electronic device 100 executes a temperature handling policy based on the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is less than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being abnormally powered off due to a low temperature. In some other embodiments, when the temperature is less than yet another threshold, the electronic device 100 increases the output voltage of the battery 142 to prevent an abnormal power off caused by a low temperature.

[0113] The touch sensor 180K is also referred to as a "touch panel." The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, which is also referred to as a "touch screen." The touch sensor 180K is configured to detect touch operations made on or near the touch sensor 180K. The touch sensor can forward the detected touch operations to an application processor to determine a type of touch event. The display screen 194 can provide a visual output associated with the touch operation. Alternatively, in some other embodiments, the touch sensor 180K may be disposed at a location on the surface of the electronic device 100 different from the location of the display screen 194.

[0114] 2 is a block diagram of the software structure of the electronic device 100 according to this embodiment of the present application. In a layered architecture, the software is divided into several layers, each of which has a clear role and task. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer. The application layer can include a set of application packages.

[0115] As shown in FIG. 2, the application package may include applications such as “Camera”, “Gallery”, “Calendar”, “Phone”, “Maps”, “Navigation”, “WLAN”, “Bluetooth”, “Music”, “Video”, and “Messages”.

[0116] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer, and the application framework layer includes some predetermined functions.

[0117] As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0118] A window manager is configured to manage window programs, and the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, and the like.

[0119] Content providers are configured to store and retrieve data and enable the data to be accessed by applications. Data may include video, images, audio, calls made and received, browsing history, bookmarks, address books, and the like.

[0120] The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be configured to build applications. A display interface can include one or more views. For example, a display interface that includes a message notification icon can include a text display view and a photo display view.

[0121] The telephone manager is configured to provide communication functions for the electronic device 100, such as managing the state of a call (including answering or rejecting a call).

[0122] The resource manager provides various resources for an application, such as localized strings, icons, images, layout files, and video files.

[0123] The notification manager may be configured to allow applications to display notification information in the status bar and to communicate notification messages. The notification manager may disappear automatically after a short pause without user interaction. For example, the notification manager may be configured to provide notifications of download completion, message prompts, etc. Alternatively, the notification manager may be a notification that appears in the top status bar of the system in the form of a graph or scrollbar text, a notification that appears on the screen, for example, in the form of a notification or dialog window of an application running in the background. For example, text information may be displayed in the status bar, an alert sound may be played, the electronic device may vibrate, or an indicator light may flash.

[0124] The system library may include multiple functional modules, such as a surface manager, media libraries, a three-dimensional graphics processing library (eg, OpenGL ES), and a 2D graphics engine (eg, SGL).

[0125] The surface manager is configured to manage the display subsystem to provide a blend of 2D and 3D layers for multiple applications.

[0126] The media library supports playback and recording of multiple commonly used audio and video formats, still image files, etc. The media library can support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0127] The 3D graphics processing library is configured to perform 3D graphics drawing, image rendering, compositing, layer processing, and the like.

[0128] The 2D graphics engine is a drawing engine for 2D drawing.

[0129] The kernel layer is a layer between the hardware and the software, and includes at least a display driver, a camera driver, an audio driver, and a sensor driver.

[0130] Before the machine translation method of the present application is described, some concepts related to the embodiments of the present application are first explained.

[0131] Full-screen screenshot taking: Full-screen screenshot taking is to perform a "snapshot" operation on the content displayed on the current electronic device to obtain a picture with the same length and width as the screen, and the same content. For example, a full-screen screenshot can be taken on an iPhone by pressing the Home button and the power button simultaneously, or full-screen screenshot taking can be triggered by pressing the volume up button and the power button simultaneously on models without a Home button. In another example, full-screen screenshot taking can be triggered by tapping the screen of a Huawei mobile phone twice with a knuckle. Different vendors may have different methods to enable full-screen screenshot taking.

[0132] Long screenshot capture: After being triggered interactively, long screenshot capture is to generate a photo of the content displayed on the electronic device whose length exceeds the height of the screen, where the content is coherent and is captured starting from the currently displayed position downwards. For example, in a Huawei mobile phone, long screenshot capture is enabled by drawing an "S" on the screen with a knuckle and stopping after tapping. Different vendors may have different methods to enable long screenshot capture.

[0133] For ease of understanding, in the following embodiments of the present application, a mobile phone having the structure shown in Figures 1 and 2 is used as an example, and the machine translation method provided in the embodiments of the present application will be specifically described with reference to the accompanying drawings.

[0134] Figure 3(a) to Figure 3(m) show a group of mobile phone graphical user interfaces (GUIs). Figure 3(a) to Figure 3(m) show the process by which a user performs full screen translation and scrolling translation.

[0135] Referring to the GUI shown in FIG. 3(a), the GUI is a mobile phone desktop. The mobile phone desktop includes three desktop pages, each of which includes one or more application (APP) icons. The current desktop displayed by the mobile phone is a second desktop page 301, which includes an Alipay icon, a task card store icon, a Weibo icon, an English reading icon 302, a WeChat icon, a card bag icon, a settings icon, and a camera icon. When detecting a user tapping the icon 302, the mobile phone can display the GUI shown in FIG. 3(b).

[0136] Referring to the GUI shown in FIG. 3(b), the GUI is a display interface of an English reading APP. The display interface includes a plurality of English essays, including an English essay 303 entitled "A family of four was on a camping trip in Canada. Then a wolf attacked while they were sleeping", an English essay entitled "Draft law seeks strict action against throwing objects from buildings", and an English essay entitled "71-Year-Old Grandma Sets New Half Marathon World Record in Ohio". After detecting a user tapping the English essay 303, the mobile phone can display the GUI shown in FIG. 3(c).

[0137] Referring to the GUI shown in Fig. 3(c), the GUI is a display interface of an English essay 303. A user can read the source text of the English essay by performing an upward / downward slide on the screen. When the mobile phone detects a user pressing the interface with two fingers as shown in Fig. 3(c), the mobile phone can display the GUI shown in Fig. 3(d).

[0138] Referring to the GUI shown in FIG. 3(d), the GUI is an AI touch display interface. When the mobile phone detects a user pressing the screen with two fingers, the mobile phone can automatically display a prompt box 304. The prompt box 304 may be an AI touch display interface. The mobile phone can automatically identify words such as "wolf", "It", "was", "Something", "out", and "a" in an English essay. The prompt box 304 can further include controls such as "search", "copy", "map", "share", and "full screen translation". When the mobile phone detects a user tapping the control 305, the mobile phone can display a GUI shown in FIG. 3(e).

[0139] In this embodiment of the present application, the mobile phone can have an AI touch function. The AI ​​touch function may include: After the mobile phone detects that two fingers press the text, the mobile phone can automatically extract the text content in the pressed area, analyze keywords, etc. The AI ​​touch function may further include: After the mobile phone detects that two fingers press the photo, the mobile phone extracts the photo content in the pressed area and analyzes the article in the photo.

[0140] It should be understood that in this embodiment of the present application, full screen translation may further be understood as translating the source text displayed on the current screen, or translating one screen content displayed after a screenshot operation is performed on the current screen. When the mobile phone detects that the user taps the control 305, the mobile phone can automatically translate the source text on the screen shown in FIG. 3(c).

[0141] Referring to the GUI shown in FIG. 3(e), the GUI is a full-screen translation load interface. The mobile phone translates the English on the current screen into Chinese by default. After completing the translation of the content displayed on the current screen, the mobile phone can automatically display the GUI shown in FIG. 3(f).

[0142] Referring to the GUI shown in FIG. 3(f), the GUI is a translation interface for full screen translation. The mobile phone translates the English essay displayed in FIG. 3(c) into the corresponding Chinese. The user can further tap the translation language in the translation interface. For example, when the user taps "Chinese", multiple other foreign languages ​​may be displayed, and the user can select another translation language. The translation interface further includes a "scroll translation" control 306 and a "copy translation" control. Upon detecting the user tapping the control 306, the mobile phone can display the GUI shown in FIG. 3(g).

[0143] It should be understood that in this embodiment of the present application, the scroll translation can also be called long screenshot translation. The difference between the scroll translation and the full screen translation is as follows: in the scroll translation, the mobile phone can first take a long screenshot of the source text content, and then automatically translate the content on the long screenshot (which may be a multi-screen content); in the full screen translation, the mobile phone can only translate the content (one screen content) displayed in the current source text, for example, as shown in FIG. 3(c).

[0144] Referring to the GUI shown in FIG. 3(g), the GUI is a scroll display interface for long screenshot capture. As shown in FIG. 3(g), the scroll display interface for long screenshot capture may include a prompt box 307. In the prompt box 307, a text "Take a scrolling screenshot...tap the scrolling area to complete screenshot capture" may be displayed to the user. The mobile phone may automatically scroll down the screen. For example, the process of the mobile phone automatically scrolling down the screen is shown in FIG. 3(g) to FIG. 3(h) and then in FIG. 3(i).

[0145] Referring to the GUI shown in FIG. 3(i), when the bottom of the English essay (or the end of the English essay) is reached through scrolling during the scrolling screenshot on the mobile phone, the mobile phone can automatically complete the screenshot. In this case, the start position of the long screenshot may be the start of the English essay shown in FIG. 3(c), and the end position of the long screenshot may be the end of the English essay. When the mobile phone completes the long screenshot, the mobile phone can automatically display the interface shown in FIG. 3(j).

[0146] Referring to the GUI shown in Fig. 3(j), the GUI is a scroll translation load interface. The mobile phone can translate the English on the long screenshot into the corresponding Chinese. After the translation is completed, the mobile phone can automatically display the GUI shown in Fig. 3(k).

[0147] Referring to the GUI shown in FIG. 3(k), the GUI is a translation interface of scroll translation. The mobile phone has already translated the English essay on the long screenshot into the corresponding Chinese. After the mobile phone detects the user's upward sliding operation on the screen, the mobile phone can display the translation content through scrolling. In the process of displaying the translation content through scrolling, a scroll bar 308 may further appear in the translation interface of scroll translation. When the mobile phone displays the translation content through scrolling downward, the scroll bar 308 may also slide down accordingly. The position of the scroll bar 308 may correspond to the position of the translation in the current interface in the entire translation.

[0148] Figure 3(k) to Figure 3(m) show the change process in which the mobile phone displays the translation content through scrolling. The user can view the corresponding translation by performing an upward or downward slide.

[0149] In one embodiment, when the user finishes viewing the translation corresponding to the long screenshot, the user can tap control 309 to exit the translation interface of the scrolling translation. In this embodiment of the present application, after detecting the user tapping the control 309, the mobile phone can display a source text interface. The source text interface may be a source text content display interface that exists when the electronic device starts taking the scrolling screenshot. For example, when detecting the user tapping the control 309, the mobile phone can display the GUI shown in FIG. 3(c).

[0150] It should be understood that FIG. 3(i) is described using an example in which long screenshot taking is automatically stopped after reaching the end of the English essay through scrolling during scrolling screenshot taking. Alternatively, the mobile phone can automatically stop taking long screenshots after detecting a user's tap operation before the screen of the mobile phone is automatically scrolled to the end of the English essay. Please refer to the GUIs of FIG. 4(a) to FIG. 4(l) for the corresponding process.

[0151] It should be further understood that the translation interface of Figures 3(k) to 3(i) may further display a "scroll translation" control 306. Alternatively, the mobile phone may not display the "scroll translation" control 306 in the translation interface after the mobile phone determines that all the content of the English essay has been translated (or when the mobile phone determines that the long screenshot capture has automatically stopped when the end of the English essay is reached through scrolling).

[0152] Above, with reference to FIG. 3(a) to FIG. 3(i), the process of a user opening an English essay, performing full-screen translation, and then performing scroll translation has been described. Specifically, the user can first perform full-screen translation, and a "scroll translation" control may be displayed in the translation interface of the full-screen translation, and then the user can perform scroll translation. In this way, after performing full-screen translation, the user can first determine whether the user is interested in the source text content. If the user is interested in the source text content, the user can continue to perform scroll translation to view more translation content. If the user is not interested in the source text content, the user can end the reading of the current source text, and then search for a source text that the user is interested in.

[0153] With reference to Figures 4(a) to 4(l), another group of GUIs provided in one embodiment of the present application will now be described.

[0154] Referring to the GUI shown in Fig. 4(a), the GUI is an AI touch display interface. A user can read the source text of an English essay by performing an upward / downward slide on the screen. When the mobile phone detects a user pressing the interface with two fingers as shown in Fig. 4(a), the mobile phone can display the GUI shown in Fig. 4(b).

[0155] Referring to the GUI shown in FIG. 4(b), the GUI is another display interface of AI touch. Compared with FIG. 3(d), the AI ​​touch interface in FIG. 4(b) includes two controls: full screen translation and scroll translation. The user may select full screen translation, specifically, translation is performed on the source text content (one screen content) of the interface shown in FIG. 4(a). Alternatively, the user may select scroll translation, specifically, a long screenshot is taken first, and the source text content (which may be a multi-screen content) displayed in the long screenshot is translated. Upon detecting the operation of tapping the control 401 performed by the user, the mobile phone can display the GUI shown in FIG. 4(c).

[0156] Referring to the GUI shown in FIG. 4(c), the GUI is a scrolling display interface for long screenshot taking. As shown in FIG. 4(c), the scrolling display interface for long screenshot taking may include a prompt box 402. In the prompt box 402, a text "Take a scrolling screenshot...tap the scrolling area to complete screenshot taking" may be displayed to the user. The mobile phone may automatically scroll down the screen. For example, FIG. 4(c) and FIG. 4(d) show a process of automatically scrolling down an English essay.

[0157] Referring to the GUI shown in Fig. 4(d), the GUI is another scroll display interface for long screenshot capture. When the mobile phone detects the user's tap action on the screen, the mobile phone can complete the long screenshot operation. The mobile phone can automatically display the GUI shown in Fig. 4(e).

[0158] Referring to the GUI shown in Fig. 4(e), the GUI is a scroll translation loading interface. The mobile phone can translate the English on the long screenshot into the corresponding Chinese. After the translation is completed, the mobile phone can automatically display the GUI shown in Fig. 4(f).

[0159] Referring to the GUI shown in FIG. 4(f), the GUI is a translation interface of scroll translation. The mobile phone has already translated the English essay on the long screenshot into the corresponding Chinese. After the mobile phone detects the user's upward or downward sliding operation on the screen, the mobile phone can display the translation content through scrolling.

[0160] The process of changing from the GUI shown in Fig. 4(f) to the GUI shown in Fig. 4(g) is a process of the user browsing the translation corresponding to the multi-screen content obtained through the first long screenshot capture. After browsing, if the user wants to continue browsing the translation corresponding to the remainder of the source text, the user can tap the "scroll translation" control 403. After detecting the user's tapping operation of the control 403, the mobile phone can display the GUI shown in Fig. 4(h).

[0161] Referring to the GUI shown in Fig. 4(h), the GUI is another display interface for taking a scrolling screenshot. The mobile phone can take a long screenshot from "Fee said he immediately ... rocks at it" (the last paragraph of the first long screenshot).

[0162] Referring to the GUI shown in FIG. 4(i), when detecting a user's tap operation on the screen, the mobile phone can complete the scroll translation. The last paragraph of the long screenshot is "Incidents like these are extremely ... in Ontario" shown in FIG. 4(i).

[0163] It should be understood that Figures 4(c) and 4(d) may be a process of taking a first long screenshot, and Figures 4(h) to 4(i) may be a process of taking a second long screenshot.

[0164] In one embodiment, when the mobile phone next takes a long screenshot, the start point of the next long screenshot may be the last paragraph of the current long screenshot, and the start point of the second long screenshot may be the last paragraph of the first long screenshot, as shown in FIG.

[0165] In one embodiment, the next time the mobile phone takes a long screenshot, the starting point of the next long screenshot may be, for example, the last two paragraphs of the current long screenshot.

[0166] For example, the mobile phone may instead take a long screenshot beginning with "The screams were so ... situation, ... in the back hip area" (the penultimate paragraph of the first long screenshot).

[0167] In one embodiment, the next time the mobile phone takes a long screenshot, the starting point for the next long screenshot may be the final screen content of the current long screenshot.

[0168] It should be understood that after the mobile phone takes a long screenshot, if the content of the long screenshot exceeds the size of one screen, the mobile phone may segment the content of the long screenshot into multi-screen content.

[0169] For example, in a long photo generated through long screenshot taking, the mobile phone can segment the photo based on the relationship between the height of the photo and the height of the mobile phone's screen, and determine whether a word or photo is cut off at the segmentation position through optical character recognition (OCR). If the mobile phone determines that a word or photo is cut off at the segmentation position, the mobile phone can move the segmentation position to a blank line position to obtain some photos whose height is slightly lower than or equal to the height of the screen. During the next scroll translation, a long screenshot can be taken starting from the last photo (or the final screen content) of the multiple photos (or multiple screen content) obtained through the current long screenshot taking. Alternatively, after analyzing the last photo (or the final screen content) obtained through the current long screenshot taking, the mobile phone may extract the content of the last paragraph, or the last few paragraphs, of the last photo as the starting point of the long screenshot taking during the next scroll translation.

[0170] In this way, the following advantages are achieved: In terms of reading experience, the user starts reading from the last picture (or the last screen content) of the previous translation, or the last few paragraphs of the last picture (or the last screen content), which has the function of retrieving memory and assisting the user in continuous reading.

[0171] Referring to the GUI shown in FIG. 4(i), upon detecting a user's tap operation on the screen, the mobile phone can automatically display the GUI shown in FIG. 4(j).

[0172] Referring to the GUI shown in Fig. 4(j), the GUI is another loading interface of scroll translation. The mobile phone can translate the English on the long screenshot into the corresponding Chinese. After the translation is completed, the mobile phone can automatically display the GUI shown in Fig. 4(k).

[0173] Referring to the GUI shown in FIG. 4(k), the GUI is a translation interface of scroll translation. The mobile phone has already translated the English essay on the long screenshot into the corresponding Chinese. After the mobile phone detects the user's upward or downward sliding operation on the screen, the mobile phone can display the translation content through scrolling.

[0174] The process of changing from the GUI shown in FIG. 4(k) to the GUI shown in FIG. 4(l) is the process of the user viewing the translation corresponding to the multi-screen content obtained through the second long screenshot. After viewing, if the user wants to continue viewing the translation corresponding to the remainder of the source text, the user can tap the "scroll translation" control 403. The mobile phone can perform a third scroll translation. For the process of the third scroll translation, please refer to the process of the second scroll translation described above. For the sake of brevity, the details will not be described again in this specification.

[0175] An embodiment of the present application provides a machine translation method. The mobile phone first enables long screenshot taking of an interface currently displaying a first language (also called source text), scrolls down the screen automatically, and stops taking long screenshots when it detects that the user can tap the screen. Then, the text data translated into a second language (also called translation) is displayed in a new interface, and the user can view the text data through up / down sliding. Then, the user can directly select to continue viewing subsequent content in the translation interface (the interface provides a "scroll translation" button for the user to tap). After the user taps the "scroll translation" button again, the mobile phone jumps to the source text interface and jumps to the position where the previous long screenshot taking stopped (the mobile phone remembers the position). The mobile phone can enable long screenshot taking and translation starting again from the position where the previous long screenshot taking stopped (or a few lines before that position, where the user can remember where the previous reading stopped by maintaining some redundant content) to repeat the aforementioned process until the end of the essay is reached. The method is not limited to translation of web-based browser clients, but can also be used in non-browser scenarios such as third-party information APPs, so that the applicable scenarios are greatly expanded and the continuity of the user's reading experience is further ensured.

[0176] In this embodiment of the present application, after a user triggers an operation of translating a source text, the electronic device can display a "full screen translation" option and a "scroll translation" option, so that multiple translation methods are provided to the user for selection, thereby improving the user experience of translating the source text by the user.

[0177] The aforementioned two groups of GUIs shown in Figures 3(a) to 3(m) and 4(a) to 4(l) are the process of triggering long screenshot taking by tapping the "scroll translation" control, and then translating one or more photos acquired through long screenshot taking. With reference to Figures 5(a) to 5(f), the process of first performing a long screenshot operation and triggering translation of a long screenshot photo in the processing interface of the acquired long screenshot photo is described below.

[0178] 5(a) through 5(f) show another grouping of GUIs according to one embodiment of the present application.

[0179] Referring to the GUI shown in Fig. 5(a), the GUI is a display interface for an English essay 303. When the mobile phone detects that the user has drawn an "S" with his / her knuckle on the interface, the mobile phone can enable a long screenshot operation and automatically display the GUI shown in Fig. 5(b).

[0180] Referring to the GUI shown in FIG. 5(b), the GUI is a scroll display interface for long screenshot taking. As shown in FIG. 5(b), the scroll display interface for long screenshot taking may include a prompt box 501. In the prompt box 501, a text "Take a scrolling screenshot...tap the scrolling area to complete screenshot taking" may be displayed to the user. The mobile phone may automatically scroll down the screen. For example, FIG. 5(b) and FIG. 5(c) show a process of automatically scrolling down an English essay.

[0181] Referring to the GUI shown in Fig. 5(c), the GUI is another scroll display interface for long screenshot capture. When the mobile phone detects the user's tap action on the screen, the mobile phone can complete the long screenshot operation. The mobile phone can automatically display the GUI shown in Fig. 5(d).

[0182] Referring to the GUI shown in FIG. 5(d), the GUI is a processing interface for a photo acquired through long screenshot shooting. The processing interface includes processing methods for a photo acquired through long screenshot shooting, and the processing methods include sharing, editing, deleting, and translating. A user can share a photo acquired through long screenshot shooting with another user by tapping "share". Alternatively, a user can edit a photo acquired through long screenshot shooting by tapping "edit". For example, a user can perform editing processes such as brightness editing, exposure editing, and cropping on a photo. Alternatively, a user can delete a photo acquired through long screenshot shooting by tapping "delete". When the mobile phone detects an operation of tapping the control 502 corresponding to "translation" by a user, the mobile phone can display a GUI shown in FIG. 5(e).

[0183] It should be understood that the differences from FIG. 4(d) and FIG. 4(i) are as follows. In FIG. 4(d) and FIG. 4(i), the translation is automatically performed after the scrolling screenshot taking (or long screenshot taking) is completed. In other words, after detecting that the user taps the "scrolling translation" control, the mobile phone can automatically trigger two operations of scrolling screenshot taking (or long screenshot taking) and machine translation. In FIG. 5(d), the machine translation is triggered after the user taps the "translation" control 502 in the processing interface of the photo acquired through the long screenshot taking. In other words, the mobile phone needs to detect different trigger operations of the user to perform the long screenshot taking and machine translation.

[0184] Referring to the GUI shown in FIG. 5(e), the GUI is a translation loading interface of the photo acquired through long screenshot shooting. The mobile phone can translate the English on the photo acquired through long screenshot shooting into the corresponding Chinese. After the translation is completed, the mobile phone can automatically display the GUI shown in FIG. 5(f).

[0185] Referring to the GUI shown in FIG. 5(f), the GUI is a translation interface for a photo acquired through long screenshot shooting. The mobile phone has already translated the English essay on the photo acquired through long screenshot shooting into the corresponding Chinese. After the mobile phone detects the user's upward or downward sliding operation on the screen, the mobile phone can display the translation content through scrolling.

[0186] In one embodiment, if the user wants to continue viewing the translation corresponding to the remaining content in the English essay, the user can tap the "scroll translation" control 503 shown in Figure 5(f) and the mobile phone can continue to perform the scrolling translation process. For the scrolling translation process, please refer to the GUIs of Figures 3(a) to 3(m) or 4(a) to 4(l).

[0187] 6(a) through 6(d) show another grouping of GUIs according to an embodiment of the present application.

[0188] Referring to the GUI shown in Fig. 6(a), the GUI is a display interface of an English essay 303. Upon detecting a pressing operation performed by a user on the word "family" in the interface, the mobile phone can automatically display the GUI shown in Fig. 6(b).

[0189] Referring to the GUI shown in FIG. 6(b), the GUI is another display interface of the English essay 303. A prompt box 601 can automatically pop up in the display interface. The prompt box 601 includes “Copy”, “Share”, “Select All”, “Web Search”, “Search”, and a control 602.

[0190] Referring to the GUI shown in Fig. 6(c), the GUI is another display interface of the English essay 303. After detecting the user tapping the control 602, the mobile phone can automatically display a prompt box 603. The prompt box 603 includes "scroll translation" and "full screen translation".

[0191] Referring to the GUI shown in Fig. 6(d), the GUI is another display interface of the English essay 303. After detecting the user tapping the "scroll translation" control 604, the mobile phone can perform scroll translation. For the subsequent GUI display, please refer to Fig. 4(c) to Fig. 4(g). For the sake of brevity, the details will not be described again in this specification.

[0192] 7(a) through 7(d) show another grouping of GUIs according to one embodiment of the present application.

[0193] Referring to the GUI shown in Fig. 7(a), the GUI is a display interface of an English essay 303. Upon detecting a pressing operation performed by a user on the word "family" in the interface, the mobile phone can automatically display the GUI shown in Fig. 7(b).

[0194] Referring to the GUI shown in FIG. 7(b), the GUI is another display interface of the English essay 303. In the display interface, the mobile phone can automatically select the word "family" and automatically display a prompt box 701. The prompt box 701 includes "Copy", "Share", "Select All", "Web Search", "Search", etc. When the mobile phone detects that the user taps the cursor 701 and slides the cursor 701 to the right, the mobile phone can select more words and display them in the GUI shown in FIG. 7(c).

[0195] Referring to the GUI shown in FIG. 7(c), the GUI is another display interface of the English essay 303. In the display interface, the mobile phone can automatically select the multiple words “family was fast asleep” based on the user’s sliding operation, and automatically add a “scroll translation” function option to the prompt box 701.

[0196] Referring to the GUI shown in Fig. 7(d), after detecting the user tapping the "scroll translation" control 702, the mobile phone can perform crawl translation. For the subsequent GUI display, please refer to Fig. 4(c) to Fig. 4(g). For the sake of brevity, the details will not be described again in this specification.

[0197] In this embodiment of the present application, in order to provide more prompts to the user, when performing the next scrolling translation (or long screenshot translation), the mobile phone can further add prompts to the GUI at the start position of the screenshot taking and the end position of the previous reading.

[0198] 8(a) through 8(e) show another group of GUIs according to one embodiment of the present application.

[0199] Referring to the GUI shown in FIG. 8(a), the GUI may be a translation interface of a first scroll translation. The mobile phone has already translated the English essay on the photo acquired through the first long screenshot into the corresponding Chinese. After the mobile phone detects the user's upward or downward sliding operation on the screen, the mobile phone can display the translation content through scrolling. When the mobile phone detects the user's tapping operation of the control 801 in the translation interface, the mobile phone can display the GUI shown in FIG. 8(b).

[0200] Referring to the GUI shown in FIG. 8(b), the GUI may be a display interface of a second scroll translation. The display interface may include two prompt information for the user. One prompt information is before the paragraph "Fee said he immediately ... rocks at it". The mobile phone may show the user "the start position of the current screenshot taking" and then show the user "this is where the previous reading ended" after the paragraph.

[0201] Referring to the GUI shown in Fig. 8(c), the GUI is another display interface for taking a second scrolling screenshot. When the mobile phone detects a user's tap operation on the screen, the mobile phone can complete the second scrolling screenshot and display the GUI shown in Fig. 8(d).

[0202] Referring to the GUI shown in FIG. 8(d), the GUI is a translation loading interface of the second scrolling screenshot. The above-mentioned prompt information can also be displayed in the loading interface, so that the user can first view the starting point of the current scrolling screenshot and the position of the source text where the previous reading ended before reading the translation of the second scrolling screenshot. In this way, the following advantages are achieved: Before reading the translation of the second scrolling screenshot, the user can re-familiarize himself with the content of the source text in the second scrolling screenshot. This has the function of evoke memory and assist the user in continuous reading.

[0203] 8(e), the GUI is a translation display interface for taking a second scroll screenshot. The above-mentioned prompt information can also be displayed in the translation display interface.

[0204] In one embodiment, the mobile phone can only display one of the two above mentioned prompt information.

[0205] For example, only the prompt information "This is where your previous reading ended" may be displayed in Figures 8(b), 8(d), and 8(e).

[0206] For example, only the prompt information "Start position of current screenshot capture" may be displayed in FIG. 8(b), FIG. 8(d), and FIG. 8(e).

[0207] 9(a) through 9(f) show another grouping of GUIs according to one embodiment of the present application.

[0208] Referring to the GUI shown in Fig. 9(a), the GUI may be a translation interface of a first scroll translation. When detecting an operation of tapping a control 901 by a user in the translation interface, the mobile phone may display the GUI shown in Fig. 9(b).

[0209] Referring to the GUI shown in Fig. 9(b), the GUI may be a display interface of a second scrolling translation. Compared with Fig. 4(h), the second scrolling screenshot capture does not include the content of the previous scrolling screenshot capture, that is, the second scrolling screenshot capture may not include redundant source text content.

[0210] Referring to the GUI shown in Fig. 9(c), the GUI is another display interface for taking a second scrolling screenshot. When the mobile phone detects a user's tap operation on the screen, the mobile phone can complete the second scrolling screenshot and display the GUI shown in Fig. 9(d).

[0211] Referring to the GUI shown in FIG. 9(d), the GUI is a translation loading interface for taking a second scrolling screenshot.

[0212] 9(e), the GUI is a translation display interface of the second scrolling screenshot capture, and the translation content displayed in the translation display interface does not include the translation content of the first scrolling screenshot capture.

[0213] 9(e) to 9(f) show a process in which the mobile phone displays the translation content through scrolling. When the mobile phone detects the user's upward or downward sliding operation, the mobile phone can display the translation content through scrolling.

[0214] In the GUIs shown in FIG. 3(a) to FIG. 9(f), when the first full-screen translation is completed and the next scroll translation is performed, the electronic device needs to return to the source text display interface for the scroll translation and then return to the translation interface so that the user can view the desired translation content. In this embodiment of the present application, after the electronic device performs one full-screen translation or one scroll translation, if the electronic device detects the user tapping the "scroll translation" control, the electronic device does not need to switch to the source text interface, but may directly load the remainder of the source text in the background, take a scrolling screenshot of the remainder of the source text, and obtain part or all of the translation of the remainder of the source text. The user can continue to read the subsequent translation in the translation interface without switching between multiple interfaces, so that the continuity of the user's reading experience is improved.

[0215] 10(a) through 10(e) show another group of GUIs according to one embodiment of the present application.

[0216] Referring to the GUI shown in FIG. 10(a), the GUI is a translation display interface obtained after a user performs a first scrolling translation, and the user can view the translation content of the first scrolling translation by performing an upward slide with a finger.

[0217] For example, FIG. 10(a) may show a GUI obtained based on FIGS. 4(a) to 4(f).

[0218] Referring to the GUI shown in FIG. 10(b), the GUI is a translation display interface obtained after a user performs a first scroll translation. The final paragraph of the first scroll translation is: [Table 1] After the mobile phone detects that the user has tapped the control 1001, the mobile phone can display the GUI shown in FIG.

[0219] Referring to the GUI shown in Figure 10(c) to Figure 10(e), the GUI is another translation display interface. After the mobile phone detects the user tapping the control 1001, the mobile phone can automatically load the translation corresponding to the remainder of the source text in the background and display the translation to the user.

[0220] It should be appreciated that after the user taps control 1001, the mobile phone may translate all of the remainder of the source text and then present the translation corresponding to all of the remainder of the source text to the user. Once all of the remaining translation content has been displayed to the user, the "Continue Translation" 1001 and "Copy Translation" controls may not be displayed in the translation display interface.

[0221] In one embodiment, after the control 1001 is tapped on the mobile phone, the mobile phone can further prompt the user to select a percentage of the remaining source text for translation. For example, the mobile phone can prompt the user to select 20%, 40%, 60%, 80%, or 100% of the remaining source text for translation. After the mobile phone detects that the user tapped a percentage, the mobile phone can take a screenshot of the remaining source text based on the percentage and then retrieve a translation of the content corresponding to the screenshot to present the translation to the user.

[0222] In one embodiment, after the control 1001 is tapped on the mobile phone, the mobile phone can automatically capture one or more screens of the remainder of the source text and then retrieve a translation of the content corresponding to the screenshots in order to present the translation to the user. For example, there may be a default case where the mobile phone automatically captures two screens of the remainder of the source text when the user taps the control 1001 once.

[0223] In one embodiment, the user can tap a "continue translation" control in the translation interface obtained after the first full-screen translation, and then the mobile phone can automatically present the user with a translation corresponding to all of the remainder of the source text. Specifically, in this case, after the user taps the "continue translation" control, the mobile phone can automatically take a scrolling screenshot of the remainder of the source text. The captured content can include all of the remainder of the source text. The scrolling screenshot process can be visible or invisible to the user. For example, as shown in FIG. 3(f), after the user taps control 306 (which may also be called "scrolling translation" or "continue translation"), the mobile phone can directly display the translation interface shown in FIG. 3(k) to FIG. 3(m) without switching to the interface shown in FIG. 3(g) to take a scrolling screenshot. Alternatively, the "scrolling screenshot" control and the "copy translation" control may not be displayed in the GUI shown in FIG. 3(k) to FIG. 3(m).

[0224] In the GUI shown in Figures 10(a) to 10(e), if a user wants to view more translations, after the mobile phone detects that the user taps the "continue translation" control, the electronic device can automatically obtain more translation results of the source text after taking a screenshot (which may be a full-screen screenshot or a long screenshot) in the background, so as to avoid switching between the source text and the translation, and present the translation results to the user, which further improves the user experience of viewing the translations by the user.

[0225] Above, the GUI of the machine translation process provided in an embodiment of the present application has been described with reference to the GUIs in Fig. 3(a) to Fig. 10(e). Another machine translation method provided in an embodiment of the present application will be described below with reference to Fig. 11.

[0226] 11 is a schematic flowchart of a machine translation method 1100 according to an embodiment of the present application. As shown in FIG. 11, the method 1100 can be performed by a mobile phone, and the method includes the following steps:

[0227] S1101. The mobile phone detects a two-finger pressing operation in a source text display interface and enables AI Touch.

[0228] For example, as shown in Fig. 4(a), after detecting a two-finger pressing operation on the display interface of an English essay, the mobile phone activates AI Touch, which can include a "full screen translation" function option and a "scroll translation" function option (the function option can also be called a control).

[0229] S1102. The mobile phone detects an operation of tapping on "scroll translation" by the user, and the mobile phone starts to automatically scroll the screen.

[0230] For example, as shown in FIG. 4(b), when the mobile phone detects a user tapping on control 401, the mobile phone can enable scrolling translation.

[0231] The user reads the source text and presses the screen with two fingers, resulting in a "scroll translation" option. The option is tapped to activate a long screenshot action, where the screen content automatically slides up at a specific speed and rhythm. A prompt appears above the screen content indicating the user can stop taking the screenshot through tapping. Alternatively, screenshot taking stops automatically when the end of the essay is reached.

[0232] For example, FIG. 4(c) and FIG. 4(d) show the process by which a mobile phone automatically scrolls a screen.

[0233] S1103. The mobile phone may stop taking a scrolling screenshot when the mobile phone detects that the user has tapped a location on the screen or when the mobile phone detects that the end of the source text has been reached automatically through the slide.

[0234] For example, as shown in FIG. 4(d), the mobile phone may stop taking a scrolling screenshot when the mobile phone detects that the user has tapped at a location on the screen.

[0235] S1104. Obtain a long photo obtained through long screenshot shooting.

[0236] S1105. Crop the long photo acquired through the long screenshot capture to acquire a plurality of small photos whose height is equal to or less than a preset height, and the small photos can be sent to the cloud for translation each time a small photo is acquired through cropping.

[0237] In one embodiment, the pre-set height is the height of a mobile phone screen.

[0238] In one embodiment, the preset height is a preset value less than the height of a mobile phone screen.

[0239] For example, for a long photo generated through long screenshot taking, the mobile phone can segment the photo based on the relationship between the height of the photo and the height of the mobile phone's screen, and determine whether a word or a photo is cut off at the segmentation position through OCR. If it is found that a word or a photo is cut off at the segmentation position, the mobile phone will move the segmentation position to a blank line position to obtain some photos whose height is slightly lower or equal to the height of the screen.

[0240] In the segmentation process, the generated multiple photolets may be numbered based on the order of the source text, and the photolets are sent to the translation cloud for translation each time a photolet is generated.

[0241] It should be understood that when the mobile phone segments a long photo into multiple photolets, the photolets may be numbered based on the order of the source text, or label information may be added to each photolet by the mobile phone, and these photolets are sent to the translation cloud for translation.

[0242] S1106. The mobile phone obtains the translation results of each small photo from the cloud.

[0243] S1107. The mobile phone determines whether each small photo has been translated successfully.

[0244] It should be understood that the mobile phone can determine whether each photolet has been successfully translated based on a flag bit indicating whether the translation result of each photolet has been successfully saved.

[0245] S1108. If the received photomath is successfully translated, the mobile phone renders and stores the translation result corresponding to the photomath.

[0246] S1109. If the received photo is not translated normally, the mobile phone stores the source text corresponding to the photo as the translation result.

[0247] S1110. The mobile phone judges whether or not it has received the translation results of all the small photos.

[0248] S1111. When the mobile phone receives the translation results of all the small photos, the mobile phone can continue to determine whether the number of successfully translated photos among all the small photos is less than a preset threshold.

[0249] If the mobile phone has not received the translation results of all the small photos, the mobile phone may continue to execute S1106.

[0250] S1112. If the mobile phone determines that the number of successfully translated photos among all the sub-photos is less than a preset threshold, the mobile phone can use a list view to display all the translation results.

[0251] S1113. If the mobile phone determines that the number of successfully translated photos among all the sub-photos is equal to or greater than a preset threshold, the mobile phone can indicate to the user that the translation has failed and whether to run the translation again.

[0252] In one embodiment, after obtaining the translation result returned by the cloud, the mobile phone determines whether the small picture corresponding to the translation result is successfully translated. If the small picture is successfully translated, the mobile phone renders and saves the translation result. If the small picture is not successfully translated, the mobile phone saves the source text as the translation result. After receiving the translation results of all small pictures, the mobile phone calculates the percentage of pages that are not successfully translated, and determines whether the percentage exceeds a specified threshold (e.g., the total percentage of pages that are not successfully translated is 60% or more), and prompts the user to re-input (the probability in this case is relatively low). If the translation is successful, the mobile phone sorts the translation results based on the order of the returned page numbers or the labels of the returned pages (i.e., the order of the source text), and displays the sorted translation results. The translation display content starts from the first small picture of the long picture.

[0253] For example, the mobile phone segments the long photo obtained through long screenshot shooting to obtain 10 small photos, and the small photos are numbered in sequence and then sent to the cloud. The mobile phone obtains the translation results of the 10 small photos from the cloud, where 8 small photos are successfully translated and 2 small photos are not successfully translated, in this case, the mobile phone can also determine that the current scroll translation is successful. When displaying the translation result, the mobile phone can piece together the translation results of the 10 small photos based on the numbers. The source text can be displayed at the position of the 2 small photos that were not successfully translated, and the corresponding translation can be displayed at the position of the other 8 small photos that were successfully translated.

[0254] It should be understood that in S1106, the mobile phone may send multiple small photos to the cloud in sequence, and when obtaining the translation results of the multiple small photos from the cloud, the mobile phone may not obtain the translation results of the small photos based on the sending order. Because the content of each small photo is different, the time period for performing the translation process on the small photos by the cloud is also different. Therefore, the mobile phone may not receive the translation results of the small photos based on the sending order. Because each small photo is numbered or labeled, when the mobile phone receives the translation results of the multiple small photos, it can stitch together the translation results of the multiple small photos based on the number or label.

[0255] S1114: When it is detected that the user has instructed to execute the translation again, the mobile phone can execute the translation again from S1106.

[0256] S1115. The mobile phone determines whether the user continues to perform a long screenshot operation.

[0257] When a user's tapping and continuing to tap "scroll translation" is detected in the translation result interface, the mobile phone may execute S1105 to S1114 again.

[0258] It should be understood that when executing S1102 to S1114 again, the mobile phone may automatically jump to the last sub-photo of the long photo obtained through the previous long screenshot shooting and start the next scrolling translation, or may automatically jump to the last sub-photo of the long photo obtained through the previous long screenshot shooting and take a long screenshot starting from the last paragraph or the last few paragraphs of the last sub-photo.

[0259] After viewing the translation content of the first long screenshot, the user may choose to continue viewing the subsequent content, in other words, to continue using the scroll translation function, or to exit the translation result interface. If the user exits the translation result interface, the mobile phone returns to the position of the source text content of the last small photo or the last paragraph or the last few paragraphs of the last small photo where the previous long screenshot was stopped. If the user continues to use the scroll translation (in other words, if the user wants to continue reading the subsequent content), the mobile phone displays the source text content of the last small photo where the previous long screenshot was stopped, or displays the source text content of the last paragraph or the last few paragraphs of the last photo where the previous long screenshot was stopped, and also enables a new long screenshot operation to enter a new cycle until the end of the essay is reached.

[0260] In one embodiment, if the user wants to continue reading the subsequent content from the translation result interface of the current long screenshot, the mobile phone needs to return to the source text content of the last photo where the current long screenshot stops, and enable the next scroll translation operation starting from the content of the photo. In this way, the following advantages are achieved: In terms of reading experience, the user starts reading from the last page of the previous translation, which has the function of recalling memory and supporting continuous reading. If the current long screenshot stops because the end of the essay is reached through scrolling, the "scroll translation" option that the user can keep tapping is hidden in the translation result interface.

[0261] S1116. When the mobile phone detects that the user exits the translation result interface of taking a long screenshot, the mobile phone can display the last short photo of the long photo obtained through the previous long screenshot.

[0262] In one embodiment, the mobile phone may instead display the last paragraph or the last few paragraphs of the last sub-photo of the longer photo captured through the previous long screenshot.

[0263] Compared with browser-based web translation, the machine translation method of this embodiment of the present application has a wider scope of application and is not limited to the case where a user needs to browse news using a browser. Especially when a mobile phone is used, many users browse third-party information APPs, such as NetEase News or today's headlines. The browser-based web full-text translation method cannot be used in third-party APP scenarios, but the machine translation method provided in this embodiment is applicable.

[0264] Similarly, when using single-picture-based translation, the operation is cumbersome. Specifically, if a user wants to view the translation content of a multi-screen content, the user needs to tap the "translate" button once for each screen. Therefore, the operation is cumbersome and time-consuming, and the user's continuous reading is interrupted. In the machine translation method provided in this embodiment, to read the translation of the subsequent content, the user only needs to tap the "translate" button once and then continue to trigger the scrolling translation of the previous translation result interface.

[0265] The machine translation method of this embodiment of the present application can reduce the tedious operations performed when a user browses a translation corresponding to a source text, improve the intelligence of the electronic device, and improve the user experience in the process of browsing a translation by the user.

[0266] With reference to the above embodiments and the associated accompanying drawings, an embodiment of the present application provides a machine translation method. The method can be implemented by an electronic device (e.g., a mobile phone or a tablet computer) having a touch screen as shown in Figure 1 and Figure 2. As shown in Figure 12, the method can include the following steps:

[0267] S1201. An electronic device displays a first user interface on a touch screen, the first user interface including a first content, and a language of the first content is a first language.

[0268] For example, the first user interface may be the GUI shown in FIG. 4(a).

[0269] S1202. The electronic device detects a first operation in a first user interface, the first operation including a user operation triggering a scrolling translation by a user.

[0270] For example, in the GUI shown in Fig. 4(b), the first action may be a user tapping on control 401. Alternatively, the first action may be a user entering a voice command that is used to trigger a scrolling translation function.

[0271] S1203. In response to the first operation, the electronic device captures a scrolling screenshot starting from the first position of the first user interface.

[0272] For example, in the GUI shown in Fig. 4(c), the first position may be the start position of the English essay 303. For example, a scrolling screenshot is taken starting with the title "A family ... were sleeping".

[0273] S1204. In the scrolling screenshot process, when a second operation of the user is detected in the second user interface or an end position is reached through scrolling of the second user interface, the electronic device stops taking the scrolling screenshot at a second position of the second user interface and obtains a first picture, the first picture being a picture corresponding to a second content, the second content including content from the first position to the second position, and the language of the second content is the first language.

[0274] For example, in the GUI shown in FIG. 4(d), the content displayed in the second user interface is from "I don't think ... she wrote" to "Fee said ... rocks at it." After the mobile phone detects a user action at any position in the second user interface, the mobile phone may stop taking the scrolling screenshot at the end position of the last paragraph in the second user interface. As shown in FIG. 4(d), the second position may be the end position of the paragraph "Fee said ... rocks at it."

[0275] In one embodiment, when the end position of the second user interface is not a complete paragraph, the second position may be the end position of the last line of the paragraph that is displayed in the second user interface.

[0276] In one embodiment, if the end location of the second user interface is a photo or a portion of a photo, the second location may be the end location of a paragraph above the photo or portion of the photo.

[0277] S1205. The electronic device automatically obtains a translation result of the second content based on the first photograph, where a language of the translation result of the second content is the second language.

[0278] For example, after acquiring a first photo, the mobile phone can process the first photo according to the method of method 1100. For example, the mobile phone can segment the first photo into multiple photos based on a relationship between the height of the first photo and the height of the screen of the mobile phone, and then send the multiple photos to a server for translation. The mobile phone can receive the translation result sent by the server for each of the multiple photos, and generate a translation result of the second content from the translation result of each photo.

[0279] For example, the translation result of the second content is the translation corresponding to the title [Table 2] Translation of the last paragraph before the second position from [Table 3] It may be up to.

[0280] S1206. After automatically obtaining some or all of the translation result of the second content, the electronic device automatically displays a third user interface, where the third user interface includes some or all of the translation result of the second content.

[0281] In this embodiment of the present application, the translation result of the second content obtained by the mobile phone may be the whole of the translation result of the second content, in other words, the mobile phone obtains the translation results of multiple photos, and each photo may be successfully translated or may be a part of the translation result of the second content. For example, after receiving multiple photos, the server may not successfully translate one of the photos, and the mobile phone can also display the translation corresponding to the successfully translated photo. The mobile phone can generate the translation result of the second content from the source text content corresponding to the photo that was not successfully translated and the translation content corresponding to another photo.

[0282] For example, the third user interface may be a GUI as shown in FIG. 4(f), and may include a part of the second content. [Table 4] from [Table 5] may be displayed in the GUI.

[0283] After detecting the user's upward sliding operation on the third user interface, the electronic device can display the remaining part of the translation result of the second content. As shown in FIG. 4(g), after detecting the user's upward sliding operation on the touch screen, the mobile phone can display the remaining translation result ( [Table 6] from [Table 7] (up to) can be displayed.

[0284] In one embodiment, the method 1200 further includes:

[0285] The electronic device detects a third operation in a fourth user interface, the fourth user interface including a final portion of the translation result of the second content, and the third operation includes a user operation triggering a scrolling translation by the user.

[0286] For example, the fourth user interface may be a GUI as shown in FIG. 4(g). The GUI includes a final part of the translation result of the second content. The final part includes: [Table 8] The third operation may be an operation in which the user taps on the “scroll translation” control 403.

[0287] In response to the third operation, the electronic device automatically displays a fifth user interface and takes a scrolling screenshot starting at a third location of the fifth user interface, the fifth user interface including third content, the third location associated with the second location, and a language of the third content is the first language.

[0288] For example, the fifth user interface may be the GUI shown in FIG. 4(h), and the third content may be: [Table 9] from [Table 10] The GUI indicates that the mobile phone will take a scrolling screenshot beginning with the paragraph "Fee said ... rocks at it."

[0289] In the scrolling screenshot process, when a fourth operation of the user is detected in the sixth user interface or an end position is reached through scrolling, the electronic device stops taking the scrolling screenshot at the fourth position of the sixth user interface to obtain a second photo, where the second photo is a photo corresponding to a fourth content, the fourth content includes content from the third position to the fourth position, and the language of the fourth content is the first language.

[0290] For example, the sixth user interface may be the GUI shown in FIG. 4(i). After the mobile phone detects any operation performed by the user in the GUI, the mobile phone may stop taking the scrolling screenshot. The fourth position may be the end position of the last paragraph of the GUI shown in FIG. 4(i), "Incidents like these ... and one in Ontario." In this case, the fourth content included in the second picture may be the English content from "Fee said ... rocks at it." to "Incidents like these ... and one in Ontario."

[0291] The electronic device automatically obtains a translation result of the fourth content based on the second picture, and a language of the translation result of the fourth content is the second language.

[0292] For example, the electronic device can segment the second photo into a plurality of photos, then send the plurality of photos to a server for translation, and obtain a translation result of the plurality of photos from the server. The electronic device can generate a translation result of the fourth content from the translation result of the plurality of photos.

[0293] After automatically obtaining some or all of the translation result of the fourth content, the electronic device automatically displays a seventh user interface, where the seventh user interface includes some or all of the translation result of the fourth content.

[0294] For example, the seventh user interface may be the GUI shown in FIG. 4(k), and the GUI includes a part of the translation result of the fourth content. For example, the translation result displayed in the GUI is from "Fee said ... rocks at it" to "It could ... she wrote."

[0295] After detecting the user's upward sliding operation on the seventh user interface, the electronic device can display the remaining part of the translation result of the fourth content. As shown in FIG. 4(l), after detecting the user's upward sliding operation on the touch screen, the mobile phone can display the remaining translation result ( [Table 11] from [Table 12] (up to) can be displayed.

[0296] In one embodiment, the method 1200 further includes:

[0297] The electronic device detects a fifth operation in an eighth user interface, the eighth user interface including a final portion of the translation result of the second content, and the fifth operation includes a user operation triggering further translation by the user.

[0298] For example, the eighth user interface may be the GUI shown in FIG. 10(b), and the GUI may be obtained through full-screen translation or through scrolling translation. The GUI may include the last part of the translation result of the second content, and the last part may be [Table 13] The fifth operation may be an operation in which the user taps the “continue translation” control 1001.

[0299] The electronic device automatically obtains a translation result of the fifth content in response to the fifth operation, the fifth content including some or all of the content corresponding to the first language other than the second content, and the language of the translation result of the fifth content is the second language.

[0300] For example, after the mobile phone detects a user tapping on control 1001, the mobile phone can obtain a translation result of the source text content other than the part of the source text from "A family ... were sleeping" to "Fee said ... rocks at it" in the source text, in other words, the mobile phone can automatically obtain a translation result from "Meanwhile ... to safety" to the end position "2019 Cable ... All rights Reserved." in the English essay 303.

[0301] For example, after detecting the user tapping the control 1001, the mobile phone can obtain a third photo. The third photo includes the content of the English essay 303 from "Meanwhile ... to safety" to the end position "2019 Cable ... All rights Reserved." The mobile phone can segment the third photo into multiple photos, then send the multiple photos to a server for translation, and obtain a translation result for each photo sent by the server. The mobile phone can combine the translation results of the multiple photos into a translation result of the fifth content.

[0302] For example, the fifth content may instead include a portion of content other than the second content. For example, after detecting a user tapping on the control 1001, the electronic device may segment the content other than the second content into multiple portions, and the second content may be content of a first portion of the multiple portions.

[0303] For example, the fifth content may instead include a portion of the previously read content.

[0304] The electronic device automatically displays the ninth user interface after automatically obtaining some or all of the translation result of the fifth content, or displays the ninth user interface after receiving a user's slide operation, and the ninth user interface includes some or all of the translation result of the fifth content.

[0305] For example, the GUI shown in FIG. 10(c) displays a part of the translation result of the fifth content, e.g. [Table 14] from [Table 15] Including up to.

[0306] In one embodiment, the method 1200 further includes: In response to the fifth operation, the electronic device automatically takes a screenshot to obtain a third photograph, where the third photograph includes the fifth content.

[0307] For example, the electronic device may obtain the third photograph through screenshot taking or scrolling screenshot taking.

[0308] After obtaining the third photo, the electronic device can send the third photo or a photo corresponding to a portion of the third photo to the server. The electronic device receives a translation result, which is for the third photo or a photo corresponding to a portion of the third photo, returned by the server.

[0309] In one embodiment, the electronic device automatically taking a screenshot to obtain a third photograph may mean that the electronic device captures the content of one or more screens to obtain the third photograph. The automatic screenshot process may be visible or invisible to the user.

[0310] For example, in the processes from Figures 10(b) and 10(c), the automatic screenshot process is invisible to the user. In another example, in the processes from Figures 4(g) to 4(k), the automatic screenshot process is visible to the user.

[0311] In one embodiment, after automatically obtaining the translation result of the fifth content, the electronic device can continue to display the third user interface. However, when the user performs an upward slide on the touch screen, the mobile phone can display part or all of the translation result of the fifth content.

[0312] In one embodiment, before automatically obtaining the translation result of the second content, the method further includes: the electronic device automatically segments the first photo into a plurality of photos; the third position relates to a specific position within a last photo of the plurality of photos, the specific position being a start position, an end position, a middle position, or a predetermined percentage position of the last photo, or a start position of the last paragraph, or a start position of the last n lines of the last photo, where n is a positive integer and n is greater than or equal to 1.

[0313] For example, the first photo includes source text content from "A family ... were sleeping" to "Fee said ... rocks at it." The mobile phone can segment the first photo to obtain multiple photos. For example, after segmentation, two photos are obtained, the first photo includes source text content from "A family ... were sleeping" to "The family was ... clamped onto Matthew's arms." and the second photo includes source text content from "I don't ... she wrote" to "Fee said ... rocks at it."

[0314] For example, the third location may be the start location of the second photograph, in which case the start location for taking the scrolling screenshot shown in FIG. 4(h) may be "I don't ... she wrote."

[0315] In another example, the third position may be an intermediate position of the second photograph, such as "The wolf was ... jumped into help.", in which case the starting position for taking the scrolling screenshot shown in FIG. 4(h) may be "The wolf was ... jumped into help."

[0316] In another example, the third position may be a position of a predetermined percentage. For example, the third position may be a position two-thirds of the way into the second picture. For example, a scrolling screenshot is taken starting from the line "[the wolf]... in the back". In this case, the starting position for taking the scrolling screenshot shown in FIG. 4(h) may be "[the wolf]... in the back".

[0317] Alternatively, the third location may be the start location of the last paragraph of the second picture. As shown in FIG. 4(h), a scrolling screenshot may be taken starting from the last paragraph of the second picture, "Fee said ... rocks at it."

[0318] In another example, the third location may be the last n lines of the last paragraph of the second photo. For example, when n is 2, the mobile phone may take a scrolling screenshot starting with the line "and the two... throwing rocks."

[0319] In one embodiment, the step of automatically obtaining a translation result of the second content includes: the electronic device sends a plurality of photos to a server; the electronic device receives the translation result of the server for each of the plurality of photos; and the electronic device generates a portion of the translation result of the second content from the translation results of some of the plurality of photos or generates the translation result of the second content from the translation results of all of the plurality of photos.

[0320] It should be understood that the process of the electronic device segmenting the first photo and the second photo into multiple photos, and the process of the electronic device sending the multiple photos to the server for translation to obtain the translation result, refer to the description of method 1100. For the sake of brevity, the details will not be described again in this specification.

[0321] In one embodiment, associating the third location with the first photograph includes: the third location is associated with a specific location within the first photograph, the specific location being an end location, a middle location, or a predetermined percentage location of the first photograph, or a start location of the last paragraph, or a start location of the last n lines of the first photograph, where n is a positive integer and n is greater than or equal to 1.

[0322] In one embodiment, the third position is relative to an end position, an intermediate position, or a predetermined percentage position of the second content, or the third position is relative to a start position of the last paragraph or a start position of the last n lines of the second content, where n is a positive integer and n is greater than or equal to 1.

[0323] In this embodiment of the application, the electronic device may segment the first photograph into a plurality of photographs, and the third location may be associated with the last photograph of the plurality of photographs, or the last few photographs of the plurality of photographs. Alternatively, the electronic device may not segment the first photograph, and the third location may be associated with a particular location of the first photograph, and the third location may be associated with second content displayed in the first photograph.

[0324] In this embodiment of the present application, the electronic device jumps to a position in the source text near where the previous long screenshot capture stopped (the electronic device remembers the position), the electronic device enables scrolling screenshot capture to start again near where the previous long screenshot capture stopped (the position is associated with the first photo, and by maintaining some redundant content, the user can remember where the previous reading ended), and the photo obtained through scrolling screenshot capture can be sent to the server for translation. The method is not limited to the translation of web-based browser clients, and can be further used in non-browser scenarios such as third-party information APPs, so that the applicable scenarios are greatly expanded and the continuity of the user's reading experience is further guaranteed.

[0325] In one embodiment, the step of automatically obtaining a translation result of the second content includes: the electronic device sending the first photo or a photo corresponding to a portion of the first photo to a server; the electronic device receiving a translation result of the first photo or a photo corresponding to a portion of the first photo returned by the server.

[0326] For example, after obtaining a first photo, the electronic device may directly send the first photo to the server for translation without performing segmentation, or after the electronic device sends the first photo to the server, the electronic device segments the first photo into multiple photos, and the server returns the translation result for each photo to the electronic device after translating the multiple photos.

[0327] For example, after obtaining a first photo, the electronic device may segment the first photo into multiple photos and send the first photo or the first few photos of the multiple photos to a server for translation. The electronic device then obtains a translation result of the first photo or the first few photos returned by the server.

[0328] In one embodiment, the translation result of the second content includes content obtained after text content obtained by performing optical character recognition (OCR) text recognition on the first photograph is translated from the first language to the second language.

[0329] In one embodiment, the method further includes displaying first prompt information at or near the third location, the first prompt information being used to indicate to the user a starting location for taking a scrolling screenshot, and / or displaying second prompt information at or near the second location, the second prompt information being used to indicate to the user that a previous reading ended at the second location.

[0330] For example, in the GUI shown in FIG. 8(b), the first prompt information may be included at the start of "Fee said ... rocks at it", and the first prompt information may be "Start location of current screenshot capture", the second prompt information may be included at the end of "Fee said ... rocks at it", and the second prompt information may be "This is where the previous read ended".

[0331] In one embodiment, the first operation includes a user tapping a first control that can trigger a scrolling translation function or a user entering a voice command that can trigger a scrolling translation function.

[0332] For example, the first action may be a tap on the control 401 by the user, or the first action may be a voice command "scroll translate" input by the user.

[0333] In one embodiment, the third operation includes a user tapping a first control that can trigger the scrolling translation function or a user entering a voice command that can trigger the scrolling translation function.

[0334] For example, the third action may be a tapping action on the control 403 by the user, or the first action may be a voice command "scroll translate" input by the user.

[0335] In one embodiment, the method further includes displaying a tenth user interface after a user slide operation is received in the third user interface, the tenth user interface including a subsequent translation result associated with the translation result included in the third user interface.

[0336] For example, as shown in FIG. 10(d) and FIG. 10(e), after the mobile phone detects the user's upward sliding operation, the mobile phone can display the subsequent translation result.

[0337] In one embodiment, before detecting the third operation, the method further includes displaying, in a fourth user interface, a control capable of triggering a scrolling translation.

[0338] For example, as shown in FIG. 4(g), a mobile phone can use a display screen to display a control 403.

[0339] In one embodiment, before detecting the fifth operation, the method further includes displaying, in an eighth user interface, a control that can trigger a further translation.

[0340] For example, as shown in FIG. 10(b), a mobile phone can use a display screen to display a control 1001.

[0341] In one embodiment, the step of detecting a first operation on the first user interface includes: the electronic device displays a plurality of function controls after detecting a multi-finger pressing operation of a user on the first user interface; the plurality of function controls includes a first control capable of triggering a scroll translation; the electronic device detects that a user has tapped the first control or that a user has input a voice command capable of triggering a scroll translation function.

[0342] For example, in the GUI shown in Fig. 4(a), after detecting a two-finger pressing operation of a user, the mobile phone can display the GUI shown in Fig. 4(b). A plurality of function controls may be displayed in the GUI, and the plurality of function controls includes a control 401.

[0343] In one embodiment, the second content includes the first content and some or all of the content other than the first content among all content corresponding to the first language.

[0344] In one embodiment, the third content includes a portion of all content corresponding to the first language other than the second content, and the fourth content includes a portion or all of all content corresponding to the first language other than the second content.

[0345] In one embodiment, the third content may also include some or all of the second content, and the fourth content may also include some or all of the second content.

[0346] In one embodiment, the method further includes displaying an eleventh user interface after a user slide operation is received in the ninth user interface, the eleventh user interface including a subsequent translation result associated with the translation result included in the ninth user interface.

[0347] For example, in the GUI shown in FIG. 4(k), after detecting a user's slide operation, the mobile phone can display the subsequent translation result.

[0348] 13 is a schematic flowchart of a machine translation method 1300 according to an embodiment of the present application. As shown in FIG. 13, the method 1300 includes the following steps:

[0349] S1301. An electronic device displays a first user interface on a touch screen, the first user interface including a first content, and a language of the first content is a first language.

[0350] For example, the first user interface may be the GUI shown in FIG. 3(c), which includes English content from the title "A family ... were sleeping" to "The family was ... clamped onto Matthew's arms."

[0351] S1302. The electronic device detects a first operation of a user in a first user interface, the first operation including a user operation triggering a full-screen translation by the user.

[0352] For example, referring to the GUI shown in Fig. 3(d), the first operation may be a user tapping on the control 305. After detecting the user tapping on the control 305, the mobile phone may be first triggered to perform a screenshot operation.

[0353] S1303. In response to the first operation, the electronic device takes a screenshot of the first user interface to obtain a first photograph.

[0354] For example, referring to the GUI shown in FIG. 3(d), a first photograph may be obtained by a mobile phone by taking a screenshot of the source text content currently displayed on the screen, and the English content from the title "A family ... were sleeping" to "The family was ... clamped onto Matthew's arms." is displayed in the first photograph.

[0355] S1304. The electronic device automatically obtains a translation result of the first content based on the first photograph, where a language of the translation result of the first content is a second language.

[0356] For example, the electronic device may send a first photograph to a server and receive a translation result of the first photograph returned by the server.

[0357] The translation result of the first content includes content obtained after the text content obtained by performing optical character recognition (OCR) text recognition on the first photograph is translated from the first language to the second language.

[0358] S1305. After automatically obtaining the translation result of the first content, the electronic device automatically displays a second user interface, where the second user interface includes some or all of the translation result of the first content.

[0359] For example, the second user interface may be a GUI as shown in FIG. 3(f), which includes a translation result of the first content. The translation result of the first content may include a title, [Table 16] from [Table 17] That is until now.

[0360] S1306. The electronic device detects a second operation of the user in the second user interface, the second operation including a user operation triggering a scrolling translation by the user.

[0361] For example, the second user interface may include a control 306, and the second operation may be a user tapping on the control 306. After the mobile phone detects the user tapping on the control 306, the mobile phone may perform a scroll translation operation.

[0362] S1307. In response to the second operation, the electronic device automatically displays a third user interface and takes a scrolling screenshot starting from a first position of the third user interface, the third user interface including second content, the first position being associated with the first photo, and a language of the second content is the first language.

[0363] For example, in the GUI shown in Fig. 3(f), after detecting a user tapping the control 306, the mobile phone can automatically display the GUI shown in Fig. 3(g). The GUI shown in Fig. 3(g) is a display interface for taking a scrolling screenshot, and the first position may be the start position of the title "A family ... were sleeping".

[0364] S1308. In the scrolling screenshot process, when a third operation of the user is detected in the fourth user interface or an end position is reached through scrolling of the fourth user interface, the electronic device stops taking the scrolling screenshot at a second position of the fourth interface and obtains a second picture, the second picture is a picture corresponding to a third content, the third content includes content from the first position to the second position, and the language of the third content is the first language.

[0365] For example, as shown in FIG. 3(g) through FIG. 3(i), when an end position is reached through scrolling, the electronic device can automatically stop taking the scrolling screenshot, and the second position may be an end position of "2019 Cable News ... rights Reserved." Upon stopping the scrolling screenshot, the electronic device can capture a second photograph. The source text content from the start position of the title "A family ... were sleeping" to the end position of "2019 Cable News ... rights Reserved." can be displayed on the second photograph.

[0366] S1309. The electronic device automatically obtains a translation result of the third content based on the second photograph, where a language of the translation result of the third content is the second language.

[0367] For example, after acquiring the second photo through scrolling screenshot capture, the electronic device can continue to acquire a translation result of the third content on the second photo. For example, the electronic device can segment the second photo into multiple photos and send the multiple photos to a server for translation. The electronic device receives the translation result of the multiple photos returned by the server. The translation result of the multiple photos constitutes the translation result of the third content.

[0368] S1310. After automatically obtaining some or all of the translation result of the third content, the electronic device automatically displays a fifth user interface, where the fifth user interface includes some or all of the translation result of the third content.

[0369] For example, the fifth user interface may be shown in FIG. 3(k), and the GUI shown in FIG. 3(k) displays a part of the translation result of the third content, for example, a title. [Table 18] from [Table 19] Including up to.

[0370] In one embodiment, the method further includes displaying a sixth user interface after a user slide operation is received in the fifth user interface, the sixth user interface including a subsequent translation result associated with the translation result included in the fifth user interface.

[0371] After the electronic device detects the user's upward sliding action on the touch screen, the electronic device can display more translation content. For example, Figure 3(k) to Figure 3(m) show a process of displaying subsequent translations after the user performs a slide.

[0372] In one embodiment, before automatically obtaining the translation result of the third content, the method further includes: the electronic device automatically segments the second photo into a plurality of photos; the electronic device sends the plurality of photos to a server; the electronic device receives the translation result of the server for each of the plurality of photos; and the electronic device generates a portion of the translation result of the third content from the translation results of some of the plurality of photos, or generates the translation result of the third content from the translation results of all of the plurality of photos.

[0373] In one embodiment, the translation result of the third content includes content obtained after the text content obtained by performing OCR text recognition on the second photograph is translated from the first language to the second language.

[0374] It should be understood that for the process of the electronic device segmenting the second picture into multiple pictures, refer to the description of the method 1100. For the sake of brevity, the details will not be described again in this specification.

[0375] In one embodiment, the method further includes displaying first prompt information at or near the first location, the first prompt information being used to indicate to the user a start location for taking a scrolling screenshot, and / or displaying second prompt information at an end location of the first photo, the second prompt information being used to indicate to the user that the previous viewing has ended at the end location.

[0376] It should be understood that the first prompt information and the second prompt information refer to the GUIs shown in Figures 8(a) to 8(e). After the full-screen translation is completed, the mobile phone can display the first prompt information and / or the second prompt information in the scrolling screenshot interface when performing the scrolling translation.

[0377] In one embodiment, the second operation includes a user tapping a first control that can trigger the scrolling translation function or a user entering a voice command that can trigger the scrolling translation function.

[0378] For example, as shown in FIG. 3(f), the second operation may be a tap on the control 306 by the user.

[0379] In one embodiment, associating the first location with the first photograph includes: the first location is associated with a specific location within the first photograph, the specific location being an end location, a middle location, or a predetermined percentage location of the first photograph, or a start location of the last paragraph, or a start location of the last n lines of the first photograph, where n is a positive integer and n is greater than or equal to 1;

[0380] For example, as shown in FIG. 3(g), a scrolling screenshot may be taken beginning with the paragraph "It was like ... on Facebook."

[0381] For example, the predetermined percentage position may be two-thirds of the way into the first photograph. For example, a scrolling screenshot may be taken beginning with the line "when the incident ... Friday,".

[0382] In one embodiment, associating the first location with the first photo includes: the first location is associated with an end location, a middle location, or a predetermined percentage location of the first content, or the first location is associated with a start location of the last paragraph or a start location of the last n lines of the first content, where n is a positive integer and n is greater than or equal to 1.

[0383] For example, a scrolling screenshot may be taken beginning with the line or paragraph of English content that begins with "A family ... were sleeping" and ends with "The family was ... clamped onto Matthew's arms."

[0384] In one embodiment, before detecting a second user operation in the second user interface, the method further includes displaying, in the second user interface, a control capable of triggering a scroll translation.

[0385] For example, the control 306 may be displayed in the GUI shown in FIG. 3(f).

[0386] In one embodiment, the step of detecting a user's first operation in the first user interface includes the steps of displaying a plurality of functional controls after a user's multi-finger pressing operation is detected in the first user interface, the plurality of functional controls including a first control that can trigger a full-screen translation, and detecting that the user has tapped the first control or that the user has input a voice command that can trigger a full-screen translation function.

[0387] For example, the user may press two fingers on the GUI shown in FIG. 3(c) before tapping control 305. After detecting the user's two-finger press operation, the mobile phone may display multiple controls, including control 305.

[0388] In one embodiment, the step of automatically obtaining a translation result of the second content includes: the electronic device sending the second photo, or a photo corresponding to a portion of the second photo, to a server; the electronic device receiving a translation result, of the second photo, or a photo corresponding to a portion of the second photo, returned by the server.

[0389] 14 is a schematic flowchart of a machine translation method 1400 according to an embodiment of the present application. As shown in FIG. 14, the method 1400 includes the following steps:

[0390] S1401. Display a first user interface on a touch screen, the first user interface including a first content, and a language of the first content is a first language.

[0391] S1402. Detect a first operation of a user on a first user interface, the first operation including a user operation triggering a full-screen translation by the user.

[0392] S1403. In response to the first operation, take a screenshot of the first user interface to obtain a first picture.

[0393] S1404. Automatically obtain a translation result of the first content based on the first picture, where a language of the translation result of the first content is a second language.

[0394] S1405. After the translation result of the first content is automatically obtained, automatically display a second user interface, where the second user interface includes a part or all of the translation result of the first content.

[0395] It should be understood that for S1401 to S1405, reference is made to the above description of S1301 to S1305, and for the sake of brevity, the details will not be described again in this specification.

[0396] S1406. Detect a second user action in the second user interface, the second action including a user action triggering further translation by the user.

[0397] S1407. In response to the second operation, automatically obtain a translation result of the second content, the second content including some or all of the content other than the first content among all the content corresponding to the first language, and the language of the translation result of the second content is the second language.

[0398] S1408. After a portion or all of the translation result of the second content is automatically obtained, automatically display a third user interface, or display the third user interface after a user's slide operation is received, where the third user interface includes a portion or all of the translation result of the second content.

[0399] It should be understood that for the processes of S1406 to S1408, please refer to the relevant description of the method 1300. For the sake of brevity, the details will not be described again in this specification.

[0400] In this embodiment of the present application, after the electronic device performs one full-screen translation, the electronic device can provide the user with a "continue translation" control. After detecting that the user taps the "continue translation" control, the electronic device can directly load all or part of the translation corresponding to the remainder of the source text in the background. In this way, the electronic device does not need to jump to the source text interface for taking a scrolling screenshot, so that the user can further improve the user experience of reading the translation.

[0401] In one embodiment, in response to the second operation, the electronic device automatically takes a screenshot to obtain a second photograph, the second photograph being a photograph corresponding to the second content. Automatically obtaining a translation result of the second content includes automatically obtaining a translation result of the second content based on the second photograph.

[0402] In one embodiment, automatically obtaining a translation result of the second content includes sending the second photograph, or a photograph corresponding to a portion of the second photograph, to a server; and receiving a translation result of the second photograph, or a photograph corresponding to a portion of the second photograph, returned by the server.

[0403] In one embodiment, the electronic device automatically taking a screenshot to obtain the second photograph includes: the electronic device automatically capturing content of one or more screens to obtain the second photograph, the automatic screenshot process being visible or invisible to the user.

[0404] In one embodiment, the electronic device automatically obtaining a translation result of the second content includes: the electronic device automatically segments the second photo into a plurality of photos; the electronic device transmits the plurality of photos to a server; the electronic device receives the server's translation result for each of the plurality of photos; and the electronic device generates a portion of the translation result of the second content from the translation results of some of the plurality of photos or generates the translation result of the second content from the translation results of all of the plurality of photos.

[0405] It should be understood that the process from performing segmentation to obtaining the translation result can be referred to the method 1100. For the sake of brevity, the details will not be described again in this specification.

[0406] In one embodiment, the second operation includes tapping a first control by the user that can trigger a further translation function, or entering a voice command by the user that can trigger a further translation function.

[0407] In one embodiment, the method further includes: the electronic device displays a fourth user interface after receiving the user's slide operation on the third user interface, the fourth user interface including a subsequent translation result associated with the translation result included in the third user interface.

[0408] In one embodiment, before detecting a first operation of the user in the first user interface, the method further includes: the electronic device displays, in the first user interface, a control capable of triggering a full screen translation.

[0409] In one embodiment, prior to detecting a second operation of the user in the second user interface, the method further includes: the electronic device displays, in the second user interface, a control capable of triggering a further translation.

[0410] In one embodiment, the step of detecting a first operation of the user on the first user interface includes: the electronic device displays a plurality of function controls after detecting a multi-finger pressing operation of the user on the first user interface, the plurality of function controls including a first control capable of triggering a full-screen translation, and the electronic device detects that the user has tapped the first control or that the user has input a voice command capable of triggering the full-screen translation function.

[0411] Those skilled in the art will recognize that the present application can be implemented by electronic hardware or a combination of computer software and electronic hardware in combination with the units and algorithm steps described in the embodiments disclosed herein. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but the implementation form should not be considered as going beyond the scope of the present application.

[0412] For the sake of convenience and conciseness, the detailed operation processes of the above-mentioned systems, devices and units can be clearly understood by those skilled in the art by referring to the corresponding processes in the above-mentioned method embodiments, and the details will not be described again in this specification. The embodiments can be mutually referenced and combined.

[0413] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical division of functions, and may be divided in other ways in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the shown or described mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electrical, mechanical, or other forms.

[0414] The units described as separate parts may or may not be physically separated, and the parts shown as units may or may not be physical units, and may be located in one place or distributed over multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0415] In addition, the functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist physically alone, or two or more units may be integrated into one unit.

[0416] When a function is implemented in the form of a software functional unit and sold or used as an independent product, the function may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be essentially realized, or a part that contributes to the current technology, or a part of the technical solution may be realized in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0417] The above description is merely a specific implementation form of the present application, and is not intended to limit the scope of protection of the present application. Any variations or replacements that are easily conceived by those skilled in the art within the technical scope disclosed in this application shall be within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. [Explanation of symbols]

[0418] 1 Antenna 2 Antennas 100 Electronic Devices 110 Processor 120 External Memory Interface 121 Internal Memory 130 USB interface 140 Charging Management Module 141 Power Management Module 142 Battery 150 Mobile communication module 160 Wireless communication module 170 Audio Module 170A Speaker 170B Receiver 170C Microphone 170D Headset Jack 180 Sensor Module 180A PRESSURE SENSOR 180B Gyro sensor 180C Barometric Pressure Sensor 180D Magnetic Sensor 180E Acceleration Sensor 180F Distance Sensor 180G Optical Proximity Sensor 180H Fingerprint Sensor 180J Temperature Sensor 180K touch sensor 180L Ambient Light Sensor 180M Bone Conduction Sensor 190 Compass 191 Motor 192 Indicator 193 Camera 194 Display screen 195 SIM card interface 301 Second Desktop Page 302 Icon 303 English Essay 304 Prompt Box 305 Control 306 Control 307 Prompt Box 308 Scrollbar 309 Control 401 Control 402 Prompt Box 403 Control 501 Prompt Box 502 Control 503 Control 601 Prompt Box 602 Control 603 Prompt Box 604 Control 701 Prompt box, cursor 702 Control 801 Control 901 Control 1001 Control 1100 Machine Translation Methods

Claims

1. 1. An electronic device comprising: Touch screen and one or more processors; One or more memories and Equipped with The one or more memories store one or more computer programs, the one or more computer programs including instructions, which when executed by the one or more processors, cause the electronic device to: displaying a first user interface on the touch screen, the first user interface comprising a first content, the first content being in a first language; detecting a first user operation in the first user interface, the first operation including a user operation triggering a full-screen translation by the user; In response to the first operation, obtaining a first photograph obtained by taking a screenshot of the first user interface; obtaining a translation result of the first content based on the first picture, wherein a language of the translation result of the first content is a second language; displaying a second user interface, the second user interface comprising a part or all of the translation result of the first content; detecting a second operation of the user in the second user interface, the second operation including a user operation triggering a scroll translation by the user; in response to the second operation, displaying a third user interface and taking a scrolling screenshot starting from a first position of the third user interface, the third user interface comprising a second content, the second content comprising content from a position corresponding to the first position to a last position of the first content, the first position corresponding to a specific position of the first content included in the first picture, and a language of the second content is the first language; In the process of the scrolling screenshot, when a third operation of the user is detected in the third user interface or when an end position is reached through scrolling of the third user interface, stopping taking the scrolling screenshot at a second position that is a last position of the second content displayed in the third user interface to obtain a second picture, the second picture being a picture corresponding to a third content, the third content comprising a content from the first position to the second position, and a language of the third content being the first language; obtaining a translation result of the third content based on the second picture, wherein a language of the translation result of the third content is the second language; and displaying a fourth user interface after a part or all of the translation result of the third content is obtained, the fourth user interface comprising a part or all of the translation result of the third content; An electronic device that runs

2. The specific position is An end position, a middle position, or a predetermined percentage position of the first content included in the first photograph; or 2. The electronic device of claim 1, wherein the starting position of the last paragraph or the starting position of the last n lines of the first content included in the first photo, n being a positive integer and n being equal to or greater than 1.

3. When the instructions are executed by the one or more processors, the electronic device: segmenting the second picture into a plurality of pictures before the translation of the third content is obtained; sending said plurality of photographs to a server; receiving a translation result from the server for each of the plurality of photos; generating a part of the translation result of the third content from translation results of some of the plurality of photos, or generating the translation result of the third content from translation results of all of the plurality of photos; 3. The electronic device according to claim 1 or 2,

4. When the instructions are executed by the one or more processors, the electronic device: displaying first prompt information when displaying the third user interface, the first prompt information is displayed at or near the first location, the first prompt information being used to indicate to the user a starting location for taking a scrolling screenshot.

4. An electronic device according to claim 1 , further comprising:

5. When the instructions are executed by the one or more processors, the electronic device: displaying second prompt information when displaying the third user interface, The second prompt information is displayed at an end position of the first content included in the first photo, and the second prompt information is used to indicate to the user that the previous reading has ended at the end position.

5. An electronic device according to claim 1 , further comprising:

6. When the instructions are executed by the one or more processors, the electronic device: displaying a plurality of function controls after a multi-finger pressing operation of the user is detected on the first user interface, the plurality of function controls including a first control capable of triggering a full-screen translation; detecting that the user has tapped the first control or that the user has entered a voice command capable of triggering a full-screen translation function; 6. An electronic device according to claim 1 , further comprising:

7. 1. An electronic device comprising: Touch screen and one or more processors; One or more memories and Equipped with The one or more memories store one or more computer programs, the one or more computer programs including instructions, which when executed by the one or more processors, cause the electronic device to: displaying a first user interface on the touch screen, the first user interface comprising a first content, the first content being in a first language; detecting a first operation in the first user interface, the first operation including a user operation triggering a scrolling translation by a user; in response to the first operation, capturing a scrolling screenshot beginning at a first location of the first user interface, the first location corresponding to a particular location of the first content included in the first user interface; In the process of the scrolling screenshot, when a second operation of the user is detected in the first user interface or when an end position is reached through scrolling of the first user interface, stopping taking the scrolling screenshot at a second position that is a last position of the first content displayed in the first user interface to obtain a first picture, the first picture being a picture corresponding to a second content, the second content comprising content from the first position to the second position, and a language of the second content being the first language; obtaining a translation result of the second content based on the first picture, wherein a language of the translation result of the second content is a second language; displaying a second user interface after a portion or all of the translation result of the second content is obtained, the second user interface comprising a portion or all of the translation result of the second content; An electronic device that runs

8. When the instructions are executed by the one or more processors, the electronic device: detecting a third operation in the second user interface, the second user interface comprising a last portion of the translation result of the second content, the third operation including a user operation triggering a scrolling translation by the user; in response to the third operation, displaying a third user interface and taking a scrolling screenshot starting from a third position of the third user interface, the third user interface comprising a third content, the third content comprising content of the first content from a position corresponding to the third position to a last position, the third position corresponding to a specific position of the second content included in the first picture, and a language of the third content is the first language; In the process of the scrolling screenshot, when a fourth operation of the user is detected in the third user interface or an end position is reached through scrolling, stopping taking the scrolling screenshot at a fourth position that is a last position of the third content displayed in the third user interface to obtain a second photo, the second photo being a photo corresponding to a fourth content, the fourth content comprising content from the third position to the fourth position, and a language of the fourth content being the first language; obtaining a translation result of the fourth content based on the second picture, wherein a language of the translation result of the fourth content is the second language; displaying a fourth user interface after a part or all of the translation result of the fourth content is obtained, the fourth user interface comprising a part or all of the translation result of the fourth content; The electronic device of claim 7 .

9. Before the translation result of the second content is obtained, the first picture is segmented into a plurality of pictures for sending to a server and receiving the translation result of the server; The third location is associated with a specific location of the first content in a last photograph of the plurality of photographs, the specific location being: the start position, end position, middle position, or a predetermined percentage position of the first content included in the last photograph; or the starting position of the last paragraph or the starting position of the last n lines of the first content included in the last photo, where n is a positive integer and n is 1 or greater; 9. The electronic device according to claim 8.

10. When the instructions are executed by the one or more processors, the electronic device: displaying first prompt information when displaying the third user interface, the first prompt information is displayed at or near the third location, the first prompt information being used to indicate to the user a starting location for taking a scrolling screenshot.

10. The electronic device of claim 8 or 9, 11. When the instructions are executed by the one or more processors, the electronic device: displaying second prompt information when displaying the third user interface, the second prompt information is displayed at or near the second location, the second prompt information being used to indicate to the user that a previous reading has ended at the second location.

11. The electronic device according to claim 8, further comprising:

12. When the instructions are executed by the one or more processors, the electronic device: detecting a fifth operation in the second user interface, the second user interface comprising a final portion of the translation result of the second content, the fifth operation including a user operation triggering further translation by the user; acquiring a translation result of a fifth content in response to the fifth operation, the fifth content including a part or all of the first content other than the second content, and a language of the translation result of the fifth content is the second language; Displaying a third user interface after a part or all of the translation result of the fifth content is obtained or displaying the third user interface after a slide operation of the user is received, the third user interface comprising a part or all of the translation result of the fifth content; The electronic device of claim 7 .

13. When the instructions are executed by the one or more processors, the electronic device: segmenting the first picture into a plurality of pictures before the translation of the second content is obtained; sending said plurality of photographs to a server; receiving a translation result from the server for each of the plurality of photos; generating a part of the translation result of the second content from translation results of some of the plurality of photos, or generating the translation result of the second content from translation results of all of the plurality of photos; 13. An electronic device according to claim 7, further comprising:

14. 1. A method for machine translation, the method being applied to an electronic device having a touch screen, comprising: displaying a first user interface on the touch screen, the first user interface comprising a first content, the first content being in a first language; detecting a first user operation in the first user interface, the first operation including a user operation triggering a full-screen translation by the user; In response to the first operation, obtaining a first photograph obtained by taking a screenshot of the first user interface; obtaining a translation result of the first content based on the first picture, wherein a language of the translation result of the first content is a second language; displaying a second user interface, the second user interface comprising a part or all of the translation result of the first content; detecting a second operation of the user in the second user interface, the second operation including a user operation triggering a scroll translation by the user; in response to the second operation, displaying a third user interface and taking a scrolling screenshot starting from a first position of the third user interface, the third user interface comprising a second content, the second content comprising content from a position corresponding to the first position to a last position of the first content, the first position corresponding to a specific position of the first content included in the first picture, and a language of the second content is the first language; In the process of the scrolling screenshot, when a third operation of the user is detected in the third user interface or when an end position is reached through scrolling of the third user interface, stopping taking the scrolling screenshot at a second position that is a last position of the second content displayed in the third user interface to obtain a second picture, the second picture being a picture corresponding to a third content, the third content comprising a content from the first position to the second position, and a language of the third content being the first language; obtaining a translation result of the third content based on the second picture, wherein a language of the translation result of the third content is the second language; and displaying a fourth user interface after a part or all of the translation result of the third content is obtained, the fourth user interface comprising a part or all of the translation result of the third content; A machine translation method comprising:

15. 1. A method for machine translation, the method being applied to an electronic device having a touch screen, comprising: displaying a first user interface on the touch screen, the first user interface comprising a first content, the first content being in a first language; detecting a first operation in the first user interface, the first operation including a user operation triggering a scrolling translation by a user; in response to the first operation, capturing a scrolling screenshot beginning at a first location of the first user interface, the first location corresponding to a particular location of the first content included in the first user interface; In the process of the scrolling screenshot, when a second operation of the user is detected in the first user interface or when an end position is reached through scrolling of the first user interface, stopping taking the scrolling screenshot at a second position that is a last position of the first content displayed in the first user interface to obtain a first picture, the first picture being a picture corresponding to a second content, the second content comprising content from the first position to the second position, and a language of the second content being the first language; obtaining a translation result of the second content based on the first picture, wherein a language of the translation result of the second content is a second language; displaying a second user interface after a portion or all of the translation result of the second content is obtained, the second user interface comprising a portion or all of the translation result of the second content; A machine translation method comprising:

16. 16. A computer-readable storage medium comprising computer instructions, which when executed in an electronic device, causes the electronic device to perform the machine translation method according to claim 14 or 15.

Citation Information

Patent Citations

  • Method and device for translation

    JP1997081566A

  • System and method for enhanced screen copy

    US20130246039A1