CN110147555B - Content translation method and terminal equipment - Google Patents

Content translation method and terminal equipment Download PDF

Info

Publication number
CN110147555B
CN110147555B CN201910310117.2A CN201910310117A CN110147555B CN 110147555 B CN110147555 B CN 110147555B CN 201910310117 A CN201910310117 A CN 201910310117A CN 110147555 B CN110147555 B CN 110147555B
Authority
CN
China
Prior art keywords
content
sub
page
selected area
terminal device
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
CN201910310117.2A
Other languages
Chinese (zh)
Other versions
CN110147555A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910310117.2A priority Critical patent/CN110147555B/en
Publication of CN110147555A publication Critical patent/CN110147555A/en
Application granted granted Critical
Publication of CN110147555B publication Critical patent/CN110147555B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/416Extracting the logical structure, e.g. chapters, sections or page numbers; Identifying elements of the document, e.g. authors

Abstract

The embodiment of the invention discloses a method for translating content and terminal equipment, which are applied to the technical field of communication and can solve the problem of low efficiency of the method for translating content in the prior art. The method comprises the following steps: identifying first content, dividing the first content into n sub-contents according to punctuation marks in the first content, wherein the first content is determined from a target page; determining at least one sub-content from n sub-contents, n being a positive integer; at least one sub-content is translated. The method is applied to a scene of translating content.

Description

Content translation method and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method for translating content and terminal equipment.
Background
With the popularization of terminal technology, terminal devices are increasingly widely used.
The terminal device may recognize the text in the image and translate. Under the condition that a user needs to translate two non-adjacent sections of contents (such as a first section of contents and a second section of contents) in the image, the user needs to trigger the terminal equipment to select the first section of contents by adopting a selection frame, then trigger the terminal equipment to identify and translate characters in the contents selected by the selection frame, and the user needs to trigger the terminal equipment to select the second section of contents by adopting the selection frame, then trigger the terminal equipment to identify and translate the characters in the contents selected by the selection frame, so that under the condition that the user needs to translate the non-adjacent sections of contents in the image, the user needs to select the sections of contents respectively, and trigger the terminal equipment to translate the characters in each section of contents selected, thereby leading to lower efficiency of translating the contents.
Disclosure of Invention
The embodiment of the invention provides a method for translating content and terminal equipment, which are used for solving the problem of low efficiency of a method for translating graph content in the prior art.
In order to solve the technical problems, the embodiment of the invention is realized as follows:
in a first aspect, a method for translating content is provided, and the method is applied to a terminal device, and includes: identifying first content, dividing the first content into n sub-contents according to punctuation marks in the first content, wherein the first content is determined from a target page; determining at least one sub-content from n sub-contents, n being a positive integer; at least one sub-content is translated.
In a second aspect, there is provided a terminal device comprising: the system comprises an identification module, a determination module and a translation module; the identification module is used for identifying the first content and dividing the first content into n sub-contents according to punctuation marks in the first content identified by the identification module; the first content is determined from the target page; the determining module is used for determining at least one sub-content from n sub-contents, wherein n is a positive integer; and the translation module is used for translating the at least one sub-content determined by the determination module.
In a third aspect, there is provided a terminal device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method of translating content as described in the first aspect.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of translating content as described in the first aspect.
In the embodiment of the invention, the terminal equipment can identify the first content, divide the first content into n sub-contents according to the punctuation marks in the first content, the first content is determined from the target page, at least one sub-content is determined from the n sub-contents, n is a positive integer, and the at least one sub-content is translated. According to the scheme, the terminal equipment can identify the first content and divide the first content into n sub-contents, then determine at least one sub-content from the n sub-contents, and translate the determined at least one sub-content, so that when non-adjacent sub-contents in the n sub-contents need to be translated, the non-adjacent sub-contents can be determined from the n sub-contents, and then the sub-contents can be translated at one time, and the efficiency of translating the contents can be improved.
Drawings
Fig. 1 is a schematic diagram of a possible architecture of an android operating system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a method for translating content according to an embodiment of the present invention;
fig. 3 is a schematic diagram one of an interface displayed by a terminal device according to an embodiment of the present invention;
fig. 4 is a schematic diagram two of an interface displayed by a terminal device according to an embodiment of the present invention;
fig. 5 is a schematic diagram III of an interface displayed by a terminal device according to an embodiment of the present invention;
FIG. 6 is a second schematic diagram of a method for translating content according to an embodiment of the present invention;
fig. 7 is a schematic diagram fourth of an interface displayed by a terminal device according to an embodiment of the present invention;
fig. 8 is a schematic diagram fifth of an interface displayed by a terminal device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 10 is a schematic hardware diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first and second and the like in the description and in the claims, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order of the objects. For example, the first input and the second input, etc., are used to distinguish between different inputs, and are not used to describe a particular order of inputs.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The terminal device in the embodiment of the invention can be a terminal device with an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, and the embodiment of the present invention is not limited specifically.
The software environment to which the method for translating content provided by the embodiment of the invention is applied is described below by taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, respectively: an application program layer, an application program framework layer, a system runtime layer and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third party application programs) in the android operating system.
The application framework layer is a framework of applications, and developers can develop some applications based on the application framework layer while adhering to the development principle of the framework of the applications.
The system runtime layer includes libraries (also referred to as system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of the android operating system, and belongs to the bottommost layer of the software hierarchy of the android operating system. The kernel layer provides core system services and a driver related to hardware for the android operating system based on a Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the method for translating content provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the method for translating content may be operated based on the android operating system shown in fig. 1. Namely, the processor or the terminal device can realize the method for translating the content provided by the embodiment of the invention by running the software program in the android operating system.
The embodiment of the invention provides a method and terminal equipment for translating content, wherein the terminal equipment can identify first content, divide the first content into n sub-content according to punctuation marks in the first content, the first content is determined from a target page, at least one sub-content is determined from the n sub-content, n is a positive integer, and the at least one sub-content is translated. According to the scheme, the terminal equipment can identify the first content and divide the first content into n sub-contents, then determine at least one sub-content from the n sub-contents, and translate the determined at least one sub-content, so that when non-adjacent sub-contents in the n sub-contents need to be translated, the non-adjacent sub-contents can be determined from the n sub-contents, and then the sub-contents can be translated at one time, and the efficiency of translating the contents can be improved.
The terminal device in the embodiment of the invention can be a mobile terminal device or a non-mobile terminal device. The mobile terminal device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc.; the non-mobile terminal device may be a personal computer (personal computer, PC), a Television (TV), a teller machine, a self-service machine, or the like; the embodiment of the present invention is not particularly limited.
The execution main body of the method for translating content provided in the embodiment of the present invention may be the above-mentioned terminal device (including mobile terminal device and non-mobile terminal device), or may be a functional module and/or a functional entity of the terminal device capable of implementing the method for translating content, which may be specifically determined according to actual use requirements. The method for translating content provided by the embodiment of the invention is exemplified by a terminal device.
As shown in fig. 2, an embodiment of the present invention provides a method of translating content, which includes S11, S12, and S13.
S11, the terminal equipment identifies the first content and divides the first content into n sub-contents according to punctuation marks in the first content.
Wherein the first content is content determined from the target page.
In the embodiment of the present invention, n is a positive integer.
Optionally, in the embodiment of the present invention, the content in the target page may be in a picture form, or may be in a text form or a content in a picture form.
Alternatively, in the case that the content in the target page is in the form of a picture, the content in the picture may be identified first, and then the first content is selected from the contents in the picture.
Alternatively, the first content may be text content in the target page, or the first content may be part of text content in the target page.
Optionally, in the embodiment of the present invention, the target page may include one page, or may include multiple pages (i.e., two or more pages).
In the embodiment of the present invention, taking the above target page as an example (denoted as a first page), as shown in fig. 3, the terminal device displays a first page 01, where the selected content included in the first selected area 011 in the first page 01 is a first content 012 (i.e., a content in the first selected area 011).
Further, in connection with fig. 3, as shown in fig. 4, the terminal device may divide the first content 012 into 4 sub-areas (respectively identified as sub-area a, sub-area b, sub-area c, and sub-area d in fig. 4) shown in fig. 4, each of which includes one sub-content of the first content.
S12, the terminal equipment determines at least one sub-content from the n sub-contents.
Alternatively, S12 may be replaced with S12a and S12b described below.
S12a, the terminal equipment receives a third input of the user.
Wherein the third input is a selection input for at least one sub-content.
Alternatively, the selection input may be a click input to at least one sub-content, or a long press input.
S12b, the terminal equipment responds to the third input and selects at least one sub-content from n sub-contents.
Optionally, in conjunction with fig. 4, after the user clicks on sub-region a, sub-region c, and sub-region d in fig. 4, as shown in fig. 5, three sub-regions, sub-region a, sub-region c, and sub-region d, are selected (where the selected region is identified by a solid line, and the unselected region is identified by a dashed line).
Alternatively, as shown in fig. 6 in conjunction with fig. 2, S12 may be replaced by S12c and S12d described below.
S12c, the terminal equipment acquires the first information of each sub-content in the n sub-contents.
S12d, the terminal equipment determines at least one sub-content from the n sub-contents according to the first information.
Wherein one sub-content includes at least one word, and the first information of the one sub-content is a user history query number of times of each word in the at least one word.
Optionally, the user history query times of each word in each sub-content can be obtained through a big data method, the words with the user history query times larger than the preset times are determined to be difficult words, and sub-content containing the difficult words is determined from n sub-contents.
Optionally, the terminal device may further store the determined refractory word, so as to facilitate the user to review the refractory word next time.
For example, a refractory word may be determined, translated, and the interface of the refractory word and the translated word may be stored in a new vocabulary in the terminal device (may be an application in the terminal device or a functional item in an application in the terminal device).
S13, the terminal equipment translates the at least one sub-content.
Alternatively, if the at least one sub-content is determined by the above S12a and S12b, the terminal device interprets the sub-content selected by the user, and if the at least one sub-content is determined by the above S12c and S12d, the terminal device interprets the sub-content including the hard word.
In the embodiment of the invention, the method for determining the translation content, such as the steps S12a and S12b, and the method for determining the translation content, such as the steps S12c and S12d, are included, so that the terminal equipment can realize two technical schemes of translating the sub-content selected by the user and translating the sub-content including the difficult word.
The embodiment of the invention provides a method for translating content, wherein a terminal device can identify first content, divide the first content into n sub-content according to punctuation marks in the first content, the first content is determined from a target page, at least one sub-content is determined from the n sub-content, n is a positive integer, and the at least one sub-content is translated. According to the scheme, the terminal equipment can identify the first content and divide the first content into n sub-contents, then determine at least one sub-content from the n sub-contents, and translate the determined at least one sub-content, so that when non-adjacent sub-contents in the n sub-contents need to be translated, the non-adjacent sub-contents can be determined from the n sub-contents, and then the sub-contents can be translated at one time, and the efficiency of translating the contents can be improved.
Optionally, the target page may be a first page, and before the terminal device executes the step S11, the method for translating content provided in the embodiment of the present invention further includes the following step S14.
S14, the terminal equipment identifies the content in the first page and determines the text content in the first page as first content.
Alternatively, the terminal device may identify the content in the first page, and use text content (in the embodiment of the present invention, the second content) in the selected first page in the first selection area.
Optionally, the target page may be a first page, where the first page includes a first selected area, and the first selected area includes a selected second content, and before the terminal device executes the step S11, the method for translating content provided in the embodiment of the present invention further includes the following steps S15 and S16.
S15, the terminal equipment receives a first input of a user to the first selected area.
Alternatively, the first input may be an input for moving the position of the first selected area, an input for adjusting the size of the area of the first suspended area, or an input for moving the position of the first selected area and adjusting the size of the area of the first suspended area.
S16, the terminal equipment responds to the first input and updates the first selected area to the second selected area.
Wherein the selected content included in the second selected region is the first content.
Optionally, in the embodiment of the present invention, the terminal device may include at least two screens, and the target page may include a first page and a second page, where the first page includes a third selected area, and the third selected area includes a third selected content.
Alternatively, the first input may be a drag input or a slide input to the first selected area, or the like.
Alternatively, the first input may be used to trigger the terminal device to move the position of the first selected area, or may be used to trigger the terminal device to adjust the size of the area of the first selected area, or may be used to trigger the terminal device to move the position of the first selected area, and adjust the area of the first suspended area.
Before the terminal device executes the step S11, the method for translating content provided in the embodiment of the present invention further includes the following steps S17 and S18.
And S17, under the condition that the first page is displayed on the first screen, the terminal equipment receives a second input of the user on the second screen.
Wherein the second screen is any one of the at least two screens other than the first screen.
Alternatively, the second input may be an input that is slid by a finger on the second screen, and the second input may trigger the terminal device to switch the displayed page.
And S18, the terminal equipment responds to the second input and updates the first page on the first screen to the second page.
The second page comprises a fourth selected area, and the fourth selected area comprises selected fourth content.
The third content and the fourth content are the first content.
Alternatively, the fourth selected area may be a default selected area displayed on the second page after updating the first page to the second page.
Optionally, the fourth selected area may be an area obtained after the default selected area displayed on the second page is adjusted. For example, the location of the default selected region may be updated or the area size of the default selected region may be adjusted.
For example, assuming that the terminal device is a two-sided screen terminal device including a first screen and a second screen, fig. 7 is a schematic diagram of the terminal device displaying a first page 01 in the first screen 10, where a third selected area 013 is included in the first page 01, and a third selected content 014 is included in the third selected area, that is, the content in the third selected area 013 is the third content 014.
Referring to fig. 7, a user uses a finger to slide on the second screen to input, and triggers the terminal device to switch the first page 01 displayed on the first screen to the second page 02, and a schematic diagram after switching the pages is shown in fig. 8. A fourth selected area 015 is included in fig. 8, in which fourth selected area the selected fourth content 016 is included, i.e. the content in the fourth selected area 015 is the fourth content 016.
Optionally, in the embodiment of the present invention, the terminal device may translate the third content and the fourth content at a time.
In the embodiment of the invention, the user can be used for inputting on the second screen, triggering the first screen to switch the pages and selecting the contents in different pages, so that the mode of selecting the contents is more flexible.
It should be noted that, in the embodiments of the present invention, the method for translating content shown in each of the foregoing drawings is described by way of example with reference to one of the drawings in the embodiments of the present invention. In specific implementation, the method for translating content shown in each drawing may be further implemented in combination with any drawing that may be combined and illustrated in the foregoing embodiments, which is not repeated herein.
As shown in fig. 9, an embodiment of the present invention provides a terminal device 130, where the terminal device 130 includes an identification module 131, a determination module 132, and a translation module 133.
The identifying module 131 is configured to identify a first content, where the first content is determined from a target page.
The determining module 132 is configured to divide the first content into n sub-contents according to the first content identified by the identifying module 131 and according to punctuation marks in the first content, where n is a positive integer.
A translation module 133 for translating the at least one sub-content determined by the determination module 132.
Optionally, the determining module 132 is specifically configured to obtain first information of each of the n sub-contents; and determining at least one sub-content from the n sub-contents according to the first information; wherein one sub-content includes at least one word, and the first information of the one sub-content is a user history query number of times of each word in the at least one word.
Optionally, the target page is a first page, and the identifying module 131 is further configured to identify content in the first page and determine text content in the first page as the first content before identifying the first content.
Optionally, the target page is a first page, the first page includes a first selected area, and the first selected area includes selected second content; the determining module 132 is further configured to receive a first input of a first selected area of the selected area by the user before the identifying module 131 identifies the first content; and in response to the first input, updating the first selected area of the selected area into a second selected area, wherein selected content included in the second selected area is the first content.
Optionally, the terminal device includes at least two screens, the target page includes a first page and a second page, the first page includes a third selected area, and the third selected area includes selected third content; the determining module 132 is further configured to receive, before the identifying module 131 identifies the first content, a second input of the user on a second screen, where the second screen is any one of the at least two screens other than the first screen, in a case where the first screen displays the first page; and in response to the second input, updating the first page on the first screen to a second page; the second page comprises a fourth selected area, and the fourth selected area comprises selected fourth content; wherein the third content and the fourth content are the first content.
Optionally, the determining module 132 is specifically configured to receive a third input of the user, where the third input is a selection input of at least one sub-content; and selecting at least one sub-content from the n sub-contents in response to the third input.
The terminal device provided by the embodiment of the present invention can implement each process shown in the foregoing method embodiment, and in order to avoid repetition, details are not repeated here.
The embodiment of the invention provides a terminal device, which can identify first content, divide the first content into n sub-content according to punctuation marks in the first content, wherein the first content is determined from a target page, at least one sub-content is determined from the n sub-content, n is a positive integer, and the at least one sub-content is translated. According to the scheme, the terminal equipment can identify the first content and divide the first content into n sub-contents, then determine at least one sub-content from the n sub-contents, and translate the determined at least one sub-content, so that when non-adjacent sub-contents in the n sub-contents need to be translated, the non-adjacent sub-contents can be determined from the n sub-contents, and then the sub-contents can be translated at one time, and the efficiency of translating the contents can be improved.
Fig. 10 is a hardware schematic of a terminal device implementing various embodiments of the present invention, where the terminal device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 10 does not constitute a limitation of the terminal device, and the terminal device may include more or less components than illustrated, or may combine certain components, or may have a different arrangement of components. In the embodiment of the invention, the terminal equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal equipment, a wearable device, a pedometer and the like.
The processor 110 is configured to identify a first content, divide the first content into n sub-contents according to punctuation marks in the first content, determine the first content from the target page, determine at least one sub-content from the n sub-contents, n is a positive integer, and translate the at least one sub-content.
The embodiment of the invention provides a terminal device, which can identify first content, divide the first content into n sub-content according to punctuation marks in the first content, wherein the first content is determined from a target page, at least one sub-content is determined from the n sub-content, n is a positive integer, and the at least one sub-content is translated. According to the scheme, the terminal equipment can identify the first content and divide the first content into n sub-contents, then determine at least one sub-content from the n sub-contents, and translate the determined at least one sub-content, so that when non-adjacent sub-contents in the n sub-contents need to be translated, the non-adjacent sub-contents can be determined from the n sub-contents, and then the sub-contents can be translated at one time, and the efficiency of translating the contents can be improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be configured to receive and send information or signals during a call, specifically, receive downlink data from a base station, and then process the received downlink data with the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user through the network module 102, such as helping the user to send and receive e-mail, browse web pages, access streaming media, etc.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal device 100. The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used for receiving an audio or video signal. The input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. Microphone 1042 may receive sound and be capable of processing such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode.
The terminal device 100 further comprises at least one sensor 105, such as a light sensor, a motion sensor and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the terminal device 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when the accelerometer sensor is stationary, and can be used for recognizing the gesture (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking) and the like of the terminal equipment; the sensor 105 may further include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 10, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the terminal device, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the terminal device, which is not limited herein.
The interface unit 108 is an interface to which an external device is connected to the terminal apparatus 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 100 or may be used to transmit data between the terminal apparatus 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the terminal device, connects respective parts of the entire terminal device using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal device. Processor 110 may include one or more processing units; alternatively, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal device 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and optionally, the power source 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. In addition, the terminal device 100 includes some functional modules, which are not shown, and will not be described herein.
The embodiment of the invention also provides a terminal device, which can include a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program can realize each process executed by the terminal device in the method embodiment and can achieve the same technical effect when being executed by the processor, and the repetition is avoided, and the description is omitted here.
The embodiment of the invention provides a computer readable storage medium, which is characterized in that the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program realizes each process executed by a terminal device in the embodiment of the method, and can achieve the same technical effect, so that repetition is avoided, and no redundant description is provided herein. The computer readable storage medium may be a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, an optical disk, or the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (9)

1. A method for translating content, applied to a terminal device, the method comprising:
identifying first content, and dividing the first content into n sub-contents according to punctuation marks in the first content, wherein the first content is determined from a target page;
determining at least one sub-content from the n sub-contents, wherein n is a positive integer;
translating the at least one sub-content;
the determining at least one sub-content from the n sub-contents includes:
acquiring first information of each sub-content in the n sub-contents;
determining at least one sub-content from the n sub-contents according to the first information;
one piece of sub-content includes at least one word, and the first information of the one piece of sub-content is a user history query number of each word in the at least one word.
2. The method of claim 1, wherein the target page is a first page, and wherein prior to the identifying the first content, the method further comprises:
content in a first page is identified and text content in the first page is determined to be the first content.
3. The method of claim 1, wherein the target page is a first page, the first page includes a first selected area, the first selected area includes a selected second content, and the method further comprises, prior to identifying the first content:
receiving a first input of a user to the first selected area;
and in response to the first input, updating the first selected area to a second selected area, wherein selected content included in the second selected area is the first content, and the second content is different from the first content.
4. The method of claim 1, wherein the terminal device comprises at least two screens, the target page comprises a first page and a second page, the first page comprises a third selected area, and the third selected area comprises selected third content;
before the identifying the first content, the method further comprises:
receiving a second input of a user on a second screen under the condition that a first screen displays a first page, wherein the second screen is any one screen except the first screen in the at least two screens;
updating the first page on the first screen to the second page in response to the second input;
the second page comprises a fourth selected area, and the fourth selected area comprises selected fourth content;
wherein the third content and the fourth content are the first content.
5. A terminal device, comprising: the system comprises an identification module, a determination module and a translation module;
the identification module is used for identifying first content and dividing the first content into n sub-contents according to punctuation marks in the first content, wherein the first content is determined from a target page;
the determining module is used for determining at least one piece of sub-content from the n pieces of sub-content, wherein n is a positive integer;
the translation module is used for translating the at least one sub-content determined by the determination module;
the determining module is specifically configured to obtain first information of each sub-content in the n sub-contents; and determining at least one sub-content from the n sub-contents according to the first information; wherein one piece of sub-content comprises at least one word, and the first information of the one piece of sub-content is the user history query times of each word in the at least one word.
6. The terminal device of claim 5, wherein the target page is a first page, and wherein the identifying module is further configured to identify content in the first page and determine text content in the first page as the first content prior to identifying the first content.
7. The terminal device according to claim 5, wherein the target page is a first page, the first page includes a first selected area, and the first selected area includes selected second content;
the determining module is further configured to receive a first input from a user to the first selected area before the identifying module identifies the first content; and in response to the first input, updating the first selected area to a second selected area, wherein selected content included in the second selected area is the first content.
8. The terminal device of claim 5, wherein the terminal device comprises at least two screens, the target page comprises a first page and a second page, the first page comprises a third selected area, and the third selected area comprises selected third content;
the determining module is further configured to receive, before the identifying module identifies the first content, a second input of a user on a second screen, where the second screen is any one of the at least two screens other than the first screen, in a case where the first screen displays the first page; and in response to the second input, updating the first page on the first screen to the second page; the second page comprises a fourth selected area, and the fourth selected area comprises selected fourth content;
wherein the third content and the fourth content are the first content.
9. A terminal device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method of translating content as claimed in any one of claims 1 to 4.
CN201910310117.2A 2019-04-17 2019-04-17 Content translation method and terminal equipment Active CN110147555B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910310117.2A CN110147555B (en) 2019-04-17 2019-04-17 Content translation method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910310117.2A CN110147555B (en) 2019-04-17 2019-04-17 Content translation method and terminal equipment

Publications (2)

Publication Number Publication Date
CN110147555A CN110147555A (en) 2019-08-20
CN110147555B true CN110147555B (en) 2023-08-11

Family

ID=67589562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910310117.2A Active CN110147555B (en) 2019-04-17 2019-04-17 Content translation method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110147555B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115983291A (en) * 2021-10-15 2023-04-18 华为技术有限公司 Web page content translation method, computer device, storage medium and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105243058A (en) * 2015-09-30 2016-01-13 北京奇虎科技有限公司 Webpage content translation method and electronic apparatus
CN105280206A (en) * 2014-06-23 2016-01-27 广东小天才科技有限公司 Audio playing method and device
CN106547743A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 A kind of method translated and its system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102457894B1 (en) * 2017-08-22 2022-10-25 삼성전자주식회사 Method and device for translating text displayed on display

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105280206A (en) * 2014-06-23 2016-01-27 广东小天才科技有限公司 Audio playing method and device
CN106547743A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 A kind of method translated and its system
CN105243058A (en) * 2015-09-30 2016-01-13 北京奇虎科技有限公司 Webpage content translation method and electronic apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于内容协商实时在线翻译方案的实现及分析;王仆等;《计算机技术与发展》;20080310(第03期);全文 *

Also Published As

Publication number Publication date
CN110147555A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
CN110062105B (en) Interface display method and terminal equipment
CN110851051A (en) Object sharing method and electronic equipment
CN108763541B (en) Page display method and terminal
CN109917995B (en) Object processing method and terminal equipment
CN109614061B (en) Display method and terminal
CN109032486B (en) Display control method and terminal equipment
CN110764666B (en) Display control method and electronic equipment
CN109828705B (en) Icon display method and terminal equipment
CN109085968B (en) Screen capturing method and terminal equipment
CN111273993B (en) Icon arrangement method and electronic equipment
CN109408072B (en) Application program deleting method and terminal equipment
CN110928461A (en) Icon moving method and electronic equipment
WO2020192324A1 (en) Interface displaying method and terminal device
WO2020192322A1 (en) Display method and terminal device
CN109358931B (en) Interface display method and terminal
CN108804151B (en) Method and terminal for restarting application program
CN108874906B (en) Information recommendation method and terminal
CN111090489B (en) Information control method and electronic equipment
CN111090529B (en) Information sharing method and electronic equipment
CN111190517B (en) Split screen display method and electronic equipment
CN110012151B (en) Information display method and terminal equipment
CN109992192B (en) Interface display method and terminal equipment
CN111130995B (en) Image control method, electronic device, and storage medium
CN110851098B (en) Video window display method and electronic equipment
CN109639880B (en) Weather information display method and terminal equipment

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