CN114997186B - Control method of translation control and electronic equipment - Google Patents

Control method of translation control and electronic equipment Download PDF

Info

Publication number
CN114997186B
CN114997186B CN202210114430.0A CN202210114430A CN114997186B CN 114997186 B CN114997186 B CN 114997186B CN 202210114430 A CN202210114430 A CN 202210114430A CN 114997186 B CN114997186 B CN 114997186B
Authority
CN
China
Prior art keywords
application
page
translation
user
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210114430.0A
Other languages
Chinese (zh)
Other versions
CN114997186A (en
Inventor
宋新超
韩佳
丁一晏
梁恒洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310341835.2A priority Critical patent/CN116451709A/en
Publication of CN114997186A publication Critical patent/CN114997186A/en
Application granted granted Critical
Publication of CN114997186B publication Critical patent/CN114997186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Landscapes

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

Abstract

The application provides a control method of a translation control and electronic equipment. In a scenario requiring review of foreign documents, in response to a user selecting text and clicking on a copy or translation option, the electronic device displays a translation control (e.g., a hover ball) on the current page, providing the user with access to display the translation results. The translation result of the text can be triggered and presented by operating the translation control. And the translation control is bound with the page in a full screen mode, can be continuously displayed on the page and is hidden when being switched to other pages. And the translation control is bound with the application in the parallel view mode, can be continuously displayed on any page of the application and is hidden when being switched to other application pages. The binding relationship between the translation control and the page or the application can be automatically switched according to different scenes. According to the scheme, the translation control can be prevented from frequently disappearing or popping up when the page is switched, so that the interference to the normal use of a user can be reduced, and the user experience is improved.

Description

Control method of translation control and electronic equipment
The present application claims priority of chinese patent application filed on 2021, 9/2, with the national intellectual property office, application number 202111028829.9, application name "translation method and electronic device", on 2021, 11/23, 18/202111397011.4, application name "translation method and electronic device", on 2021, 12/1, 12/18, application number 202111458924.2, application name "method for recommending translation service and electronic device", and on 2021, 12/31, 3/9, application number 202111683164.5, application name "translation method and electronic device", the entire contents of which are incorporated herein by reference.
Technical Field
The application relates to the technical field of terminals, in particular to a control method of a translation control and electronic equipment.
Background
When a user may encounter a scene to be translated during the process of using an electronic device (e.g., a mobile phone) to look up an article or using the electronic device normally, the user usually uses a translation application built in the electronic device or opens a third-party translation application to perform translation.
However, most of the translation applications in the current market require a user to switch back and forth between the current application and the translation application after obtaining a text to be translated to obtain a translation result, and the operation steps are cumbersome, so that the translation efficiency is low, and the user experience is influenced.
Disclosure of Invention
The application provides a control method of a translation control and electronic equipment, the suspension control can be continuously displayed in an application page needing translation, and the suspension control is hidden when the page needing translation is switched to a page needing no translation, so that more convenient translation service is provided.
In order to achieve the above object, the present application provides the following technical solutions:
in a first aspect, the present application provides a method for controlling a translation control, where the method includes: when the electronic equipment is in a screen expansion state, displaying two pages of a first application in a column on an inner screen of the electronic equipment, and displaying a first translation control, wherein the first translation control and the first application have a first binding relationship; receiving a first operation of a user, wherein the first operation is used for triggering the electronic equipment to be switched into a screen folding state; in response to the first operation, a first page of a first application is displayed on an external screen of the electronic device, and a first translation control is displayed on the first page, wherein the first page is a page displayed on an internal screen when the electronic device is switched to a screen folding state.
According to the scheme, when the electronic equipment is in a screen expansion state, the two pages of the application are displayed in a split mode through the inner screen in a parallel view mode, at the moment, the translation control (such as a floating ball) called by the user operation is bound with the application, the translation control can be continuously displayed on any page of the application, and is hidden when the electronic equipment is switched to other application pages. When the electronic equipment is switched to the screen folding state, one page of the application is switched to the outer screen to be displayed in a full-screen mode, and the translation control is kept displayed on the outer screen. The translation control provides the user with access to display the translation results. The translation result of the word can be triggered to be presented by operating the translation control. The translation control can be automatically hidden or popped up according to the binding relationship when the page is switched, so that the translation control is prevented from frequently disappearing or popping up when the page is switched, the interference on the normal use of a user can be reduced, and the use experience of the user is improved.
The electronic equipment is provided with a foldable screen. The foldable screen may include an inner screen and an outer screen. When the electronic equipment is switched to a screen folding state, the inner screen of the electronic equipment is switched to a screen extinguishing mode, and the outer screen of the electronic equipment is switched to a screen lightening mode; or when the electronic equipment is switched to the screen unfolding state, the external screen of the electronic equipment is switched to the screen extinguishing mode, and the internal screen of the electronic equipment is switched to the screen lightening mode.
In some possible implementations, the first translation control may be a hover ball control. The floating ball control is in a first state or a second state.
Optionally, the method may further include: when the electronic equipment displays the first translation control for the first time, the first translation control is presented as a floating ball control in a first state; if the operation of the user on the levitated ball control in the first state is not received within the preset time length, updating and displaying the levitated ball control in the first state as the levitated ball control in the second state; and the display size of the floating ball control in the second state is smaller than that of the floating ball control in the first state.
The suspension ball control can be continuously displayed on one side of the display screen in a welting mode, and a user can conveniently trigger the translation function through the suspension ball at any time.
The first page may be a page with text, such as a reading page in a reading application, which has readable text, such as a web page in a browser, which has text content available for browsing, such as a chat interface in a chat application class, which has text input by a user, and a note page in a memo class, which has note content input by the user.
In some possible implementations, the first application may include an application other than a consumer application, an entertainment application, or a video application.
Illustratively, the consumer applications include shopping applications, the entertainment applications include games, and the video applications include various audio and video applications. During the process of using the application, the user is judged to be in an entertainment state, so that the user is judged to have no translation requirement on the text at the moment. Therefore, the disturbance to the user can be reduced as much as possible, and the user experience is improved.
In some possible implementations, the method may further include: hiding the first translation control according to the first binding relation under the condition that other application pages or desktops except the first application are switched to foreground display; or, under the condition that the first application is switched to foreground operation, the first translation control is restored and displayed on the page of the first application according to the first binding relation.
It can be appreciated that in the parallel view mode, the hover ball control is bound to the application, and the hover ball control can be continuously displayed on any page of the application and hidden when switching to other application pages.
According to the scheme, after the binding relation between the floating ball control and the application is established by the electronic equipment, when the display screen is switched and displayed among a plurality of pages of the application, the floating ball control can be displayed in each page of the application, and a user can trigger a translation function through the floating ball control at any time.
In some possible implementations, after the displaying the first translation control on the first page, the method may further include: receiving a second operation of the user, wherein the second operation is used for selecting the first text in the first page to copy or cut; and responding to the second operation, removing the first binding relationship between the first translation control and the first application, and establishing a second binding relationship between the first translation control and the first page.
The first operation comprises any one of selection operation, touch operation, click operation, sliding operation, long-time pressing operation or double-click operation on the first text. The first operation is to select a text, so there are various ways for selecting a text that a user needs to translate, which is not limited in the embodiments of the present application.
In some possible implementations, the second operation may include a first sub-operation and a second sub-operation; the first sub-operation is the operation of triggering and displaying an option bar after a user selects a first text, wherein the option bar can comprise a copy option; the second sub-operation is a user operation on the copy option.
Optionally, a cutting option may be included in the option bar, and the second sub-operation may be an operation of the user on the cutting option. The option bar can comprise a translation option, and the second sub-operation can be an operation of the translation option by the user.
In some possible implementations, after the establishing the second binding relationship between the first translation control and the first page, the method may further include: hiding the first translation control according to the second binding relation under the condition that a second page or a desktop except the first page is switched to foreground display; or, under the condition that the first page is switched to foreground display, the first translation control is restored to be displayed on the first page according to the second binding relation.
It will be appreciated that in full screen mode the hover ball control is bound to the page where it will be continuously displayed and hidden when switching to other pages.
Through this application scheme, after the page (being first page) binding relation that the hovercall controlling part shows with the outer screen under fold condition, the hovercall controlling part can last the demonstration at this page, and the user of being convenient for triggers the translation function through the hovercall controlling part at any time. For example, the electronic device can display a hover ball control on the page each time the outer screen switches to the page display. When the display screen is switched to other pages except the page to be displayed, the floating ball control is hidden, and interference is avoided.
In some possible implementations, the method may further include: and responding to the second operation, and writing the first text into a clipboard of the electronic equipment.
In some possible implementations, after writing the first text to a clipboard of the electronic device, the method may further include: receiving a third operation of the first translation control by the user; responding to the third operation, and acquiring a translation result corresponding to the first text stored in the clipboard; and displaying a second translation control on the first page, and displaying the first text and a translation result corresponding to the first text in the second translation control.
In some possible implementations, the second translation control is a floating window control, and the display state of the floating window control includes any one of a bottom state, a half-screen state, or a full-screen state. After the displaying the second translation control, the method may further include: and updating the display state of the floating window control in response to the operation of the user on the floating window control. The operation of the user on the floating window control may include any one of a selection operation, a touch operation, a click operation, a sliding operation, a long-time press operation, or a double-click operation on the floating window control.
Therefore, when a user reads foreign documents by using the application program, the floating window control can be displayed on the current page of the current application program by selecting the word to be translated, and the translation result of the word selected by the user is presented in the floating window control, so that the user does not need to quit the current application and switch to a third-party translation application to inquire the word, the translation can be inquired in real time on the current page of the current application, the switching back and forth between the current application and the translation application to acquire the translation result is omitted, and the translation efficiency is improved.
In some possible implementations, the method may further include: in the case where the second translation control is displayed on the first page, the first translation control is hidden on the first page.
In some possible implementations, the first text is in a different system language than the electronic device. Illustratively, the system language of the electronic device is Chinese and the first text is English.
In some possible implementations, the first text may include text other than a web address, a mailbox, or a password generated by a machine.
Illustratively, machine-generated passwords include passwords such as shopping passwords or video passwords that are typically used to correspond to particular items or video pages, thus determining that the user does not have a need to translate such text at this time. Therefore, the disturbance to the user can be reduced as much as possible, and the user experience is improved.
In some possible implementations, after hiding the first translation control according to the second binding relationship, the method may further include: receiving a fourth operation of the user, wherein the fourth operation is used for selecting the text in the second page to copy or cut; and responding to the fourth operation, displaying the first translation control on the second page, establishing a third binding relationship between the first translation control and the second page, and removing the binding relationship between the first translation control and the first page.
In some possible implementations, after the establishing the third binding relationship between the first translation control and the second page, the method may further include: and hiding the first translation control according to the third binding relation under the condition that the first page is switched to foreground display again.
Through the scheme, the binding relationship between the hover ball control and the page or the application can be automatically switched according to different scenes, for example, the binding relationship can be changed along with the change of the display mode. According to the scheme, frequent disappearance or popping up of the floating ball control during page switching can be avoided, so that interference to normal use of a user can be reduced, and the user use experience is improved.
In some possible implementations, the method may further include: setting a display mode of a first application to a parallel view mode in response to a user operation; when the electronic equipment is in a screen expansion state and the first application runs in a foreground, an inner screen of the electronic equipment displays two pages of the first application in a parallel view mode in a column mode; or when the electronic device is in a screen folding state and the first application runs in the foreground, the external screen of the electronic device displays one page of the first application in a full-screen mode.
In some possible implementations, after the inner screen of the electronic device displays two pages of the first application in a parallel view mode in a column, the method may further include: receiving a fifth operation of the user, wherein the fifth operation is used for selecting the second text of the first application to copy or cut; and responding to the fifth operation, displaying the first translation control on the page of the first application, and establishing a first binding relation between the first translation control and the first application.
According to the scheme, in a scene where foreign documents need to be consulted, in response to the operation that a user selects a text and clicks options such as copying or translation, the electronic equipment can display a translation control on the current page, and the translation control provides an entry for displaying a translation result for the user. And the translation result of the word can be triggered to be presented by operating the translation control. And the translation control is bound with the page in a full screen mode, can be continuously displayed on the page, and is hidden when being switched to other pages.
In some possible implementations, after the first translation control is displayed on the page of the first application, the method may further include: receiving a sixth operation of the first translation control by the user; and responding to the sixth operation, displaying a second translation control on the page of the first application, and displaying a second text and a translation result corresponding to the second text in the second translation control.
In some possible implementations, after displaying the first translation control on the page of the first application, the method may further include: in response to the operation of a user on the display mode switching control, the inner screen of the electronic equipment displays two pages of the first application in a parallel view mode in a column mode and updates the two pages of the first application to a third page of the first application in a full screen mode; and the first translation control is kept to be displayed on the inner screen of the electronic equipment, and the binding relationship between the first translation control and the first application is unchanged.
In some possible implementations, the method may further include: receiving a seventh operation of the user, wherein the seventh operation is used for selecting the text of the third page to copy or cut; and responding to the seventh operation, establishing a binding relationship between the first translation control and the third page, and removing the binding relationship between the first translation control and the first application.
In some possible implementations, the method may further include: when the electronic equipment is in a screen folding state, displaying a first page of a first application on an outer screen of the electronic equipment, and displaying a first translation control, wherein the first translation control and the first page have a binding relationship; receiving an eighth operation of the user, wherein the eighth operation is used for triggering the electronic equipment to be switched to a screen unfolding state; responding to an eighth operation, displaying two pages of a first application in a inner screen of the electronic equipment in a column-by-column mode, wherein the two pages of the first application comprise the first page; the first translation control keeps displaying, the binding relationship between the first translation control and the first application is released, and the binding relationship between the first translation control and the first page is released.
In a second aspect, the present application provides a control apparatus for translating a control, the apparatus comprising means for performing the method of the first aspect. The apparatus may correspond to performing the method described in the first aspect, and for the description of the units in the apparatus, reference is made to the description of the first aspect, and for brevity, no further description is given here.
The method described in the first aspect may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions. Such as a processing module or unit, a display module or unit, etc.
In a third aspect, the present application provides an electronic device comprising a processor coupled to a memory, the memory for storing computer programs or instructions, the processor for executing the computer programs or instructions stored by the memory such that the method of the first aspect is performed. For example, the processor is for executing a memory-stored computer program or instructions causing the apparatus to perform the method of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program (which may also be referred to as instructions or code) for implementing the method in the first aspect. The computer program, when executed by a computer, causes the computer to perform the method of the first aspect, for example.
In a fifth aspect, the present application provides a chip comprising a processor. The processor is adapted to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof. Optionally, the chip further comprises a memory, and the memory is connected with the processor through a circuit or a wire.
In a sixth aspect, the present application provides a chip system comprising a processor. The processor is adapted to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof. Optionally, the chip system further comprises a memory, and the memory is connected with the processor through a circuit or a wire.
In a seventh aspect, the present application provides a computer program product comprising a computer program (also referred to as instructions or code), which when executed by a computer, causes the computer to implement the method of the first aspect.
It is to be understood that, the beneficial effects of the second to seventh aspects may be referred to the relevant description of the first aspect, and are not repeated herein.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic diagram of an electronic device provided in an embodiment of the present application;
fig. 2A is a block diagram of a software structure of an electronic device according to an embodiment of the present disclosure;
fig. 2B is a block diagram of a software structure of a window manager of an electronic device according to an embodiment of the present disclosure;
fig. 3A is a schematic diagram of triggering and displaying a hover ball in a full-screen mode according to an embodiment of the present application;
fig. 3B is a schematic interface diagram that is provided in the embodiment of the present application and triggers display of a translation result by operating a hover ball in a full-screen mode;
fig. 3C is a schematic diagram that is provided in the embodiment of the present application, and the hover ball is operated after the text is copied to trigger display of the translation result in a full-screen mode;
fig. 4A is a schematic interface diagram of a hover ball remaining to be displayed when a page is turned in a full-screen mode according to the embodiment of the present application;
fig. 4B is an interface schematic diagram of the suspension ball hiding or displaying when different application pages are switched in a full screen mode according to the embodiment of the present application;
fig. 4C is an interface schematic diagram of the hover ball being hidden or displayed when switching between the page and the desktop in the full-screen mode according to the embodiment of the present application;
fig. 5A is a schematic diagram of a binding relationship change of a hover ball in a full-screen mode according to an embodiment of the present application;
fig. 5B is an interface schematic diagram that is provided in the embodiment of the present application and triggers display of a translation result by operating a hover ball in a full screen mode;
fig. 6A is a schematic view of a parallel view mode setting interface provided in an embodiment of the present application;
fig. 6B is a schematic diagram of triggering and displaying a hover ball in a parallel view mode according to an embodiment of the present application;
fig. 6C is an interface schematic diagram that is provided in the embodiment of the present application and triggers display of a translation result by operating a hover ball in a parallel view mode;
fig. 7A is an interface schematic diagram of a hover ball remaining to be displayed when different pages of an application are switched in a parallel view mode according to an embodiment of the present application;
fig. 7B is a schematic interface diagram of the floating ball hidden or displayed when switching between the application and the desktop in the parallel view mode according to the embodiment of the present application;
fig. 8A is a schematic diagram of a change in a binding relationship of a suspension ball in a parallel view mode according to an embodiment of the present application;
fig. 8B is an interface schematic diagram that is provided in the embodiment of the present application and triggers display of a translation result by operating a hover ball in a parallel view mode;
fig. 9A is a schematic diagram illustrating a change in a binding relationship of a floating ball when a parallel view mode is switched to a full screen mode after a screen is folded according to an embodiment of the present application;
fig. 9B is an interface schematic diagram that triggers display of a translation result by operating a floating ball displayed on an outer screen after a screen is folded according to the embodiment of the present application;
fig. 9C is an interface schematic diagram of the suspension ball hiding or displaying when different application pages are switched in a full screen mode according to the embodiment of the present application;
fig. 10 is a schematic diagram illustrating a change in a binding relationship of a hover ball when a full-screen mode is switched to a parallel view mode after a screen is unfolded according to an embodiment of the present application;
fig. 11 is a schematic diagram illustrating a change in a binding relationship of a floating ball when a full-screen mode is switched to a parallel view mode by setting according to an embodiment of the present application;
fig. 12 is a schematic diagram of each functional module adopted in the control method of the translation control according to the embodiment of the present application;
fig. 13 is a schematic flowchart illustrating interaction of each functional mode in a control method of a translation control according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a control device of a translation control according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Before describing embodiments of the control method of the translation control and the electronic device provided by the present application, some terms to be mentioned immediately below need to be described. In the description of the embodiments of the present application, unless otherwise specified, "a plurality" means two or more, for example, a plurality of processing units means two or more processing units or the like; plural elements means two or more elements, and the like.
The terms "first" and "second," and the like, in the description and in the claims herein are used for distinguishing between different objects and not for describing a particular order of the objects. When the present application refers to the terms "first" or "second" etc. ordinal, it should be understood that they are used for distinguishing purposes only, unless they do express an order in accordance with the context.
The term "and/or" herein is an association relationship describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The symbol "/" herein denotes a relationship in which the associated object is or, for example, a/B denotes a or B.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "such as" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
When a user reads a foreign language document, for example, when browsing an english document by using a reading application, the user often resort to a translation application already installed in an electronic device (hereinafter, referred to as a "mobile phone") in response to a request for looking up a new word in the foreign language document.
If the current application supports the translation function in the application, for example, the chat application on the market at present, the chat content needing translation can be selected, after the text is clicked or pressed for a long time, the translation button is selected, and the translation result of the chat content is displayed in real time. Typically, the translation results will be presented in the vicinity of the chat content. When the user needs to translate the chat content again, the above operation needs to be repeated to display the translation result.
If the current application does not support the translation function in the application, such as reading the application, the user needs to copy or memorize the text to be translated, such as an English word, then switch out of the current application, open the translation application, paste or manually input the English word into an input box, and after clicking a translation button, display the translation result, thereby completing the translation operation. Obviously, the operation mode has complicated steps, so that the translation efficiency is low, and the user experience is influenced.
Furthermore, an improvement mode is that a reading application or a browser plug-in or a plug-in provided by translation software is used for realizing screen word extraction for text translation, namely, the reading application or the browser plug-in or the plug-in provided by the translation software is opened in the background, when a user selects a text needing translation, an instant translation result is realized, and a translation webpage or the translation software does not need to be opened. However, the above method still requires the user to install additional plug-in units to implement the method, which increases the threshold for the user to use. In addition, in electronic devices such as mobile phones, the control logic is limited to the bottom layer of the mobile phone system, and thus the implementation is difficult.
Furthermore, another improvement mode is that the content of the clipboard of the system is actively monitored by the translation application, so that when a user switches from the current reading application to the translation application, the translation application can automatically acquire the content of the clipboard and display the translation result of the content, and the trouble of manual input is avoided. However, the above operation method still requires the user to leave the current application and switch to the translation application to obtain the translation result, so that the operation method is complicated, and the translation efficiency is reduced.
Therefore, whether the current application supports a translation function in the application or the current application does not support the translation function in the application and needs to be switched to the translation application to display a translation result, the above modes are all translation at an application level, that is, the former is a translation plug-in integrated in a certain application, and the latter is a complete independent translation application, and neither of the above modes relates to translation realized by using functions of a mobile phone system bottom layer, such as translation realized at a mobile phone system level polished for the bottom layer based on an android system.
Based on this, the embodiment of the application provides a control method of a translation control and an electronic device, and improves user experience through improvement on a bottom layer of a mobile phone system.
Referring to fig. 1, a schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. 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, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, an ambient light sensor 180L, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: 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 memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors. For example, the processor 110 is configured to execute the method for detecting the ambient light in the embodiment of the present application.
Wherein the controller may be a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may employ an organic light-emitting diode (OLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
As shown in fig. 2A, the Android system can be divided into five layers, namely an application layer (applications), an application framework layer (application framework), an Android runtime (Android runtime), a system library, a hardware abstraction layer (HAL, not shown), and a kernel layer (kernel).
Wherein the application layer may include a series of application packages. For example, the application layer may include applications such as a camera, a gallery, a calendar, a call, a map, a navigation, a WLAN, bluetooth, music, a video, and a short message (the application may be simply referred to as an application), which is not limited in this embodiment.
In this embodiment, the application layer may further include a context awareness module, a service logic processing module, a service presentation module, and the like. The context awareness module, the service logic processing module, and the service presentation module may be independent APPs, or may be integrated into different APPs, or may be integrated into the same APP, which is not limited in this application.
The context awareness module is resident in operation or operates in a low-power consumption mode and has the capability of perceiving external facts or environments. The context awareness module may detect a related event and obtain a state of the event from other application programs or an application framework layer or a system layer or a kernel layer of the application program layer through an Application Programming Interface (API), such as detecting a bluetooth connection, a network connection, monitoring a user short message, customizing a timer, and the like. In the embodiment of the application, the context awareness module is mainly used for monitoring whether the clipboard has the copy event or not, and notifying the business logic processing module of the copy event when the clipboard has the copy event. The context aware module may also be used to obtain a source Application (APP), i.e., an application package name, of the clip content in the clipboard. That is, the context aware module can identify that clipboard content was copied from a particular application. In addition, the context awareness module can also detect whether the operation of exiting the current page exists, and when the operation of exiting the current page is detected, the context awareness module informs the business logic processing module.
The business logic processing module (such as a computing engine) has business logic processing capacity and is used for realizing the logic of showing or disappearing various floating balls or floating windows. For example, the service logic processing module receives a copy event triggered by a user and clipboard content sent by the context awareness module, and judges whether a translation condition is met, thereby judging whether the hover ball is displayed. The service logic processing module can also judge whether to display the floating window and display the translation result in the floating window according to a floating ball clicking event triggered by a user and the translation result content acquired from the third-party server. In addition, the service logic processing module can also be used for judging whether the floating ball or the floating window on the electronic equipment is displayed or disappears according to the event that the floating ball or the floating window disappears, wherein the event is triggered by the user.
In addition, the business logic processing module can also recognize copied text or text extracted by Optical Character Recognition (OCR) technology. For example, the text may be identified as at least one of a calendar, a link to be shared, a password, a web address, and the like. Also for example, the language of the text may be recognized.
And the service presentation module (such as YOYO suggestion) is used for displaying or disappearing the floating ball or the floating window on the screen of the mobile phone. For example, the service presentation module receives a command for displaying a hover ball or a hover window sent by the service logic processing module, and notifies the window manager to display the hover ball or the hover window on the electronic device. Meanwhile, the service presenting module can present the text copied by the user and the corresponding translation result in the floating window. In addition, the service presentation module can also notify the window manager that the floating ball or the floating window on the electronic equipment disappears according to the event that the floating ball or the floating window disappears, which is triggered by the user.
As shown in fig. 2A, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, etc., an activity manager, a clipboard manager, etc., which is not limited in this embodiment.
The window manager is used for managing window programs, and can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The clipboard manager is used for managing the clipboard. The clipboard is a temporary storage area for temporarily storing exchange information.
The activity manager is used for managing the life cycle and the navigation backspacing function of each application program, and is responsible for establishing the main thread of the Android and maintaining the life cycle of each application program.
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
As shown in fig. 2A, the system library may include a plurality of function modules. For example: surface managers (surface managers), media libraries (media libraries), three-dimensional graphics processing libraries (e.g., openGL ES), two-dimensional graphics engines (e.g., SGL), etc.
The surface manager is used for managing the display subsystem and providing fusion of the two-dimensional layer and the three-dimensional layer for a plurality of application programs.
As shown in FIG. 2A, the kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The window manager, which may include application windows, sub-windows (not shown), and system windows, is described below in conjunction with FIG. 2B.
The application window corresponds to an application window of a certain application, for example, an application window of a certain reading application, and is used for displaying content in the reading application; an application window, such as a translation application, for displaying content within the translation application; and an application window such as a memo application for displaying contents within the memo application.
It should be noted that each application interface is composed of activities, and the activities are composed of views, where a view is a presence form of a window, and the window is a carrier of the view. When activity is initiated, the application process is notified that any activity is affiliated with the application process. That is, for example, a reading application corresponds to one activity, and a memo corresponds to another activity; this is because the memo application and the reading application are different applications, and thus correspond to different activities. All activity default window TYPEs are BASE windows (TYPE _ BASE _ APPLICATION), i.e. all other TYPEs of APPLICATION windows will appear above the BASE window.
The child window is attached to the parent window, i.e. cannot exist independently, and needs to depend on an application. For example, the sub-window may be an application input method window, an application prompt box window, and the like. When the parent window is not visible, the child window is also not visible.
Unlike an application window, a system window does not need to correspond to activity. Further, unlike child windows, system windows do not need to have parent windows. The system window does not belong to any application, is created by the system, only belongs to the system, and can be created by declaring the authority. For example, the system window may be a power off dialog window, a status bar window, a search bar window, an input method window, a warning dialog, a system volume bar, and so forth.
It should be noted that the system window is generally higher in hierarchy than the application window and the sub-window.
With continued reference to fig. 2B, in the embodiment of the present application, a floating ball and a floating window are disposed in the system window. From the above analysis, it can be known that the floating ball and the floating window are both system windows and cannot be set in the application window.
The floating window and the floating ball essentially give the individual views constituting the activity to the window manager for management. Due to the system limitation of the android underlying layer, the Z-axis range of the application window is 1 to 99, the Z-axis range of the sub-window is 1001 to 1999, and the Z-axis range of the system window is 2000 to 2999, so the floating window and the floating ball can only be realized in the system window range. If a user-defined system level window is required to pop up, the authority needs to be dynamically applied. Wherein, the Z axis is the concept of the hierarchy of the android window, and the larger the Z axis, the more the window is on the top layer.
Furthermore, since the interface of each application in the application program is composed of activities and any activity belongs to the application process, the hover ball and the hover window set in the system window do not have the activity function. In order to obtain the effect similar to activity in the application window, namely, display content and operation based on sliding of the user on the hover ball and the hover window, it is necessary to additionally set a sliding operation, a sliding conflict, and the like in the system window, and determine the focus of the response window according to operation such as clicking of the user. And in particular will be apparent from the following description.
In one embodiment of the present application, the translation is performed as an example. Illustratively, the default language for system settings in an electronic device (exemplified by "cell phone") is simplified Chinese. For example, in some embodiments, an option switch such as "copy triggered translation" is provided in the setting interface of the mobile phone, and after the user selects to turn on the function, when the user copies a word (e.g., english) in a non-system default language, the mobile phone is triggered to invoke the translation function in the embodiments of the present application, obtain a translation result of the copied text, and display the translation result on the display screen. The translation result may be an original text (e.g., a copied text) and/or a translated text corresponding to the translation event. Therefore, the mobile phone can directly present the translation result after recognizing the intention of executing the translation, so that the intention of the user needing translation can be quickly met.
To facilitate user operation, the cell phone, after recognizing the intent to perform the translation, may display a hover ball (also referred to as a hover ball control) in the current page, which may be used to trigger translation of the copied text. That is to say, under the condition that the hover ball is displayed in the page, if the electronic device receives an operation that the user clicks the hover ball after selecting a certain text for copying, the electronic device invokes the translation function in the embodiment of the present application, obtains the translation result of the copied text, and displays the translation result on the display screen.
Through the scheme, when a user looks up an article or normally uses the mobile phone, and the user has a translation requirement, the electronic equipment can intelligently identify the operation intention of the user and bring convenience to the user operation by actively popping up the translation floating ball. The user only needs to select the text (such as words or sentences) needing to be inquired and then clicks the translation floating ball, the electronic equipment can be triggered to execute translation, so that the selected text is translated into the target language in real time, the requirement of the user for translation anytime and anywhere is met, and great convenience is brought to the user.
Optionally, the embodiments of the present application provide the following two display states or modalities for the hover ball. Wherein the hover ball in the first state is configured to provide a user with an entry for displaying the translation result. And the levitating ball in the second state is set to be displayed after the user does not trigger any clicking or touching operation on the levitating ball in the first state within the preset time. In practical applications, when a user clicks or touches a hover ball (for example, the hover ball in a first state or a second state), the mobile phone displays a hover window (also referred to as a hover window control) with a translation result. Optionally, after the mobile phone displays the floating window, the floating ball disappears or continues to be displayed, which is not limited herein.
The suspension ball in the first state occupies a larger display area as the suspension ball in the first state is in the initial state, and the suspension ball in the second state occupies a smaller display area as the suspension ball in the second state is in the simplified state. The hoverball in the first state may also be referred to as the first hoverball control for short, and the hoverball in the second state may also be referred to as the second hoverball control for short.
For example, in other embodiments, an option switch such as "copy triggered translation" is not set in the setting interface of the mobile phone, and the mobile phone may further determine other possible intentions of the user according to the operation of copying the text by the user, such as one or more of intentions of adding a schedule, adding a memo, sharing an application, adding a favorite, adding a dictionary, and opening a map navigation. In actual implementation, the embodiments of the present application do not limit the case where the mobile phone determines the user's intention according to the user's operation of copying characters.
Referring to fig. 3A, for example, taking a reading application as an example, after a user opens a certain reading page in the reading application, the mobile phone displays english content on the display screen. As shown in (a) in fig. 3A, in a scenario that requires translation, a user selects the word "level" and, as shown in (b) in fig. 3A, in response to an operation of the user selecting text, the mobile phone interface pops up a tab 201, where the tab 201 includes at least a "copy" option, for example. After the mobile phone monitors the content change in the clipboard, the intention of the user for copying the text is triggered and identified. It should be understood that after the user performs the copy operation on the text, the copied text may be stored in the clipboard, and thus the content in the clipboard may be changed. Therefore, after the content in the clipboard changes, i.e., after the user enters a copy operation. After the user clicks the "copy" option 201, the handset attempts to identify the user's intent after copying the text, at which point the handset pops up a hover ball marker 202 as shown in fig. 3A (c) for indicating that the handset is identifying the user's intent. For example, a mobile phone can recognize an intention from data such as text content of a copied text and a user figure. In the identification process, the user's intention can be identified without the user's operation, that is, without the user clicking any content of the page shown in fig. 3A (c). When the system recognizes that the user's intention is to translate the word "level", the cellular phone displays the hovercall 203 in the first state as shown in fig. 3A (d), and the hovercall 203 is used to provide the user with an entry for displaying the translation result. In this case, the mobile phone already calls the translation function in the background, acquires the translation result of the "level" word, and caches the translation result of the "level" word.
In some embodiments, within a preset time period (for example, 5 seconds) after the mobile phone displays the hover ball in the first state, if the mobile phone receives a click or touch operation of the user on the hover ball in the first state, the mobile phone may pop up a hover window on the user interface and display a translation result corresponding to the copied content in the hover window. Optionally, the floating ball may be hidden or not hidden when the mobile phone pops up the floating window on the user interface, which may be specifically determined according to actual use requirements, and the embodiment of the present application is not limited. The preset time may be a short time in seconds, and the specific time is not limited herein.
Exemplarily, in conjunction with fig. 3A, as shown in (a) and (B) in fig. 3B, in response to a click or touch operation of the user on the hover ball 203, the mobile phone displays the hover window 204 and presents a translation result of "level" within the hover window 204. The translation result displayed in the floating window 204 includes the english word "level" to be queried copied by the user and the chinese paraphrase "development" of the word, i.e. the translation result. The interface displayed by the floating window 204 also includes voice reading, text for copying the translation result, translation language switching, and the like.
It can be understood that, when the user clicks or touches the hover ball 203, because the mobile phone has cached the translation result of the "level" word selected by the user in fig. 3A, and because the clipboard of the mobile phone stores the word copied last by default and does not detect that the clipboard content has changed, after the user triggers the operation of clicking or touching the hover ball 203, the mobile phone displays the hover window 204 and presents the translation result of the "level" word in the hover window 204.
Referring to fig. 3B (B), in the case that the cell phone displays the floating window 204, the floating ball 203 is hidden, so as to achieve better user experience. As shown in fig. 3B (c), in response to the user triggering an operation to cancel the display of the floating window 204, the cellular phone may pop up the floating ball 203 again. Unlike the levitation ball shown in (a) of fig. 3B, the levitation ball shown in (c) of fig. 3B can be presented as the levitation ball 205 in the second state.
In some embodiments, within a preset time period (e.g., 5 seconds) after the mobile phone displays the hoverball in the first state, if the mobile phone does not receive a click or touch operation of the user on the hoverball in the first state, the mobile phone may update the display state of the hoverball, for example, display the hoverball in a preset area of the display screen after reducing the hoverball, for example, display the hoverball in a welt. Wherein the reduced levitation ball is the levitation ball in the second state.
In some embodiments, when the mobile phone displays the hover ball in the second state, if the mobile phone receives a click operation or a touch operation on the hover ball in the second state after a user selects a certain text for copying, the mobile phone may pop up a hover window on the user interface and display a translation result corresponding to the copied content in the hover window. Optionally, the floating ball may be hidden or not hidden when the mobile phone pops up the floating window on the user interface, which may be specifically determined according to actual use requirements, and the embodiment of the present application is not limited.
It should be noted that, because the clipboard of the mobile phone stores the word copied last time by default, in a state where the hover ball is displayed in the page, if the user clicks the hover ball to trigger the mobile phone to execute the translation operation, the hover window will display the corresponding translation result of the text stored in the clipboard last time before the user clicks the hover ball.
For example, referring to fig. 3A (d), as shown in fig. 3C (a), when the cell phone pops up the floating ball 203 in the first state, the cell phone starts timing, and if the cell phone does not receive a click or touch operation of the user on the floating ball 203 in the first state within 5 seconds, the cell phone reduces the floating ball to the floating ball 205 in the second state and displays the floating ball close to the edge. As shown in fig. 3C (b) and (C), the user selects the "copy" option after selecting the text "progress", and then the user clicks or touches the hover ball 205 in the second state. After the user performs the copy operation on the text, the copied text is stored in the clipboard, so that the content in the clipboard changes. After the mobile phone monitors the content change in the clipboard, the intention of the user for copying the text is triggered and identified. As shown in fig. 3C (d), in response to a user operation, the mobile phone displays the floating window 204 and displays a translation result of "progress" in the floating window 204. The translation results displayed in the floating window 204 may include the english word "progress" to be queried copied by the user and the chinese paraphrase "progress" of the word, i.e., the translation results.
As shown in fig. 3B and fig. 3C, if the user selects the word "level" and clicks the "copy" item, and then clicks the hover ball, the mobile phone displays the hover window and displays the translation result of "level" in the hover window. Then, if the user selects the word "progress", clicks the "copy" item, and then clicks the floating ball, the mobile phone will display the floating window and display the translation result of "progress" in the floating window. That is, the mobile phone recognizes that the word to be translated is changed from the original "level" to the "progress" copied newly by the user, and accordingly displays the translation result of the newly copied text "progress" in the floating window.
Therefore, in a scene that a foreign language document needs to be consulted, a user selects a word needing to be translated, a menu bar with copying and translating options is displayed, a floating window is displayed on a current page of a current application program according to different operations of the user, and a translation result of the word is presented in the floating window. In addition, the focus of the floating window is not preempted with the currently applied page window, so that a user can continue browsing the original text after finishing querying one word without closing the floating window. When a user has a new word to be inquired in the process of continuously browsing the page by the current application, the word is selected, the floating window can be displayed on the current page of the current application program according to different operations of the user, and the translation result of the word is displayed in the floating window. The method is particularly suitable for scenes that the user needs to continuously translate, and the experience of browsing the original text by the user is not influenced in the process that the user uses the application program.
As shown in fig. 3B and 3C, the initial state displayed by the floating window 204, that is, the default state displayed after the user clicks the floating ball 203, is a half-screen state, and the size occupies about half of the mobile phone screen. Optionally, in response to a user manipulation of the floating window 204, the floating window 204 may expand, and the expanded floating window may display more content about the translation result.
It should be noted that the floating ball 203 and the floating window 204 are two different types of windows at the android mobile end. The floating is opposite, for example, the upper element can be called "floating" element, such as the navigation bar and the tab bar are floating relative to the lower content area. In the embodiment of the present application, the floating ball 203 is set as an entrance linked to the floating window 204, and the user is guided to display the translation result in the scene where the translation result needs to be displayed, and the user can trigger the floating window 204 to display the translation result by clicking the floating ball 203. The floating window 204 is set as a content presentation window for displaying the translation result.
The levitation ball and the levitation window according to the embodiment of the present application are both system windows. In addition, since android has strict control over the floating ball and the floating window, dynamic permission application is required if a user-defined system-level window is to be popped up.
When the default language set by the system in the mobile phone is simplified Chinese, the mobile phone recognizes that the language in which the user copies the text is not the current system language of the mobile phone (i.e., the default language set by the mobile phone), and can recognize the intention of the user including performing translation. For example, when the language of the text that the user triggers to copy is a language other than simplified chinese, such as english, japanese, french, etc., the mobile phone recognizes the translation intention of the user, and displays the hover ball identifier 202, the hover ball 203, and the like.
It will be appreciated that the default language set by the handset is typically the language familiar to the user and therefore there is no translation requirement, that is, when the handset recognizes that the language in which the user copies text is the default language set by the handset, it will be recognized that there is no intent to perform a translation.
As described above, in the embodiment of the present application, whether the text copied by the mobile phone triggers the translation is related to the default language set by the system and the language of the copied text. That is, the handset recognizes that the language in which the user copied the text is not the current system language of the handset (i.e., the default language set by the handset), it may recognize that the user's intent includes performing translation. In actual implementation, there are various possible scenarios for copying text. In the following, several possible scenarios are exemplified, wherein it is assumed that the default language of the system settings in the handset is simplified chinese.
The first scenario is: the copied text includes both system language and non-system language text. For example, when the copied text includes both chinese and french, since the mobile phone recognizes that the copied text includes non-chinese french text, after the text is copied, the user still triggers the operation of performing translation, that is, displaying and popping up the hovel mark 202 shown in fig. 3A (c), and automatically displaying the hovel 203 in the first state shown in fig. 3A (d) after a while.
The second scenario is: the copy text is text in a non-system language set by the application itself. For example, when the application language set by the current application is english, the user selects an english text in the application to copy, and since the mobile phone recognizes that the copied text includes a non-chinese text, after the user selects the text to copy, the operation of executing translation is still triggered, that is, the hover ball identifier 202 shown in fig. 3A (c) is displayed and popped up, and the hover ball 203 in the first state shown in fig. 3A (d) is automatically displayed after a period of time.
The third scenario is: the copied text is the text in the non-system language entered by the user. For example, in an application supporting a user to manually input a text, such as a chat application or a memo, the user selects a piece of english text input by the user to copy, and since the mobile phone recognizes that the copied text includes a text that is not chinese, after the user selects the text copy, the user still triggers an operation of performing translation, that is, displaying and popping up a hoverball mark 202 shown in (c) of fig. 3A, and automatically displaying the hoverball 203 in the first state shown in (d) of fig. 3A after a period of time.
In some embodiments of the present application, the mobile phone recognizes the user's intention including performing translation when the mobile phone recognizes that the language of the copied text is a preset language. The preset language refers to a language for supporting translation by a mobile phone system or a translation application on a mobile phone. If the mobile phone does not support the language for translating the copied text at all, the translation result cannot be obtained, and for the situation, the intention of executing the translation is identified as not existing.
In other embodiments of the present application, the mobile phone only recognizes the user's intent, including performing the translation, when the mobile phone recognizes that the copied text needs to satisfy a certain text type. Illustratively, the cell phone may only recognize the user's intent including performing a translation when the copied text is not a web site link, mailbox, or string with a particular meaning such as a machine-generated password (e.g., a shopping password). These strings with specific meanings, usually just identifiers, are used to distinguish different web pages, different mailboxes, different shopping items, etc. and do not have linguistic meanings. Thus, there is no need for translation.
In other embodiments of the present application, the cell phone only recognizes that the user's intent includes performing a translation when the cell phone recognizes that the source application of the current copied text needs to satisfy a certain application type. For example, if the source application of the currently copied text is a reading-type application or a browser application, the cell phone will recognize the user's intent including performing a translation. As another example, if the source application that is currently copying text is a separate professional translation application such as a translation application or a shopping entertainment type application, since there is no need to copy content for translation, it will be recognized that there is no intention to perform translation.
For example, when the user copies a text in a non-system default language in a shopping application, the mobile phone determines that the user does not have a translation requirement at this time, and thus the hoverball mark 202 and the hoverball 203 are not displayed after the user selects the text to copy. Similarly, when the user copies the text in the non-system default language in the professional translation software, the mobile phone determines that the user does not have the translation requirement at this time, and therefore the hoverball mark 202 and the hoverball 203 are not displayed after the user selects the text to copy.
In the embodiments of the present application, the manner in which the mobile phone is used to recognize the intention of the user is not limited. For example, the mobile phone may determine the operation intention of the user after the user copies the text according to the current application type, the text type copied by the user, and the context displayed by the current application. For example, the mobile phone may assist in determining the operation intention of the user by comprehensively analyzing and predicting behavior habits of the user, a situation of using APP, and the like using Natural Language Processing (NLP).
In the embodiment of the present application, the mobile phone is triggered to recognize the operation intention of the user mainly by taking the copy operation as an example. However, the present invention is not limited to this. For example, the mobile phone may be triggered to recognize the operation intention of the user by an operation such as a selection operation on a text, a long-press operation, a line drawing operation, or a double-click operation.
Through the scheme, when a user looks up an article or uses the mobile phone normally, when the user has a translation requirement, the electronic equipment can intelligently identify the operation intention of the user and bring convenience to the user operation by actively popping up the translation floating ball. The user only needs to select the text (such as words or sentences) needing to be inquired and then clicks the translation floating ball, the electronic equipment can be triggered to execute translation, so that the selected text is translated into the target language in real time, the requirement of the user for translation anytime and anywhere is met, and great convenience is brought to the user.
It should be noted that, during the use of the electronic device by the user, the operation is usually switched back and forth between different pages, and the user may have a translation requirement for some pages, and may not have a translation requirement for some pages. If the hover ball is present all the time or pops up frequently, it may interfere with the normal use of the user. Therefore, the embodiment of the application provides more intelligent suspension ball display and quitting process so as to improve the user experience.
In the embodiment of the application, under the condition that the electronic equipment displays an application page, when text content needing to be translated is met, after a user selects a 'copy' item or a 'translation' item in a displayed option bar after selecting the text, the system can automatically pop up a translation floating ball; after returning to the desktop from the current page or jumping to another page, the system will automatically hide the translated hover ball, i.e., the hover ball automatically disappears. The following describes in detail the strategy for controlling the display and hiding of the floating ball in the embodiment of the present application.
In some embodiments of the present application, the hover ball may be bound to a page (referred to as a first page). After the binding relation between the floating ball and the first page is established, the system can monitor whether the first page is switched to foreground display or not, pop up the floating ball when the first page is detected to be switched to the foreground display, and hide the floating ball when the first page is detected to be switched to the background.
In other embodiments of the present application, the hover ball may be bound to an application (referred to as a first application). After the binding relation between the floating ball and the first application is established, the system monitors whether the first application is switched to a foreground for displaying, pops out the floating ball when the first application is detected to be switched to the foreground for displaying, and hides the floating ball when the first application is detected to be switched to the background.
That is to say, in the embodiment of the present application, the binding granularity of the hovercall may be a page (specifically, activity) or an application, and the binding granularity of the hovercall may be automatically switched according to conditions, which is described in detail below with reference to the accompanying drawings.
First, a processing strategy in which the binding granularity of the floating ball is a page is explained.
In some embodiments, as shown in fig. 3A above, in response to a user operation to copy text in a first page, the electronic device can display a hover ball in the first page and establish a binding relationship between the hover ball and the first page. It can be understood that, when a user executes a text copy operation on the first page, it can be considered that the user has a translation requirement for the text content of the first page, and therefore, after the bound relationship between the floating ball and the first page is established, that is, after the floating ball is displayed in the first page, the floating ball can be continuously displayed on the first page, so that the user can trigger a translation function through the floating ball at any time.
In practical implementation, each time the display screen is switched to the first page for display, the electronic device may control the hovercall to be displayed on the first page according to the binding relationship between the hovercall and the first page. When the display screen is switched to other pages (called as second pages) except the first page for displaying, the floating ball is hidden, and interference is avoided.
It should be noted that the second page and the first page may be different pages of the same application, or may be pages of different applications. Optionally, the second page may also be a desktop.
Illustratively, as shown in fig. 4A (a), a hover ball is displayed in the a page. It can be understood that the hovercall has a binding relationship with the a page at this time. As shown in (b) and (c) of fig. 4A, in response to a page turning operation by the user within the a-page range, the electronic device may continuously display the hover ball in the a-page. That is to say, during the page turning operation, the binding relationship between the floating ball and the page a is not changed, and the floating ball does not disappear.
Further illustratively, as shown in fig. 4B (a), a hover ball is displayed in the a page, and at this time, the hover ball has a binding relationship with the a page. As shown in fig. 4B (B), in response to a user triggering an operation to switch from the a page to another page (e.g., the B page), the electronic device displays the B page and does not display (hide) the hover ball in the B page. As shown in fig. 4B (c), in response to the user triggering an operation to return from the B page to the a page, the electronic device displays the a page and displays the hover ball in the a page.
Further illustratively, as shown in fig. 4C (a), a hover ball is displayed in the a page, and at this time, the hover ball has a binding relationship with the a page. As shown in fig. 4C (b), in response to a user triggering a switch from the a-page to the desktop, the electronic device displays the desktop and hides the hover ball. As shown in fig. 4C (C), in response to the user triggering an operation to return from the desktop to the a page, the electronic device displays the a page and displays the hover ball again.
Therefore, in the process of switching back and forth between different pages, the binding relationship between the floating ball and the pages is unchanged, the floating ball is automatically popped out from the bound pages and is automatically hidden in the unbound pages, and therefore interference on normal use of a user is avoided, the floating ball can be displayed at a proper time, and the use experience of the user is improved.
Optionally, if the first page is returned within a preset time after the first page is last left, the floating ball may reappear in the first page. The preset time period may be 15 minutes, or 1 hour, or other possible time periods, which may be specifically set according to actual use requirements, and the embodiment of the present application is not limited. For example, the preset time period is set to 15 minutes, and assuming that the time from the last leaving of the first page is denoted as T1 and the time to return to the first page is denoted as T2, if Δ T (= T2-T1) does not exceed 15 minutes, that is, if it is not time out, the floating ball reappears in returning to the first page again.
Optionally, if the electronic device detects that the electronic device does not return to the first page within a preset time after the electronic device leaves the first page last time, the electronic device releases the binding relationship between the floating ball and the first page. Illustratively, the preset time period is set to 15 minutes, and if Δ T (= T2-T1) exceeds 15 minutes, although returning to the first page from other pages, no hover ball occurs in the first page due to timeout. In this case, the binding relationship between the hover ball and the first page has been released.
Optionally, after jumping from the first page to the second page, if the user triggers to execute a text copy operation on the second page, the electronic device may pop up a hover ball on the second page, and establish a binding relationship between the hover ball and the second page. It will be appreciated that in this case the life cycle of the translated hover ball of the first page is over, i.e., the binding between the hover ball and the first page is released. When the first page is switched to foreground display, the translation hovercall can not be displayed on the first page any more.
Illustratively, as shown in fig. 5A (a), a hover ball is displayed in the a page, and at this time, the hover ball has a binding relationship with the a page. As shown in fig. 5A (b), in response to a user triggering an operation of switching from an a page to a C page, the electronic device hides the hover ball. As shown in (C) and (d) of fig. 5A, in response to a user's copy operation on the text "news" in the C page, the electronic device pops the hover ball in the C page, binds the hover ball to the C page, and releases the binding relationship between the hover ball and the a page. Moreover, as the clipboard of the mobile phone stores the word copied last by default and detects that the content of the clipboard changes, the mobile phone calls a translation function to obtain the translation result of the word "news" copied last and caches the translation result. Alternatively, as shown in fig. 5A (e), when the operation of the floating ball by the user is not received within a certain period of time, the floating ball is displayed in a welt. Alternatively, as shown in (f) of fig. 5A, in response to a user triggering an operation of switching from the C page to the a page, the electronic device may hide the hover ball in the a page because the hover ball is unbound from the a page at this time.
Further exemplarily, as shown in (a) and (B) of fig. 5B, in response to a click or touch operation of the user on the hover ball, the mobile phone displays the hover window and presents the translation result of "news" within the hover window. It can be understood that, when the user clicks or touches the hover ball, since the mobile phone already caches the translation result of the word "news" selected by the user in fig. 5A, after the user clicks or touches the hover ball, the mobile phone displays the hover window and presents the translation result of the word "news" in the hover window.
Optionally, in response to a user manipulation of the hover ball (e.g., clicking on a delete control corresponding to the hover ball), the electronic device may remove the hover ball from the first page. Accordingly, the electronic device may release the binding relationship between the hover ball and the first page. It will be appreciated that after the hover ball is unbound from the first page, the hover ball is no longer present in the first page when the front table displays the first page.
The processing strategy that the binding granularity of the floating ball is the page is explained above, the processing strategy that the binding granularity of the floating ball is the application is explained below, and the switching strategy of the two types of binding granularities is explained.
In some embodiments, the electronic device may establish a binding relationship between the hover ball and the application. Correspondingly, when the display screen switches display among the multiple pages of the application, the floating ball can be displayed in each page of the application, and a user can conveniently trigger the translation function through the floating ball at any time.
In practical applications, some applications support column-by-column display (which may be referred to as parallel view mode), and after switching to the parallel view mode, the same application supports simultaneous display of two pages. In this case, if the translation hover ball only binds to one page of the application, the hover ball will frequently disappear and be frequently displayed when different pages of the same application are switched. Therefore, in order to avoid frequent disappearing and frequent displaying of the hovercall when different pages of the same application are switched, the hovercall can be kept displayed in all interfaces of the application when the application is in a parallel view mode. That is, the hover ball may be bound to the application in such a scenario. The embodiment of the application provides that: in a parallel view mode, defaulting the binding granularity of the suspension ball as application; and in the full screen mode, the default floating ball binding granularity is a page. And, with the change of the page display mode of the application, it is supported to switch the binding granularity of the hover ball to the application or to the page, and a specific switching process will be described in detail below.
Optionally, in some embodiments, assuming that the first application is displayed in the parallel view mode, in response to a copy operation of a user on text in a currently displayed page of the first application, the electronic device may display a hover ball in the currently displayed page of the first application, and establish a binding relationship between the hover ball and the first application.
It should be noted that, after the binding relationship between the floating ball and the first application is established, the system monitors whether the first application is switched to foreground display, pops up the floating ball when detecting that the first application is switched to foreground display, and hides the floating ball when detecting that the first page is switched to background. In other words, each time the display screen is switched to a page (arbitrary page) of the first application, the electronic device may display the hover ball on the page of the first application based on the binding relationship between the hover ball and the first application. And when the display screen is switched to other pages except the first application for displaying, hiding the floating ball.
In some embodiments, in the case that a binding relationship exists between the hover ball and the application, the electronic device may, in response to a user operation, release the binding relationship between the hover ball and the application and establish the binding relationship between the hover ball and the page. Illustratively, the user operation may include the user triggering the application to switch from parallel view mode to full screen mode, and then performing a copy operation of the text in full screen mode.
In some embodiments, in the case that a binding relationship exists between the hover ball and the page, the electronic device may, in response to a user operation, release the binding relationship between the hover ball and the page and establish the binding relationship between the hover ball and the application. For example, the user operation may include a user triggering an operation of the application to switch from a full-screen mode to a parallel-view mode.
In practical application, the electronic device with the foldable screen or the large-screen electronic device such as a tablet can support the parallel view mode. The parallel view mode is different from the traditional split screen mode: the traditional split screen mode is to display two different applications (specifically, application interfaces) through two split screen areas of the display screen, while the parallel view mode can be understood as a split screen display mode for the same application, that is, two different interfaces of one application can be displayed through two split screen areas of the display screen. In actual use, the electronic equipment can set the display mode according to the use requirements of users, and free switching between a parallel view mode and a full screen mode is realized.
Exemplarily, fig. 6A shows an interface schematic diagram of the electronic device when the parallel view mode is set. Fig. 6A (a) shows a setting interface of the parallel view mode, in which options for setting the application to the parallel view mode are displayed, for example, application 1 corresponds to one option, application 2 corresponds to one option, application 3 corresponds to one option, and application 4 corresponds to one option. As shown in (b) in fig. 6A, in response to an operation by the user on an option corresponding to the application 1, the electronic device sets the application 1 to the parallel view mode. As shown in fig. 6A (c) and (d), in response to a user triggering an operation of the application 1 displayed in the foreground (e.g., clicking an icon of the application 1), the electronic device displays two different pages of the application 1 in a parallel view mode.
Further exemplarily, as shown in (a) in fig. 6B, when the application 1 is in the parallel view mode, in a scene that requires translation, a user may perform a copy operation on text in a page of the application 1, for example, the user selects a word "level" as shown in (B) in fig. 6B, and in response to the user selecting the text, the mobile phone interface may pop up a "copy" option. After the user clicks the "copy" option, the cell phone listens to the clipboard for content changes and attempts to identify the user's intent after copying text. When the system recognizes that the user's intention is to translate the word "level", the mobile phone displays the hover ball shown in fig. 6B (c), and establishes a binding relationship between the hover ball and the application 1. If the mobile phone does not receive the operation of the user on the floating ball within 5 seconds, the floating ball is displayed in a welt manner as shown in (d) in fig. 6B. The hover ball is used to provide a user with an entry to display the translation results. And after the user copies the 'level' word, the mobile phone monitors the content change in the clipboard, calls the translation function in the background to acquire the translation result of the 'level' word, and caches the translation result of the 'level' word.
As shown in (a) and (b) in fig. 6C, in response to a click or touch operation of the user on the hover ball, the mobile phone displays the hover window and displays a translation result of "depth" in the hover window. The translation result displayed by the floating window can comprise the English word "depth" to be queried and copied by the user, and the Chinese paraphrase "development" of the word, namely the translation result.
It should be noted that the display position of the floating ball in the parallel view mode is not limited in the embodiment of the present application, for example, the floating ball may be displayed in the left split-screen region or the right split-screen region, which may be specifically determined according to actual use requirements, and the embodiment of the present application is not limited in this embodiment.
In some embodiments, in the case that the hover ball is bound to the first application, when the first application switches to the background display, the hover ball hides the display and the binding relationship of the hover ball to the first application is unchanged. And when the first application is switched to foreground display, the levitated ball is displayed again.
Exemplarily, as shown in fig. 7A (a), the mobile phone displays a C page and a D page of the application 1 in a parallel view mode, for example, a hover ball is displayed in the C page of the application 1, and at this time, the hover ball has a binding relationship with the application 1. As shown in fig. 7A (b), when the display screen content is switched to other pages of the application 1 (e.g., E-page), the hover ball does not disappear (i.e., is not hidden).
That is, according to the processing policy of binding the floating ball and the application, when the first application is in the parallel view mode, if the different pages of the first application are switched, the floating ball is not hidden. This is different from the above-described processing strategy of binding the hover ball to the page.
On the other hand, according to the processing strategy of binding the floating ball and the application, when the first application is in the parallel view mode, if the first application is switched to the background, the floating ball is hidden. This is the same processing strategy as the above-described hover ball-to-page binding.
Exemplarily, as shown in fig. 7B (a), the first application displays two different pages in a parallel view mode, and a hover ball is displayed in one page of the first application, where the hover ball and the first application have a binding relationship. As shown in fig. 7B (B), in response to a user triggering an operation of switching from the first application to the desktop, the electronic device displays the desktop and hides the hover ball. As shown in fig. 7B (c), in response to the user triggering the operation of switching the first application to the foreground display, the electronic device displays the page of the first application and displays the hover ball again.
Therefore, in the process of switching back and forth between different pages of the first application, the binding relationship between the floating ball and the application is unchanged, the floating ball is automatically popped out from the page bound with the application and is automatically hidden in other pages, so that the normal use of a user is not interfered, the floating ball can be displayed at a proper time, and the use experience of the user is improved.
Optionally, if the first application is returned within the preset time after the first application is left last time, the suspension ball reappears in the page of the first application. For example, the preset time period is set to 15 minutes, and assuming that the time from the last leaving of the first application is T1 and the time from returning to the first application is T2, if Δ T (= T2-T1) does not exceed 15 minutes, that is, if it is not time out, the hovering ball reappears in the page returning to the first application again.
Optionally, if the electronic device detects that the electronic device does not return to the first page within a preset time period after the electronic device leaves the first page last time, the electronic device releases the binding relationship between the floating ball and the first application. Illustratively, the preset time period is set to 15 minutes, and if Δ T (= T2-T1) exceeds 15 minutes, no hover ball appears in the page of the first application due to timeout. In this case, the binding relationship between the hover ball and the first application has been released.
In the embodiment of the application, the display mode of the first application may be switched from the parallel view mode to the full screen mode in response to a user operation. Optionally, in a case of switching from the parallel view mode to the full screen mode, the hovercall is not hidden in the page displayed in the full screen mode, and at this time, the binding relationship between the hovercall and the first application is not changed. Further optionally, if the user performs a text copy operation in a page (referred to as a third page) displayed in a full screen mode, the electronic device establishes a binding relationship between the hoverball and the third page, and releases the binding relationship between the hoverball and the first application.
Illustratively, as shown in fig. 8A (a), the display screen displays the C page and the D page of the application 1 in the parallel view mode, for example, a hovercall is displayed in the C page of the application 1, and the hovercall and the application 1 have a binding relationship. The user may drag the bar control in the middle of the two split screen areas along the arrow shown in fig. 8A (a), triggering the display mode of the application 1 to switch from the parallel view mode to the full screen mode. As shown in fig. 8A (b), in response to a user operation, the electronic device switches the display mode of the application 1 from the parallel view mode to the full screen mode, and the display screen displays the D page of the application 1 in full screen, where the hover ball is not hidden. As shown in (c) and (D) in fig. 8A, in response to a copy operation of the "content" word in the D page by the user, the electronic device binds the hover ball with the D page and releases the hover ball from the application 1. And after the user executes the copy operation on the 'patent' word, the mobile phone monitors the content change in the clipboard, calls the translation function in the background, acquires the translation result of the 'patent' word, and caches the translation result of the 'patent' word.
Further optionally, in conjunction with fig. 8A, as shown in (a) and (B) of fig. 8B, in response to a click or touch operation of the user on the hover ball, the mobile phone displays the hover window and presents the translation result of "patent" in the hover window.
It should be noted that, the foregoing is exemplified by switching the display mode along the arrow shown in (a) in fig. 8A, and it can be understood that the bar control may also be dragged along the direction opposite to the arrow shown in (a) in fig. 8A to trigger the switching of the display mode, so that after the switching to the full-screen mode, the display screen may display the page C of the application 1 in full screen.
In the embodiment of the application, when the foldable screen mobile phone is in the unfolded state, the foldable screen can display the application interface through the inner screen, and the display mode of the inner screen can be set to be a parallel view mode in a supporting mode. When the foldable screen mobile phone is in a folded state, the foldable screen can display an application interface through the outer screen, at this time, the display mode is usually a full-screen mode by default, and the display mode of the outer screen is usually not supported to be set to be a parallel view mode.
Optionally, assuming that the electronic device with the foldable screen is in an unfolded state, the electronic device displays two pages of the first application in a parallel view mode through the inner screen, and the inner screen displays the floating ball, if the user triggers to fold the screen of the electronic device, the electronic device may switch one of the pages to the outer screen for display, and the floating ball is still displayed on the outer screen, and at this time, the floating ball still has a binding relationship with the first application. Optionally, in response to a text copying operation of the user on the page displayed on the external screen, the electronic device binds the hover ball with the page displayed on the external screen and disassociates the hover ball with the first application.
Exemplarily, as shown in fig. 9A (a), the electronic device is in an unfolded state, and displays the C page and the D page of the application 1 through the inner screen in a parallel view mode, and the inner screen displays the hover ball. As shown in fig. 9A (b), after the screen of the electronic device is folded, the inner screen is turned off (not shown), the outer screen displays one page (e.g., D page) of the application 1, and the ball is hovered on the outer screen. As shown in (c) and (D) of fig. 9A, in response to a user's copy operation of the "application" word in the D page, the electronic device binds the hover ball with the D page and disassociates the hover ball from the application 1.
And after the user executes the copy operation on the 'application' word, the mobile phone monitors the content change in the clipboard, calls a translation function in the background to acquire the translation result of the 'application' word, and caches the translation result of the 'application' word.
Further alternatively, in conjunction with fig. 9A, as shown in (a) and (B) of fig. 9B, in response to a click or touch operation of the user on the hover ball, the cell phone displays the hover window and presents the translation result of "application" in the hover window.
It should be noted that, the above description is exemplarily described by taking the folded external screen displaying the D page as an example, it can be understood that the folded external screen can also display the C page, and specifically which page displayed by the folded external screen can be set according to actual use requirements, which is not limited in the embodiment of the present application.
In practical implementation, the processing strategy for binding the hovel and the page in the folded state of the electronic device is similar to the processing strategy for binding the hovel and the page in the above embodiment. After the floating ball is bound with the page displayed on the outer screen in a folded state, the floating ball can be continuously displayed on the page, and a user can conveniently trigger a translation function through the floating ball at any time. For example, the electronic device may display a hover ball on the page each time the outer screen switches to the page display. When the display screen is switched to other pages except the page to be displayed, the floating ball is hidden, and interference is avoided.
Illustratively, as shown in fig. 9C (a), in the folded state, the D page is displayed on the external screen, and a hover ball is displayed in the D page, where the hover ball and the D page are in a binding relationship. As shown in fig. 9C (b), in response to a user triggering an operation of switching from the D page to another page (e.g., a G page), the electronic device displays the G page and does not display (hide) the hover ball in the G page. As shown in fig. 9C (C), in response to the user triggering an operation to return from the G page to the D page, the electronic device displays the D page and redisplays the hover ball in the D page.
The foregoing describes the hover ball display strategy and the hover ball binding granularity switching strategy when the electronic device is converted from the folded state to the unfolded state, and the following explains the hover ball display strategy and the hover ball binding granularity switching strategy when the electronic device is converted from the folded state to the unfolded state.
Alternatively, assuming that the electronic device with the foldable screen is in a folded state, if the user triggers to unfold the screen of the electronic device, there are the following changes: the method comprises the following steps that an outer screen is turned off, and an inner screen displays two interfaces of an application in a parallel view mode (one page of the two interfaces is the content displayed before the outer screen is turned off); the inner screen displays the floating ball; the relation between the floating ball and the page is removed, and the floating ball and the application displayed on the inner screen are bound.
Exemplarily, as shown in fig. 10 (a), the electronic device is in a folded state, and displays the D page in a full-screen mode through the external screen, and the external screen displays a hover ball, which has a binding relationship with the D page. As shown in fig. 10 (b), after the screen of the electronic device is unfolded, the outer screen is turned off (not shown), the inner screen displays the C page of the application 1 and the D page of the application 1 in the parallel view mode, and the ball is hovered in the inner screen.
Optionally, the processing policy of the bound of the hover ball and the application may further include: after jumping from the first application to the second application (assuming that the parallel view mode is set), if the user triggers execution of a text copy operation on the page of the second application, the electronic device may pop up a hover ball on the page of the second application, and establish a binding relationship between the hover ball and the second application. It will be appreciated that in this case the life cycle of the hoverball corresponding to the first application is over, i.e. the binding between the hoverball and the first application is released. When the first application is switched to foreground display, the translation hovercall can not be displayed in the page of the first application.
Optionally, the processing policy of the bound of the hover ball and the application may further include: after jumping from the first application to the second application (assuming that the parallel view mode is not set), if the user triggers execution of a text copy operation on a page of the second application, the electronic device may pop up a hover ball on the page of the second application, and establish a binding relationship between the hover ball and the page of the second application. It will be appreciated that in this case the life cycle of the hovel corresponding to the first application is over, i.e. the binding between the hovel and the first application is released. When the first application is switched to foreground display, the translation hover ball can not be displayed in the page of the first application.
Optionally, the processing policy of the bound of the hover ball and the application may further include: in response to a user operation of the hover ball (e.g., clicking on a delete control corresponding to the hover ball), the electronic device can remove the hover ball from the page of the first application. Accordingly, the electronic device may release the binding relationship between the hover ball and the first application. It can be appreciated that after the unbinding relationship between the hover ball and the first application, the hover ball no longer appears in the page of the first application when the foreground displays the page of the first application.
Optionally, assuming that a user performs a text copy operation on a certain page in the first application displayed in a full-screen mode, the binding granularity of the hover ball is a page (e.g., an H-page); after the first application exits or falls back to the background, the user can set the first application into the parallel view mode through configuration, and enter the application by using the parallel view mode again. The user can trigger switching among the applications of the first application, when the H page is switched, the electronic equipment pops up the floating ball, and the binding granularity of the floating ball is switched into the application. Then, when switching continues between the respective applications of the first application, the hover ball is not hidden.
Exemplarily, as shown in fig. 11 (a), the application 1 is in a full-screen mode, and a hover ball is displayed in a D page displayed in the full screen mode of the application 1, where the hover ball and the D page have a binding relationship. As shown in fig. 11 (b), in response to the user operation, after exiting the application 1, the display screen jumps to the setting interface in the parallel view mode, and the hover ball is hidden. As shown in fig. 11 (c), in response to a user operation, the electronic apparatus sets the application 1 to the parallel view mode. As shown in fig. 11 (D), in response to a user operation (e.g., clicking an icon of the application 1), the application 1 is opened in the parallel view mode, for example, the C page and the G page of the application 1 are displayed, and the hovel is hidden, and the binding relationship between the hovel and the D page is not changed. As shown in fig. 11 (e), when switching to the D page display, the hover ball appears again, at which time the hover ball is released from the D page and the hover ball is bound to the application 1. As shown in fig. 11 (f), when switching between different pages of the application 1 in the parallel view mode, the hover ball is not hidden.
In the embodiment of the application, innovation is performed on the interaction form of the hoverball for translation, the hoverball is bound with the application or the hoverball is bound with the page according to requirements, and the switching of the binding granularity is supported.
Fig. 12 schematically shows functional modules used in the control method for a translation control provided in an embodiment of the present application. As shown in fig. 12, the service presentation module, the service logic processing module, the context awareness module, the translation module, and the UX interface are mainly involved in the application layer. The translation module can be translation software carried by the system, and can also be a translation server. The translation module may include a language detection module and a language translation module, the language detection module is configured to detect a language of the copied text, and the language translation module is configured to translate the copied text according to the detected language. The frame layer is primarily concerned with the window manager and the clipboard manager, and as shown in FIG. 2A above, the window manager is used to manage window programs, such as the presentation or disappearance of a hover ball or window on an electronic device. The clipboard manager is used to manage a clipboard, which is a temporary storage area for temporarily storing copied contents (text to be translated).
FIG. 13 illustrates an exemplary diagram of the interaction flow between the various modules shown in FIG. 12. As shown in fig. 13, the flowchart includes S0 to S20, or may include S0 to S28, or may include S0 to S20 and S29 to S34, or may include S0 to S20 and S35 to S40.
S0, the scene perception module monitors the clipboard, namely, whether the clipboard has copying action or not is known from the clipboard manager.
S1, a business logic processing module monitors a copy event, namely, a situation awareness module acquires whether a clipboard has a copy action.
S2, the context awareness module monitors exiting of the current page, namely, the window manager learns whether the current page exits or not.
And S3, the service logic processing module monitors the display mode, namely, the window manager acquires whether the display mode is changed and how to change the display mode.
The context awareness module monitors whether the clipboard has a copy event from the clipboard manager, and when the clipboard has the copy event, the context awareness module notifies the business logic processing module of the copy event. The context awareness module may further obtain a source Application (APP), i.e., an application package name, of the clip content in the clipboard. That is, the context aware module can identify that clipboard content was copied from a particular application. In addition, the context awareness module can also detect whether the operation of exiting the current page exists, and when the operation of exiting the current page is detected, the context awareness module informs the business logic processing module.
It should be noted that, the embodiment of the present application does not limit the execution order of the above S0 to S3.
And S4, when the user clicks the copy control after selecting the text, the clipboard manager receives the operation of copying the text.
And S5, the clipboard manager stores the copied contents in the clipboard.
And S6, the clipboard manager sends the copied content, the application package name and the page information to the context awareness module.
And S7, the context awareness module monitors the copy event of the clipboard and sends the copied content, the application package name and the page to the service logic processing module.
The application package name is the name of the application program to which the copied content belongs, and the page is the page where the copied content is located.
And S8, the service logic processing module monitors the copy event and instructs the service presentation module to display the floating ball.
And S9, displaying the floating ball by the service presentation module.
After the hover ball is displayed, the hover ball provides the user with an entry to display the translation results. Further, whether the user needs to translate the copied content or not and display the translation result can be judged according to the operation of the user on the floating ball.
S10, the service logic processing module judges whether the copied content needs to be translated or not.
If the operation of the user on the floating ball is not received within the preset time length (if not), the service logic processing module judges that the copied content is not needed to be translated temporarily, and the service logic processing module continues to execute the following steps S11 to S12. If the operation (for example, a click operation or a touch operation) of the user on the floating ball is received within the preset time length, the service logic processing module judges that the copied content needs to be translated, and then the service logic processing module continues to execute the following steps S13 to S17.
And S11, the service logic processing module indicates the service presentation module to display the suspension ball in a welting way.
And S12, the service presentation module updates the display state of the floating ball and displays the display state of the floating ball close to the side edge of the screen.
And S13, the service logic processing module indicates the translation module to translate the copied content.
S14, the translation module obtains the translation result of the copied content.
And S15, the translation module feeds back the translation result of the copied content to the service logic processing module.
And S16, the service logic processing module indicates the service presenting module to display the translation result of the copied content.
S17, the service presentation module displays the translation result of the copied content.
Specifically, the service presentation module may display a floating window and display a translation result of the copied content in the floating window. Optionally, in the case of a floating window being displayed, the floating ball is hidden. After the display of the floating window is cancelled, the floating ball is displayed again.
In the case of executing S8-S9, execution of S18 and S19 described below is also triggered.
And S18, the service logic processing module acquires the current display mode from the window manager, determines the binding granularity of the levitated ball according to the current display mode and informs the window manager of the determination result.
For example, the display mode may be a full screen mode, or may be a parallel view mode.
And if the display mode is a full-screen mode, the service logic processing module establishes a binding relationship between the floating ball and the page where the copied content is located. The business logic processing module instructs the clipboard manager to subscribe to the current page.
And if the display mode is a parallel view mode, the service logic processing module establishes a binding relationship between the floating ball and the application to which the copied content belongs. The business logic processing module instructs the clipboard manager to subscribe to the current application.
And S19, the window manager subscribes to the application or the page according to the determination result.
And if the determined result is that the application is subscribed, the window manager subscribes the application. And if the determined result is the subscription page, the window manager subscribes the page.
And S20, after the window manager subscribes the application, when the window manager monitors that the application is displayed in the foreground, the window manager instructs the service presentation module to display the hover ball through the service logic processing module, namely, the hover ball can be popped out from the page of the application when the application is switched to the foreground for display. After the window manager subscribes a page, when the window manager monitors that the page is displayed in the foreground, the window manager instructs the service presentation module to display the floating ball through the service logic processing module, namely, the floating ball is popped out of the page when the page is switched to the foreground for display.
The control method of the hover ball after leaving from the subscribed page or application is described below in conjunction with S21-S28. The control method is suitable for a full screen mode and a parallel view mode.
S21, when the user triggers to return to the desktop or other application interfaces from the current page, the window manager receives the operation of switching the page or the application.
S22, the window manager informs the context awareness module of the subscribed page or the application leaving event, and the context awareness module perceives the leaving event.
And S23, the context awareness module reports the subscribed page or the application leaving event to the service logic processing module.
And S24, the service logic processing module indicates the service presentation module to hide the floating ball according to the subscribed page or the application leaving event.
And S25, hiding the floating ball by the service presentation module.
Illustratively, assuming a subscribed page, when a user triggers a switch from the subscribed page to another application interface or desktop, the window manager receives an operation to switch pages. The window manager notifies the context awareness module of the subscribed-to page departure event, which the context awareness module perceives. And the context awareness module reports the subscribed page leaving event to the service logic processing module. And the service logic processing module indicates the service presentation module to hide the floating ball according to the subscribed page leaving event. The service presentation module hides the floating ball.
Illustratively, assuming a subscribed application, when a user triggers a switch from the subscribed application to another application interface or desktop, the window manager receives an operation to switch the application. The window manager notifies the context awareness module of the subscribed-to application departure event, which the context awareness module perceives. And the context awareness module reports the subscribed application leaving event to the service logic processing module. And the service logic processing module instructs the service presentation module to hide the floating ball according to the subscribed application leaving event. The service presentation module hides the floating ball.
And S26, if the subscribed page or application is not returned within the preset time length, the service logic processing module determines to unsubscribe the page or application.
Specifically, if the page is subscribed, if the page is not returned to the subscribed page within the preset time length, the service logic processing module determines to cancel the subscription page. If the application is subscribed, if the subscribed application is not returned within the preset time length, the service logic processing module determines to cancel the subscribed application.
And S27, the service logic processing module sends the determination result to the window manager.
And S28, the window manager cancels the subscription of the current page or application according to the determination result.
And if the result of the determination is that the page is unsubscribed, the window manager cancels the page. After the subscription page is cancelled, when the page is switched to the foreground for display, the page can not display the floating ball.
And if the determined result is that the application is unsubscribed, the window manager cancels the subscription application. After the subscription application is cancelled, when the application is switched to the foreground for display, the page of the application cannot display the floating ball.
The following describes an implementation of controlling the hover ball after switching from the full screen mode to the parallel view mode in conjunction with S29-S34. And subscribing the page in a full-screen mode, namely binding the hovercall and the page.
S29, when the user unfolds the foldable screen to trigger the display from the outer screen to the inner screen, the window manager receives the operation of switching the display mode.
And S30, the window manager controls to switch from the full-screen mode to the parallel view mode.
And S31, the window manager informs the service logic processing module of the display mode switching message.
And S32, the service logic processing module determines to subscribe the current application according to the display mode switching message.
And S33, the service logic processing module instructs the window manager to subscribe the current application.
S34, the window manager subscribes to the current application and cancels the subscription page.
On one hand, after subscribing the application, when the window manager monitors that the application is displayed in the foreground, the window manager instructs the service presentation module to display the hover ball through the service logic processing module, that is, the hover ball is popped out from the page of the application when the application is switched to the foreground for display. On the other hand, after the subscription page is cancelled, when the page is switched to the foreground for display, the floating ball cannot pop up in the page.
That is, after the full-screen mode is switched to the parallel view mode, the binding relationship between the hovercall and the page is released, and the binding relationship between the hovercall and the application is established.
The following describes an implementation manner of controlling the hover ball after switching from the parallel view mode to the full screen mode in conjunction with S35-S40. And subscribing the application in the parallel view mode, namely binding the hovercall and the application.
And S35, when the user folds the foldable screen to trigger the switching from the inner screen to the outer screen for displaying, the window manager receives the operation of switching the display mode.
S36, the window manager controls to switch from the parallel view mode to the full screen mode.
S37, the window manager notifies the service logic processing module of the display mode switching message.
And S38, the service logic processing module determines to subscribe the current page according to the display mode switching message.
S39, the business logic processing module indicates the window manager to subscribe the current page.
And S40, the window manager subscribes the current page and cancels the subscription application.
On one hand, after subscribing a page, when the window manager monitors that the page is displayed in the foreground, the window manager instructs the service presentation module to display the hover ball through the service logic processing module, that is, when the page is switched to the foreground for display, the hover ball is popped up in the page. On the other hand, after the subscription application is cancelled, when the application is switched to foreground display, the hover ball cannot pop up in the page.
According to the scheme, in a scene where foreign language documents need to be consulted, the electronic equipment can display the floating ball on the current page in response to the operation that the user selects the text and clicks options such as copying or translation, and the floating ball provides an entrance for displaying a translation result for the user. The translation result of the word can be triggered and presented by operating the floating ball. And the floating ball is bound with the page in the full screen mode, the floating ball can be continuously displayed on the page, and the floating ball is hidden when being switched to other pages. And the floating ball is bound with the application in the parallel view mode, can be continuously displayed on any page of the application, and is hidden when being switched to other application pages. The binding relation between the floating ball and the page or the application can be automatically switched according to different scenes, so that the phenomenon that the floating ball frequently disappears or pops up when the page is switched can be avoided, interference on normal use of a user can be reduced, and user experience is improved.
It should also be noted that in the embodiments of the present application, "greater than" may be replaced by "greater than or equal to" and "less than or equal to" may be replaced by "less than", or "greater than or equal to" may be replaced by "greater than" and "less than" may be replaced by "less than or equal to".
The various embodiments described herein may be implemented as stand-alone solutions or combined in accordance with inherent logic and are intended to fall within the scope of the present application. It is to be understood that the methods and operations implemented by the electronic device in the above method embodiments may also be implemented by components (e.g., chips or circuits) that can be used in the electronic device.
Embodiments of the methods provided herein are described above, and embodiments of the apparatus provided herein are described below. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments, and therefore, for brevity, details are not repeated here, since the details that are not described in detail may be referred to the above method embodiments.
The solutions provided by the embodiments of the present application have been described above primarily in terms of method steps. It is understood that, in order to implement the above functions, the electronic device implementing the method includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art would appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Fig. 14 is a schematic block diagram of a control apparatus 800 for a translation control according to an embodiment of the present application. The apparatus 800 may be used to perform the actions performed by the electronic device in the above method embodiments. The apparatus 800 comprises a display unit 810, a detection unit 820 and a processing unit 830.
The display unit 810 is configured to display two pages of a first application in columns on an inner screen of the electronic device when the electronic device is in a screen expansion state, and display a first translation control, where the first translation control and the first application have a first binding relationship;
a detection unit 820 configured to receive a first operation of a user, the first operation being used to trigger switching of the electronic apparatus to a screen-folded state;
a processing unit 830 for, in response to the first operation, instructing the display unit 810 to light the external screen and display a first page of the first application and the first translation control through the external screen to the display unit 810;
the display unit 810 is further configured to display a first page of the first application on the external screen of the electronic device according to the instruction of the processing unit 830, and display a first translation control on the first page, where the first page is a page displayed on the internal screen when the electronic device is switched to the screen folding state.
In a scenario requiring review of foreign documents, in response to a user selecting text and clicking on a copy or translation option, the electronic device displays a translation control (e.g., a hover ball) on the current page, providing the user with access to display the translation results. The translation result of the text can be triggered and displayed by operating the translation control. And the translation control is bound with the page in a full screen mode, can be continuously displayed on the page, and is hidden when being switched to other pages. And the translation control is bound with the application in the parallel view mode, can be continuously displayed on any page of the application and is hidden when being switched to other application pages. The binding relationship between the translation control and the page or the application can be automatically switched according to different scenes. According to the scheme, the translation control can be prevented from frequently disappearing or popping up when the page is switched, so that the interference to the normal use of a user can be reduced, and the user experience is improved.
The apparatus 800 according to the embodiment of the present application may correspond to performing the method described in the embodiment of the present application, and the above and other operations and/or functions of the units in the apparatus 800 are respectively for implementing corresponding flows of the method, and are not described herein again for brevity.
Optionally, in some embodiments, the present application provides a chip coupled with a memory, and configured to read and execute a computer program or instructions stored in the memory to perform the method in the above embodiments.
Optionally, in some embodiments, the present application provides an electronic device comprising a chip for reading and executing a computer program or instructions stored by a memory, such that the methods in the embodiments are performed.
Optionally, in some embodiments, the present application further provides a computer-readable storage medium storing program code, which, when executed on a computer, causes the computer to perform the method in the foregoing embodiments.
Optionally, in some embodiments, the present application further provides a computer program product, which includes computer program code, when the computer program code runs on a computer, the computer is caused to execute the method in the foregoing embodiments.
In an embodiment of the application, an electronic device includes a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer may include hardware such as a Central Processing Unit (CPU), a Memory Management Unit (MMU), and a memory (also referred to as a main memory). The operating system of the operating system layer may be any one or more computer operating systems that implement business processing through processes (processes), such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer may include applications such as a browser, an address book, word processing software, and instant messaging software.
The embodiment of the present application does not particularly limit a specific structure of an execution subject of the method provided by the embodiment of the present application, as long as communication can be performed by the method provided by the embodiment of the present application by running a program in which codes of the method provided by the embodiment of the present application are recorded. For example, an execution subject of the method provided by the embodiment of the present application may be an electronic device, or a functional module capable of calling a program and executing the program in the electronic device.
Various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" can include, but is not limited to: wireless channels and various other media capable of storing, containing, and/or carrying instruction(s) and/or data.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, or portions thereof that contribute to the prior art, may be embodied in the form of a computer software product stored in a storage medium, where the computer software product includes instructions for causing 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 methods described in the embodiments of the present application. The foregoing storage media may include, but are not limited to: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (25)

1. A control method for a translation control is characterized by comprising the following steps:
when the electronic equipment is in a screen expansion state, displaying two pages of a first application in a column-by-column manner on an inner screen of the electronic equipment, and displaying a first translation control, wherein the first translation control and the first application have a first binding relationship;
receiving a first operation of a user, wherein the first operation is used for triggering the electronic equipment to be switched into a screen folding state;
in response to the first operation, displaying a first page of the first application on an external screen of the electronic device, and displaying the first translation control on the first page, wherein the first page is a page displayed on the internal screen when the electronic device is switched to the screen folding state;
the method further comprises the following steps:
hiding the first translation control according to the first binding relation under the condition that other application pages or desktops except the first application are switched to foreground display; or,
and under the condition that the first application is switched to foreground operation, restoring and displaying the first translation control on the page of the first application according to the first binding relation.
2. The method of claim 1, wherein after the displaying the first translation control on the first page, the method further comprises:
receiving a second operation of a user, wherein the second operation is used for selecting the first text in the first page to copy or cut;
and responding to the second operation, releasing the first binding relationship between the first translation control and the first application, and establishing a second binding relationship between the first translation control and the first page.
3. The method of claim 2, wherein the second operation comprises a first sub-operation and a second sub-operation; the first sub-operation is an operation of triggering and displaying an option bar after a user selects the first text, wherein the option bar comprises a copy option; the second sub-operation is the operation of the user on the copy option.
4. The method of claim 2 or 3, wherein after the establishing the second binding relationship between the first translation control and the first page, the method further comprises:
hiding the first translation control according to the second binding relation under the condition that a second page or desktop except the first page is switched to foreground display; or,
and under the condition that the first page is switched to foreground display, restoring to display the first translation control on the first page according to the second binding relation.
5. A method according to claim 2 or 3, characterized in that the method further comprises:
in response to the second operation, writing the first text to a clipboard of the electronic device.
6. The method of claim 5, wherein after writing the first text to a clipboard of the electronic device, the method further comprises:
receiving a third operation of the first translation control by a user;
responding to the third operation, and acquiring a translation result corresponding to the first text stored by the clipboard;
and displaying a second translation control on the first page, and displaying the first text and a translation result corresponding to the first text in the second translation control.
7. The method of claim 6, further comprising:
hiding the first translation control on the first page with a second translation control displayed on the first page.
8. The method of any of claims 2, 3, 6, and 7, wherein the first text is in a different system language than the electronic device.
9. The method of any of claims 2, 3, 6, and 7, wherein the first text comprises text other than a web address, a mailbox, or a password generated by a machine.
10. The method of claim 4, wherein after hiding the first translation control in accordance with the second binding, the method further comprises:
receiving a fourth operation of the user, wherein the fourth operation is used for selecting the text in the second page to copy or cut;
and responding to the fourth operation, displaying the first translation control on the second page, establishing a third binding relationship between the first translation control and the second page, and removing the binding relationship between the first translation control and the first page.
11. The method of claim 10, wherein after the establishing of the third binding relationship between the first translation control and the second page, the method further comprises:
and hiding the first translation control according to the third binding relation under the condition that the first page is switched to foreground display again.
12. The method of claim 1, further comprising:
setting a display mode of the first application to a parallel view mode in response to a user operation;
when the electronic equipment is in a screen expansion state and the first application runs in a foreground, the inner screen of the electronic equipment displays two pages of the first application in a column mode in a parallel view mode; or,
when the electronic equipment is in a screen folding state and the first application runs in a foreground, the outer screen of the electronic equipment displays one page of the first application in a full-screen mode.
13. The method of claim 12, wherein after the inner screen of the electronic device displays two pages of the first application in parallel view mode in columns, the method further comprises:
receiving a fifth operation of a user, wherein the fifth operation is used for selecting a second text of the first application to copy or cut;
in response to the fifth operation, displaying the first translation control on the page of the first application, and establishing the first binding relationship between the first translation control and the first application.
14. The method of claim 13, wherein after displaying the first translation control on the page of the first application, the method further comprises:
receiving a sixth operation of the first translation control by the user;
and responding to the sixth operation, displaying a second translation control on the page of the first application, and displaying the second text and a translation result corresponding to the second text in the second translation control.
15. The method of claim 13, wherein after displaying the first translation control on the page of the first application, the method further comprises:
in response to the operation of a user on a display mode switching control, the inner screen of the electronic equipment displays two pages of the first application in a parallel view mode in a column mode and updates the inner screen to display a third page of the first application in a full screen mode;
and the first translation control is kept to be displayed in the inner screen of the electronic equipment, and the binding relation between the first translation control and the first application is unchanged.
16. The method of claim 15, further comprising:
receiving a seventh operation of the user, wherein the seventh operation is used for selecting the text of the third page to copy or cut;
and responding to the seventh operation, establishing a binding relationship between the first translation control and the third page, and releasing the binding relationship between the first translation control and the first application.
17. The method of claim 1, further comprising:
when the electronic equipment is in a screen folding state, displaying a first page of a first application on an outer screen of the electronic equipment, and displaying a first translation control, wherein the first translation control and the first page have a binding relationship;
receiving an eighth operation of a user, wherein the eighth operation is used for triggering the electronic equipment to be switched to a screen expansion state;
in response to the eighth operation, displaying two pages of the first application in a split mode on an inner screen of the electronic equipment, wherein the two pages of the first application comprise the first page;
the first translation control is kept displayed, the binding relationship between the first translation control and the first application is released, and the binding relationship between the first translation control and the first page is released.
18. The method of any of claims 1-3, 6, 7, 10-15, further comprising:
when the electronic equipment is switched to a screen folding state, the inner screen of the electronic equipment is switched to a screen extinguishing mode, and the outer screen of the electronic equipment is switched to a screen lightening mode; or,
when the electronic equipment is switched to a screen unfolding state, the external screen of the electronic equipment is switched to a screen extinguishing mode, and the internal screen of the electronic equipment is switched to a screen lightening mode.
19. The method of any of claims 1-3, 6, 7, 10-16, wherein the first translation control is a hover ball control.
20. The method of claim 19, wherein the hover ball control is a first state hover ball control or a second state hover ball control; the method further comprises the following steps:
when the electronic equipment displays the first translation control for the first time, the first translation control is presented as a floating ball control in the first state;
if the operation of the user on the levitated ball control in the first state is not received within a preset time length, updating and displaying the levitated ball control in the first state as the levitated ball control in the second state;
and the display size of the hoverball control in the second state is smaller than that of the hoverball control in the first state.
21. The method of claim 6, wherein the second translation control is a floating window control, and the display state of the floating window control comprises any one of a bottom state, a half-screen state or a full-screen state;
after the displaying the second translation control, the method further comprises:
and updating the display state of the floating window control in response to the operation of the user on the floating window control.
22. The method of any of claims 1-3, 6, 7, 10-17, 20, 21, wherein the first application comprises an application other than a consumer application, an entertainment-type application, or a video-type application.
23. An electronic device comprising a processor coupled with a memory, the processor being configured to execute a computer program or instructions stored in the memory to cause the electronic device to implement the method of any of claims 1-22.
24. A chip coupled with a memory, the chip being configured to read and execute a computer program stored in the memory to implement the method of any one of claims 1 to 22.
25. A computer-readable storage medium, characterized in that it stores a computer program which, when run on an electronic device, causes the electronic device to perform the method of any of claims 1 to 22.
CN202210114430.0A 2021-09-02 2022-01-30 Control method of translation control and electronic equipment Active CN114997186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310341835.2A CN116451709A (en) 2021-09-02 2022-01-30 Control method of translation control and electronic equipment

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
CN2021110288299 2021-09-02
CN202111028829 2021-09-02
CN2021113970114 2021-11-23
CN202111397011 2021-11-23
CN2021114589242 2021-12-01
CN202111458924 2021-12-01
CN202111683164 2021-12-31
CN2021116831645 2021-12-31

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310341835.2A Division CN116451709A (en) 2021-09-02 2022-01-30 Control method of translation control and electronic equipment

Publications (2)

Publication Number Publication Date
CN114997186A CN114997186A (en) 2022-09-02
CN114997186B true CN114997186B (en) 2023-03-31

Family

ID=83023995

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210114430.0A Active CN114997186B (en) 2021-09-02 2022-01-30 Control method of translation control and electronic equipment
CN202310341835.2A Pending CN116451709A (en) 2021-09-02 2022-01-30 Control method of translation control and electronic equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202310341835.2A Pending CN116451709A (en) 2021-09-02 2022-01-30 Control method of translation control and electronic equipment

Country Status (1)

Country Link
CN (2) CN114997186B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719587B (en) * 2022-09-30 2024-07-12 荣耀终端有限公司 Screen display method, electronic device and computer readable storage medium
CN116185245B (en) * 2023-04-28 2023-09-26 荣耀终端有限公司 Page display method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310482A (en) * 2020-01-20 2020-06-19 北京无限光场科技有限公司 Real-time translation method, device, terminal and storage medium
CN111401323A (en) * 2020-04-20 2020-07-10 Oppo广东移动通信有限公司 Character translation method, device, storage medium and electronic equipment
CN112764834A (en) * 2021-01-21 2021-05-07 乐聚(深圳)机器人技术有限公司 Control action binding method, device, equipment and storage medium
CN113138915A (en) * 2020-01-20 2021-07-20 腾讯科技(深圳)有限公司 Page testing method, device and medium
CN113157906A (en) * 2021-01-19 2021-07-23 北京达佳互联信息技术有限公司 Recommendation information display method, device, equipment and storage medium
CN113253880A (en) * 2020-02-11 2021-08-13 腾讯科技(深圳)有限公司 Method and device for processing page of interactive scene and storage medium

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609403B (en) * 2009-07-29 2013-04-17 金蝶软件(中国)有限公司 Page layout dynamic switch method and system
US9149591B2 (en) * 2012-11-14 2015-10-06 Shenzhen Mindray Bio-Medical Electronics Co. Ltd. Valve assembly for controlling the flow rate of a fluid
EP2916183B1 (en) * 2014-03-06 2016-11-09 dSPACE digital signal processing and control engineering GmbH Method for generating a control program for a control system
US20160004315A1 (en) * 2014-07-03 2016-01-07 PACSPoint Inc. System and method of touch-free operation of a picture archiving and communication system
CN105677178B (en) * 2015-12-30 2019-02-05 Oppo广东移动通信有限公司 A kind of method and mobile terminal adjusting the affiliated figure layer of control
CN107870711A (en) * 2016-09-27 2018-04-03 阿里巴巴集团控股有限公司 Page navigation method, the method and client that user interface is provided
US10241789B2 (en) * 2016-12-27 2019-03-26 Intel Corporation Method to do control speculation on loads in a high performance strand-based loop accelerator
US20180135325A1 (en) * 2017-01-17 2018-05-17 Aquatron Robotic Technology Ltd. Method and device for remotely controlling robotic pool cleaner
CN107608652B (en) * 2017-08-28 2020-05-22 三星电子(中国)研发中心 Method and device for controlling graphical interface through voice
CN107992346B (en) * 2017-10-19 2021-09-03 用友网络科技股份有限公司 Interface display method and interface display system of application program
CN107818163B (en) * 2017-11-01 2019-03-29 平安科技(深圳)有限公司 Page display method, device, computer equipment and storage medium
CN108073398A (en) * 2017-12-22 2018-05-25 华北计算技术研究所(中国电子科技集团公司第十五研究所) A kind of configurable advice note realizes engine and method
CN108600848A (en) * 2018-03-15 2018-09-28 聚好看科技股份有限公司 Smart television and the method for showing content on a user interface
CN108664475A (en) * 2018-03-28 2018-10-16 广东欧珀移动通信有限公司 Translate display methods, device, mobile terminal and storage medium
CN108595445A (en) * 2018-04-23 2018-09-28 Oppo广东移动通信有限公司 Interpretation method, device and terminal
US10838754B2 (en) * 2018-04-27 2020-11-17 Nutanix, Inc. Virtualized systems having hardware interface services for controlling hardware
CN108628521A (en) * 2018-05-14 2018-10-09 维沃移动通信有限公司 A kind of screen operating method and mobile terminal
CN109359280B (en) * 2018-09-12 2023-12-05 深圳市卡牛科技有限公司 Data display method, device, computer equipment and storage medium
CN109408012B (en) * 2018-09-21 2022-06-21 Oppo(重庆)智能科技有限公司 Display control method and related device
CN109669742A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Methods of exhibiting, device, terminal device and the storage medium of website
CN109543193B (en) * 2018-11-12 2023-08-29 维沃移动通信有限公司 Translation method, translation device and terminal equipment
CN109561149B (en) * 2018-11-28 2019-10-15 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN109782920A (en) * 2019-01-30 2019-05-21 上海趣虫科技有限公司 One kind is for extending realistic individual machine exchange method and processing terminal
CN110032318A (en) * 2019-04-15 2019-07-19 珠海格力电器股份有限公司 Display method and system based on folding screen mobile terminal and folding screen mobile terminal
CN110058778A (en) * 2019-04-17 2019-07-26 网易(杭州)网络有限公司 Input panel switching method and device
CN110166586B (en) * 2019-04-18 2021-01-08 维沃移动通信(深圳)有限公司 Content display method and terminal equipment
CN110286816A (en) * 2019-06-12 2019-09-27 努比亚技术有限公司 Mobile terminal page switching method, mobile terminal and computer readable storage medium
CN110806831A (en) * 2019-09-30 2020-02-18 华为技术有限公司 Touch screen response method and electronic equipment
CN111680521A (en) * 2020-05-19 2020-09-18 北京搜狗科技发展有限公司 Translation processing method and device and translation processing device
CN111967275B (en) * 2020-08-07 2023-06-30 广州新视展投资咨询有限公司 Page content translation method and device
CN113010162B (en) * 2021-03-02 2024-03-29 中国工商银行股份有限公司 Page construction method, device and equipment
CN112905093B (en) * 2021-03-10 2022-11-15 Oppo广东移动通信有限公司 Content display method, content display device, storage medium and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310482A (en) * 2020-01-20 2020-06-19 北京无限光场科技有限公司 Real-time translation method, device, terminal and storage medium
CN113138915A (en) * 2020-01-20 2021-07-20 腾讯科技(深圳)有限公司 Page testing method, device and medium
CN113253880A (en) * 2020-02-11 2021-08-13 腾讯科技(深圳)有限公司 Method and device for processing page of interactive scene and storage medium
CN111401323A (en) * 2020-04-20 2020-07-10 Oppo广东移动通信有限公司 Character translation method, device, storage medium and electronic equipment
CN113157906A (en) * 2021-01-19 2021-07-23 北京达佳互联信息技术有限公司 Recommendation information display method, device, equipment and storage medium
CN112764834A (en) * 2021-01-21 2021-05-07 乐聚(深圳)机器人技术有限公司 Control action binding method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116451709A (en) 2023-07-18
CN114997186A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
EP3413547B1 (en) Electronic device comprising multiple displays and method for operating same
CN108710513B (en) Application program starting method and device, storage medium and terminal
EP3037913A1 (en) Method for performing power-saving mode in electronic device and electronic device therefor
US11797145B2 (en) Split-screen display method, electronic device, and computer-readable storage medium
CN114997186B (en) Control method of translation control and electronic equipment
US20220413695A1 (en) Split-screen display method and electronic device
CN111966252A (en) Application window display method and electronic equipment
WO2021012836A1 (en) Interface display method and apparatus, terminal, and storage medium
KR20220110314A (en) Card display method, electronic device and computer readable storage medium
EP3985955A1 (en) Electronic device comprising multiple displays and method for operating same
WO2021254293A1 (en) Notification display method and terminal
CN113805743A (en) Method for switching display window and electronic equipment
CN108958828B (en) Application program preloading method and device, storage medium and terminal
CN105988860A (en) Method for executing application program and mobile device
CN108647056B (en) Application program preloading method and device, storage medium and terminal
WO2023030030A1 (en) Translation method and electronic device
CN111602381A (en) Icon switching method, method for displaying GUI (graphical user interface) and electronic equipment
CN109388309B (en) Menu display method, device, terminal and storage medium
WO2019019901A1 (en) Method and device for responding to black screen gesture, storage medium, and mobile terminal
CN108287647B (en) Application running method and device
CN113805744A (en) Window display method and electronic equipment
CN114980286A (en) Electronic equipment screen-off display method
CN113741708B (en) Input method and electronic equipment
CN113497835A (en) Multi-screen interaction method, electronic equipment and computer readable storage medium
CN115033153B (en) Application program recommendation method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant