CN105354187A - Method for translating webpage contents and electronic device - Google Patents

Method for translating webpage contents and electronic device Download PDF

Info

Publication number
CN105354187A
CN105354187A CN201510639936.3A CN201510639936A CN105354187A CN 105354187 A CN105354187 A CN 105354187A CN 201510639936 A CN201510639936 A CN 201510639936A CN 105354187 A CN105354187 A CN 105354187A
Authority
CN
China
Prior art keywords
webpage
content
word
window
translation
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.)
Pending
Application number
CN201510639936.3A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510639936.3A priority Critical patent/CN105354187A/en
Publication of CN105354187A publication Critical patent/CN105354187A/en
Pending legal-status Critical Current

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a method for translating webpage contents. The method comprises: when a user browses a first webpage, determining contents on the first webpage are preset contents; if yes, detecting whether the user carries out a dragging and selecting operation on the first webpage; if yes, determining words selected by the user on the first webpage based on the dragging and selecting operation; outputting a first window near the selected words; detecting whether a triggering operation for triggering a preset button in the first window exists; and if yes, outputting a translated text of the selected words. The method realizes the technical effect that when the user browses webpages related to learning and work, a browser can automatically start word dragging and translating functions, so that when the user encounters unknown foreign words, a translated text of the foreign words can be conveniently and rapidly obtained. Meanwhile, the present invention also discloses an electronic device.

Description

A kind of method that web page contents is translated and electronic equipment
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of method that web page contents is translated and electronic equipment.
Background technology
Along with the development of science and technology, computing machine is extensively popularized, and brings many facilities to the work of people and life.People can use computer disposal document, surf the web, play games, listen to the music, control commercial production etc.
People browse in webpage process at use computing machine, often can run into unacquainted foreign language word (such as: English word, phrase, sentence etc.).People's solution is in the past: choose this part foreign language word, copy this part foreign language word, open searched page or local dictionary, the foreign language word copied pasted in searched page or local dictionary, click search button or inquire button, thus obtain Chinese translation corresponding to this foreign language word.But in this process, user needs to carry out choosing, copies, opens multiple operation steps such as searched page or local dictionary, stickup, click search or inquire button, could obtain translation, complex operation, very inconvenient.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of overcoming the problems referred to above or the method translated web page contents solved the problem at least in part and electronic equipment.
One aspect of the present invention, provides a kind of method translated web page contents, comprising:
When user browses the first webpage, judge whether the content on described first webpage is preset content;
If the content on described first webpage is described preset content, then detect stroke selection operation whether having user to carry out on the first webpage;
If described stroke selection operation detected, then based on described stroke of selection operation, described first webpage is determined the word that described user chooses;
Near described word, export first window, in described first window, show a pre-set button;
Detect the trigger action whether had for triggering described pre-set button;
If described trigger action detected, then export the translation that described word is corresponding.
Preferably, whether the described content judged on described first webpage is preset content, comprising:
Article title in described first page and/or article text are analyzed, determines the type of the content in described first page;
Judge whether the type of the content in described first page is designated as preset kind;
If so, then determine that the content on described first webpage is described preset content;
If not, then determine that the content on described first webpage is not described preset content.
Preferably, whether the described content judged on described first webpage is preset content, comprising:
Obtain the uniform resource position mark URL of described first page;
Judge whether the URL of described first page is default URL;
If so, then determine that the content on described first webpage is described preset content;
If not, then determine that the content on described first webpage is not described preset content.
Preferably, describedly near described word, export first window, comprising:
Described first window is exported in the upper left corner of described word or the upper right corner.
Preferably, in described first window, show multiple button, described pre-set button belongs to described multiple button, and shows in described pre-set button for representing the mark translated described word.
Preferably, whether described detection has the trigger action for triggering described pre-set button, comprising:
Detect and whether have the clicking operation clicking described pre-set button; Or
Detect and whether have the hover operation of mouse pointer in described pre-set button.
Preferably, described trigger action detected if described, then export the translation that described word is corresponding, comprising:
If described trigger action detected, then using described word as key word, obtain translation corresponding to described word by search engine, and export translation corresponding to described word; Or
If described trigger action detected, then from local dictionary, obtain translation corresponding to described word, and export translation corresponding to described word.
Preferably, the translation that the described word of described output is corresponding, comprising:
Export translation corresponding to described word by Second Window, described Second Window is different from described first window; Or
Export translation corresponding to described word by the second webpage, described second webpage is different from described first webpage.
Another aspect of the present invention, provides a kind of electronic equipment, comprising:
Judge module, for when user browses the first webpage, judges whether the content on described first webpage is preset content;
First detection module, if the content on described first webpage is described preset content, then detects stroke selection operation whether having user to carry out on the first webpage;
Determination module, if for described stroke selection operation being detected, then based on described stroke of selection operation, described first webpage is determined the word that described user chooses;
First output module, for exporting first window near described word, shows a pre-set button in described first window;
Second detection module, for detecting the trigger action whether had for triggering described pre-set button;
Second output module, if for described trigger action being detected, then export the translation that described word is corresponding.
Preferably, described judge module, specifically for:
Article title in described first page and/or article text are analyzed, determines the type of the content in described first page; Judge whether the type of the content in described first page is designated as preset kind; If so, then determine that the content on described first webpage is described preset content; If not, then determine that the content on described first webpage is not described preset content.
Preferably, described judge module, specifically for:
Obtain the uniform resource position mark URL of described first page; Judge whether the URL of described first page is default URL; If so, then determine that the content on described first webpage is described preset content; If not, then determine that the content on described first webpage is not described preset content.
Preferably, described first output module, specifically for:
Described first window is exported in the upper left corner of described word or the upper right corner.
Preferably, in described first window, show multiple button, described pre-set button belongs to described multiple button, and shows in described pre-set button for representing the mark translated described word.
Preferably, described second detection module, specifically for:
Detect and whether have the clicking operation clicking described pre-set button; Or detect whether there be the hover operation of mouse pointer in described pre-set button.
Preferably, described second output module, specifically for:
If described trigger action detected, then using described word as key word, obtain translation corresponding to described word by search engine, and export translation corresponding to described word; Or if described trigger action detected, then from local dictionary, obtain translation corresponding to described word, and export translation corresponding to described word.
Preferably, described second output module, specifically for:
Export translation corresponding to described word by Second Window, described Second Window is different from described first window; Or
Export translation corresponding to described word by the second webpage, described second webpage is different from described first webpage.
The technical scheme provided in the embodiment of the present application, at least has following technique effect or advantage:
In the embodiment of the present application, when user browses the first webpage, judge whether the content on the first webpage is preset content, if the content on the first webpage is preset content, then detect stroke selection operation whether having user to carry out on the first webpage, if detect and draw selection operation, then on the first webpage, determine based on drawing selection operation the word that user chooses, first window is exported near described word, a pre-set button is shown in first window, detect the trigger action whether had for triggering pre-set button, if trigger action detected, then export the translation that described word is corresponding.Visible, user is when browsing webpage and running into unacquainted foreign language, only need to choose this foreign language by drawing selection operation, click pre-set button (" translation " button) two steps again, the translation of this foreign language can be obtained, so, efficiently solve in prior art user browse webpage run into unacquainted foreign language time, need the operation of multiple step could obtain translation corresponding to this foreign language, the technical matters of complex operation.Achieve user browse webpage run into unacquainted foreign language time, the technique effect of translation corresponding to this foreign language can be obtained quickly and easily.
Simultaneously, when user browses the first webpage, first judge whether the content on the first webpage is preset content, if the content on the first webpage is preset content, just open a stroke word interpretative function and (that is: detect stroke selection operation whether having user to carry out on the first webpage, if detect and draw selection operation, then on the first webpage, determine based on drawing selection operation the word that user chooses, first window is exported near described word, a pre-set button is shown in first window, detect the trigger action whether had for triggering pre-set button, if trigger action detected, then export the translation that described word is corresponding).Wherein, described preset content can be the content relevant with study and work (such as: scientific paper, scientific articles, test materials, resources material, study coach data, etc.), like this, when user browses the relevant content of study and work, browser then automatically can be opened and draw word interpretative function, makes user when running into unacquainted foreign language, can apply a stroke word interpretative function and obtain translation corresponding to this foreign language quickly and easily; And when user browses some amusement and recreation contents (such as: novel, entertainment news, etc.), because these amusement and recreation contents do not belong to described preset content, so browser is not opened and drawn a word interpretative function, thus saved computer resource.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows a kind of according to an embodiment of the invention process flow diagram to the method that web page contents is translated;
Fig. 2 shows a kind of according to an embodiment of the invention structural representation of electronic equipment.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Embodiments provide a kind of method that web page contents is translated and electronic equipment, in order to overcome or solve at least in part in prior art user browse webpage run into unacquainted foreign language time, need the operation of multiple step could obtain translation corresponding to this foreign language, the technical matters of complex operation.
Present embodiments provide a kind of method that web page contents is translated, be applied in electronic equipment, this electronic equipment can be desktop computer, notebook computer, panel computer, smart mobile phone etc., and for this electronic equipment specifically which kind of electronic equipment, the present embodiment is not specifically limited.This electronic equipment comprises a display, and for displays image information, wherein, for desktop computer and notebook computer, this display can not have touch controllable function, and user can carry out man-machine interaction by mouse, keyboard; For panel computer and smart mobile phone, this display should have touch controllable function, and user can carry out man-machine interaction by the display (that is: touch-screen) with touch controllable function.Be provided with a browser in this electronic equipment, user can be surfed the Net by this browser.
The method translated web page contents introduced in the present embodiment, its executive agent is above-mentioned electronic equipment, is specifically as follows the browser be arranged in electronic equipment.
As shown in Figure 1, present embodiments provide a kind of method that web page contents is translated, comprising:
Step S101: when user browses the first webpage, judges whether the content on the first webpage is preset content.
As the optional embodiment of one, in step S101, judge whether the content on the first webpage is preset content, comprising: the article title in first page and/or article text are analyzed, determines the type of the content in first page; Whether the type judging the content in first page is preset kind; If so, then determine that the content on the first webpage is preset content; If not, then determine that the content on the first webpage is not preset content.
For example, word content (such as: the title of article, article text) on first webpage can be analyzed, determine the type of the content on the first webpage, wherein, the type mainly comprises: work and study class (such as: scientific paper, scientific articles, test materials, resources material, study coach data, etc.) and amusement and recreation class (such as: novel, entertainment news, etc.).If the type of the content on the first webpage is work and study class, then determine that the content on the first webpage is preset content; If the type of the content on the first webpage is not work and study class (such as: be amusement and recreation classes), then determine that the content on the first webpage is not preset content.
As the optional embodiment of one, in step S101, judge whether the content on the first webpage is preset content, comprising: the URL (UniformResourceLocator, URL(uniform resource locator)) obtaining first page; Judge whether the URL of first page is default URL; If so, then determine that the content on the first webpage is preset content; If not, determine that the content on the first webpage is not preset content.
For example, can record by a list quantity presetting URL, this default URL has a lot, can analyze each webpage of each website in advance, if the content on certain webpage belongs to work and study class, then the URL of this webpage is added in this presets list; If the content on this webpage belongs to amusement and recreation class, then the URL of this webpage is not added in this presets list.Like this, the URL that whole (or major part) content is work and study class webpage has just been got.When user browses the first webpage, the URL of the first webpage can be judged whether in the list, if, then determine that the URL of the first webpage is default URL, and then determine that the content on the first webpage is preset content; If do not exist, then determine that the URL of the first webpage is not default URL, and then determine that the content on the first webpage is not preset content.And this default URL can also be arranged by user, add in this list manually, such as, browser provides an input frame, and user can input a URL in this input frame, preserved by this URL, now, the URL that user inputs can add in this list by browser again.
Herein, if the content on the first webpage is preset content, then open " drawing word translation " function (that is: step S102 ~ step S106).
Step S102: if the content on the first webpage is preset content, then detect stroke selection operation whether having user to carry out on the first webpage.
For example, user use desktop computer (or notebook computer) browse the first webpage run into unacquainted foreign language word time, user can by clicking the mouse left button paddling mouse pointer, to be chosen by unacquainted foreign language word.Accordingly, desktop computer (or notebook computer) can acquire user by mouse and draw selection operation,
For example, when user uses smart mobile phone (or panel computer) to browse webpage, user directly can carry out drawing selection operation on the touchscreen and choose unacquainted foreign language word on the first webpage.Accordingly, smart mobile phone (or panel computer) can carry out drawing a selection operation by detecting acquisition user on the touchscreen.
Step S103: draw selection operation if detect, then based on drawing selection operation, the first webpage is determined the word (such as: foreign language word, foreign language phrase, foreign language sentence) that user chooses.
For example, desktop computer (or notebook computer) can detect the change of the left click event of mouse the position of combined mouse pointer, determines that user carries out drawing the word chosen of selection operation on the first webpage.Smart mobile phone (or panel computer) can obtain user and carry out on the touchscreen drawing the position of selection operation by detecting, and based on the position of this stroke of selection operation determine user-selected in foreign language word.
Step S104: export first window choosing near word, show a pre-set button in first window.
As the optional embodiment of one, after determining the word that user chooses, create first window, and the upper left corner of the word chosen user or this first window of upper right corner output display, this first window can be native window.
As the optional embodiment of one, multiple button is shown in this first window, these buttons are for realizing different functions, and these buttons comprise one for realizing the pre-set button of interpretative function, and show in pre-set button for representing the mark translated word.
For example, the Copy button, " search " button, " translation " button is shown in first window, wherein, the Copy button is used for copying the word that user chooses, " search " button is searched for the word chosen for utilizing search engine, " translation " button is used for translating the word that user chooses, and should be described pre-set button by " translation " button.
Step S105: detect the trigger action whether had for triggering pre-set button.
As the optional embodiment of one, this trigger action can be the clicking operation that user performs.
For example, when user uses desktop computer (or notebook computer) to browse webpage, user can click this pre-set button by the mouse be connected with desktop computer (or notebook computer), to trigger this pre-set button.Accordingly, desktop computer (or notebook computer) can detect user and whether click this pre-set button by mouse, if detect, user clicks this pre-set button, be then considered as the trigger action detected for triggering pre-set button.
For example, when user browses webpage by smart mobile phone (or panel computer), user can click this pre-set button by the touch-screen of smart mobile phone (or panel computer), to trigger this pre-set button.Accordingly, smart mobile phone (or panel computer) can obtain the position that user clicks, judge whether the position that user clicks belongs in the viewing area of pre-set button, if belong to, then determine that user clicks this pre-set button, be then considered as the trigger action detected for triggering pre-set button.
As the optional embodiment of one, this trigger action can also be the hover operation of user's mouse beacon pointer in pre-set button.
For example, when user uses desktop computer (or notebook computer) to browse webpage, the mouse pointer that user can use mouse control to show over the display hovers, to trigger this pre-set button in this pre-set button.Now, such as, if electronic equipment detects this hover operation (that is: the mouse pointer time rested in this pre-set button is greater than a preset time value, stops more than 1 second), then the trigger action detected for triggering pre-set button can be considered as.
Step S106: if trigger action detected, then export the translation choosing word corresponding.
As the optional embodiment of one, if trigger action detected, then the word chosen using user, as key word, is searched for by search engine, obtains the translation choosing word corresponding, and exports corresponding translation.Such as: can be searched for by " searching well " search engine or " bing " search engine, obtain the translation that word that user chooses is corresponding, then the translation that output character is corresponding.Herein, for described search engine specifically which kind of search engine, the present embodiment is not specifically limited.
As the optional embodiment of one, if trigger action detected, then from local dictionary, obtain translation corresponding to word, and the translation that output character is corresponding.Such as: installation local dictionary in the electronic device (such as: have dictionary, Kingsoft Powerword etc.) can be utilized to carry out query translation, obtain the translation that word is corresponding, then the translation that output character is corresponding.Herein, for described local dictionary specifically which kind of dictionary, the present embodiment is not specifically limited.
As the optional embodiment of one, when obtaining the translation choosing word corresponding, the translation rule can preset based on is translated.
Citing is incited somebody to action, and arbitrary foreign language word (that is: being different from the word of Chinese) all can be translated into Chinese, wherein, comprise " English-Chinese " translation, " Japanese-Chinese " translate, " Korean-Chinese " translation ", " Russian-Chinese " translate, etc.Also arbitrary foreign language word (that is: being different from English word) all can be translated into English, wherein, comprise " Chinese-English " translation, " Japanese-English " is translated, and " Korean-English ", " Russian-Chinese " are translated, etc.
As the optional embodiment of one, when the translation that output character is corresponding, can pass through translation corresponding to the second webpage output character, the second webpage is different from the first webpage, such as: can newly create the second webpage, and export translation on the second webpage.
As the optional embodiment of one, when the translation that output character is corresponding, can pass through translation corresponding to Second Window output character, wherein, Second Window is different from first window.
For example, Second Window can be created near first window, and export translation by Second Window.And after the translation corresponding by Second Window output character, if detect, user clicks the region beyond Second Window, then nullify first window and Second Window, make first window and Second Window no longer show.Like this, after user sees translation, can, by clicking the region beyond Second Window, first window and Second Window be disappeared.
Based on the above-mentioned method translated web page contents, present invention also offers a kind of electronic equipment, as shown in Figure 2, comprising:
Judge module 201, for when user browses the first webpage, judges whether the content on described first webpage is preset content;
First detection module 202, if the content on described first webpage is described preset content, then detects stroke selection operation whether having user to carry out on the first webpage;
Determination module 203, if for described stroke selection operation being detected, then based on described stroke of selection operation, described first webpage is determined the word that described user chooses;
First output module 204, for exporting first window near described word, shows a pre-set button in described first window;
Second detection module 205, for detecting the trigger action whether had for triggering described pre-set button;
Second output module 206, if for described trigger action being detected, then export the translation that described word is corresponding.
As the optional embodiment of one, judge module 203, specifically for:
Article title in described first page and/or article text are analyzed, determines the type of the content in described first page; Judge whether the type of the content in described first page is designated as preset kind; If so, then determine that the content on described first webpage is described preset content; If not, then determine that the content on described first webpage is not described preset content.
As the optional embodiment of one, judge module 203, specifically for:
Obtain the uniform resource position mark URL of described first page; Judge whether the URL of described first page is default URL; If so, then determine that the content on described first webpage is described preset content; If not, then determine that the content on described first webpage is not described preset content.
As the optional embodiment of one, the first output module 204, specifically for:
Described first window is exported in the upper left corner of described word or the upper right corner.
As the optional embodiment of one, in described first window, show multiple button, described pre-set button belongs to described multiple button, and shows in described pre-set button for representing the mark translated described word.
As the optional embodiment of one, the second detection module 205, specifically for:
Detect and whether have the clicking operation clicking described pre-set button; Or detect whether there be the hover operation of mouse pointer in described pre-set button.
As the optional embodiment of one, the second output module 206, specifically for:
If described trigger action detected, then using described word as key word, obtain translation corresponding to described word by search engine, and export translation corresponding to described word; Or if described trigger action detected, then from local dictionary, obtain translation corresponding to described word, and export translation corresponding to described word.
As the optional embodiment of one, the second output module 206, specifically for:
Export translation corresponding to described word by Second Window, described Second Window is different from described first window; Or exporting translation corresponding to described word by the second webpage, described second webpage is different from described first webpage.
The device that the electronic equipment introduced due to the present embodiment adopts for the method implementing to translate web page contents in the embodiment of the present application, so based on the method translated web page contents introduced in the embodiment of the present application, those skilled in the art can understand embodiment and its various version of the electronic equipment of the present embodiment, so how to realize introducing no longer in detail the method that web page contents is translated in the embodiment of the present application at this for this electronic equipment.As long as the device that the method that those skilled in the art implement to translate web page contents in the embodiment of the present application adopts, all belong to the application for protection scope.
The technical scheme provided in the embodiment of the present application, at least has following technique effect or advantage:
In the embodiment of the present application, when user browses the first webpage, judge whether the content on the first webpage is preset content, if the content on the first webpage is preset content, then detect stroke selection operation whether having user to carry out on the first webpage, if detect and draw selection operation, then on the first webpage, determine based on drawing selection operation the word that user chooses, first window is exported near described word, a pre-set button is shown in first window, detect the trigger action whether had for triggering pre-set button, if trigger action detected, then export the translation that described word is corresponding.Visible, user is when browsing webpage and running into unacquainted foreign language, only need to choose this foreign language by drawing selection operation, click pre-set button (" translation " button) two steps again, the translation of this foreign language can be obtained, so, efficiently solve in prior art user browse webpage run into unacquainted foreign language time, need the operation of multiple step could obtain translation corresponding to this foreign language, the technical matters of complex operation.Achieve user browse webpage run into unacquainted foreign language time, the technique effect of translation corresponding to this foreign language can be obtained quickly and easily.
Simultaneously, when user browses the first webpage, first judge whether the content on the first webpage is preset content, if the content on the first webpage is preset content, just open a stroke word interpretative function and (that is: detect stroke selection operation whether having user to carry out on the first webpage, if detect and draw selection operation, then on the first webpage, determine based on drawing selection operation the word that user chooses, first window is exported near described word, a pre-set button is shown in first window, detect the trigger action whether had for triggering pre-set button, if trigger action detected, then export the translation that described word is corresponding).Wherein, described preset content can be the content relevant with study and work (such as: scientific paper, scientific articles, test materials, resources material, study coach data, etc.), like this, when user browses the relevant content of study and work, browser then automatically can be opened and draw word interpretative function, makes user when running into unacquainted foreign language, can apply a stroke word interpretative function and obtain translation corresponding to this foreign language quickly and easily; And when user browses some amusement and recreation contents (such as: novel, entertainment news, etc.), because these amusement and recreation contents do not belong to described preset content, so browser is not opened and drawn a word interpretative function, thus saved computer resource.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although to comprise in other embodiment some included feature instead of further feature in this some embodiments, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize the some or all parts in gateway according to the embodiment of the present invention, proxy server, system.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.
The invention discloses, A1, a kind of method translated web page contents, is characterized in that, comprising:
When user browses the first webpage, judge whether the content on described first webpage is preset content;
If the content on described first webpage is described preset content, then detect stroke selection operation whether having user to carry out on the first webpage;
If described stroke selection operation detected, then based on described stroke of selection operation, described first webpage is determined the word that described user chooses;
Near described word, export first window, in described first window, show a pre-set button;
Detect the trigger action whether had for triggering described pre-set button;
If described trigger action detected, then export the translation that described word is corresponding.
A2, method as described in A1, it is characterized in that, whether the described content judged on described first webpage is preset content, comprising:
Article title in described first page and/or article text are analyzed, determines the type of the content in described first page;
Judge whether the type of the content in described first page is designated as preset kind
If so, then determine that the content on described first webpage is described preset content;
If not, then determine that the content on described first webpage is not described preset content.
A3, method as described in A1, it is characterized in that, whether the described content judged on described first webpage is preset content, comprising:
Obtain the uniform resource position mark URL of described first page;
Judge whether the URL of described first page is default URL;
If so, then determine that the content on described first webpage is described preset content;
If not, then determine that the content on described first webpage is not described preset content.
A4, method as described in A1, is characterized in that, describedly near described word, exports first window, comprising:
Described first window is exported in the upper left corner of described word or the upper right corner.
A5, method as described in A1, it is characterized in that, in described first window, show multiple button, described pre-set button belongs to described multiple button, and shows in described pre-set button for representing the mark translated described word.
A6, method as described in A1, it is characterized in that, whether described detection has the trigger action for triggering described pre-set button, comprising:
Detect and whether have the clicking operation clicking described pre-set button; Or
Detect and whether have the hover operation of mouse pointer in described pre-set button.
A7, method as described in A1, is characterized in that, described trigger action detected if described, then export the translation that described word is corresponding, comprising:
If described trigger action detected, then using described word as key word, obtain translation corresponding to described word by search engine, and export translation corresponding to described word; Or
If described trigger action detected, then from local dictionary, obtain translation corresponding to described word, and export translation corresponding to described word.
A8, as arbitrary in A1 ~ A7 as described in method, it is characterized in that the translation that the described word of described output is corresponding comprises:
Export translation corresponding to described word by Second Window, described Second Window is different from described first window; Or
Export translation corresponding to described word by the second webpage, described second webpage is different from described first webpage.
B9, a kind of electronic equipment, is characterized in that, comprising:
Judge module, for when user browses the first webpage, judges whether the content on described first webpage is preset content;
First detection module, if the content on described first webpage is described preset content, then detects stroke selection operation whether having user to carry out on the first webpage;
Determination module, if for described stroke selection operation being detected, then based on described stroke of selection operation, described first webpage is determined the word that described user chooses;
First output module, for exporting first window near described word, shows a pre-set button in described first window;
Second detection module, for detecting the trigger action whether had for triggering described pre-set button;
Second output module, if for described trigger action being detected, then export the translation that described word is corresponding.
B10, electronic equipment as described in B9, is characterized in that, described judge module, specifically for:
Article title in described first page and/or article text are analyzed, determines the type of the content in described first page; Judge whether the type of the content in described first page is designated as preset kind; If so, then determine that the content on described first webpage is described preset content; If not, then determine that the content on described first webpage is not described preset content.
B11, electronic equipment as described in B9, is characterized in that, described judge module, specifically for:
Obtain the uniform resource position mark URL of described first page; Judge whether the URL of described first page is default URL; If so, then determine that the content on described first webpage is described preset content; If not, then determine that the content on described first webpage is not described preset content.
B12, electronic equipment as described in B9, is characterized in that, described first output module, specifically for:
Described first window is exported in the upper left corner of described word or the upper right corner.
B13, electronic equipment as described in B9, it is characterized in that, in described first window, show multiple button, described pre-set button belongs to described multiple button, and shows in described pre-set button for representing the mark translated described word.
B14, electronic equipment as described in B9, is characterized in that, described second detection module, specifically for:
Detect and whether have the clicking operation clicking described pre-set button; Or detect whether there be the hover operation of mouse pointer in described pre-set button.
B15, electronic equipment as described in B9, is characterized in that, described second output module, specifically for:
If described trigger action detected, then using described word as key word, obtain translation corresponding to described word by search engine, and export translation corresponding to described word; Or if described trigger action detected, then from local dictionary, obtain translation corresponding to described word, and export translation corresponding to described word.
B16, as arbitrary in B9 ~ B15 as described in electronic equipment, it is characterized in that, described second output module, specifically for:
Export translation corresponding to described word by Second Window, described Second Window is different from described first window; Or
Export translation corresponding to described word by the second webpage, described second webpage is different from described first webpage.

Claims (10)

1. to the method that web page contents is translated, it is characterized in that, comprising:
When user browses the first webpage, judge whether the content on described first webpage is preset content;
If the content on described first webpage is described preset content, then detect stroke selection operation whether having user to carry out on the first webpage;
If described stroke selection operation detected, then based on described stroke of selection operation, described first webpage is determined the word that described user chooses;
Near described word, export first window, in described first window, show a pre-set button;
Detect the trigger action whether had for triggering described pre-set button;
If described trigger action detected, then export the translation that described word is corresponding.
2. the method for claim 1, is characterized in that, whether the described content judged on described first webpage is preset content, comprising:
Article title in described first page and/or article text are analyzed, determines the type of the content in described first page;
Judge whether the type of the content in described first page is designated as preset kind;
If so, then determine that the content on described first webpage is described preset content;
If not, then determine that the content on described first webpage is not described preset content.
3. the method for claim 1, is characterized in that, whether the described content judged on described first webpage is preset content, comprising:
Obtain the uniform resource position mark URL of described first page;
Judge whether the URL of described first page is default URL;
If so, then determine that the content on described first webpage is described preset content;
If not, then determine that the content on described first webpage is not described preset content.
4. the method for claim 1, is characterized in that, describedly near described word, exports first window, comprising:
Described first window is exported in the upper left corner of described word or the upper right corner.
5. the method for claim 1, is characterized in that, in described first window, show multiple button, and described pre-set button belongs to described multiple button, and shows in described pre-set button for representing the mark translated described word.
6. the method for claim 1, is characterized in that, whether described detection has the trigger action for triggering described pre-set button, comprising:
Detect and whether have the clicking operation clicking described pre-set button; Or
Detect and whether have the hover operation of mouse pointer in described pre-set button.
7. the method for claim 1, is characterized in that, described trigger action detected if described, then export the translation that described word is corresponding, comprising:
If described trigger action detected, then using described word as key word, obtain translation corresponding to described word by search engine, and export translation corresponding to described word; Or
If described trigger action detected, then from local dictionary, obtain translation corresponding to described word, and export translation corresponding to described word.
8. the method as described in as arbitrary in claim 1 ~ 7, is characterized in that the translation that the described word of described output is corresponding comprises:
Export translation corresponding to described word by Second Window, described Second Window is different from described first window; Or
Export translation corresponding to described word by the second webpage, described second webpage is different from described first webpage.
9. an electronic equipment, is characterized in that, comprising:
Judge module, for when user browses the first webpage, judges whether the content on described first webpage is preset content;
First detection module, if the content on described first webpage is described preset content, then detects stroke selection operation whether having user to carry out on the first webpage;
Determination module, if for described stroke selection operation being detected, then based on described stroke of selection operation, described first webpage is determined the word that described user chooses;
First output module, for exporting first window near described word, shows a pre-set button in described first window;
Second detection module, for detecting the trigger action whether had for triggering described pre-set button;
Second output module, if for described trigger action being detected, then export the translation that described word is corresponding.
10. electronic equipment as claimed in claim 9, is characterized in that, described judge module, specifically for:
Article title in described first page and/or article text are analyzed, determines the type of the content in described first page; Judge whether the type of the content in described first page is designated as preset kind; If so, then determine that the content on described first webpage is described preset content; If not, then determine that the content on described first webpage is not described preset content.
CN201510639936.3A 2015-09-30 2015-09-30 Method for translating webpage contents and electronic device Pending CN105354187A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510639936.3A CN105354187A (en) 2015-09-30 2015-09-30 Method for translating webpage contents and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510639936.3A CN105354187A (en) 2015-09-30 2015-09-30 Method for translating webpage contents and electronic device

Publications (1)

Publication Number Publication Date
CN105354187A true CN105354187A (en) 2016-02-24

Family

ID=55330161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510639936.3A Pending CN105354187A (en) 2015-09-30 2015-09-30 Method for translating webpage contents and electronic device

Country Status (1)

Country Link
CN (1) CN105354187A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930320A (en) * 2016-04-15 2016-09-07 惠州Tcl移动通信有限公司 Word crossing and searching method and system based on mobile terminals
CN107291703A (en) * 2017-05-17 2017-10-24 百度在线网络技术(北京)有限公司 Manner of articulation and device in translation service application
WO2018196668A1 (en) * 2017-04-24 2018-11-01 维沃移动通信有限公司 Method of performing search operation for selected object content and terminal
WO2020042468A1 (en) * 2018-08-31 2020-03-05 北京搜狗科技发展有限公司 Data processing method and device, and device for processing data

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189744A (en) * 2000-10-11 2002-07-05 Mieko Tsuyusaki Web page retrieval system
CN102402432A (en) * 2010-09-16 2012-04-04 正文科技股份有限公司 Method for creating a multi-lingual web page
CN102541434A (en) * 2006-09-06 2012-07-04 苹果公司 Deletion gestures on a portable multifunction device
CN102841746A (en) * 2012-07-11 2012-12-26 广东欧珀移动通信有限公司 Mobile phone webpage interaction method
CN102929924A (en) * 2012-09-20 2013-02-13 百度在线网络技术(北京)有限公司 Method and device for generating word selecting searching result based on browsing content
CN103136285A (en) * 2011-12-05 2013-06-05 英顺源(上海)科技有限公司 Translation query and operation system used for handheld device and method thereof
CN103309996A (en) * 2013-06-21 2013-09-18 宇龙计算机通信科技(深圳)有限公司 Webpage content processing method and device
CN103744857A (en) * 2013-12-10 2014-04-23 厦门亿联网络技术股份有限公司 Method for searching instant messaging chatting records for keywords
CN104025079A (en) * 2011-09-09 2014-09-03 谷歌公司 User interface for translation webpage
EP2816492A1 (en) * 2012-11-26 2014-12-24 Huawei Technologies Co., Ltd. Locating method and locating device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189744A (en) * 2000-10-11 2002-07-05 Mieko Tsuyusaki Web page retrieval system
CN102541434A (en) * 2006-09-06 2012-07-04 苹果公司 Deletion gestures on a portable multifunction device
CN102402432A (en) * 2010-09-16 2012-04-04 正文科技股份有限公司 Method for creating a multi-lingual web page
CN104025079A (en) * 2011-09-09 2014-09-03 谷歌公司 User interface for translation webpage
CN103136285A (en) * 2011-12-05 2013-06-05 英顺源(上海)科技有限公司 Translation query and operation system used for handheld device and method thereof
CN102841746A (en) * 2012-07-11 2012-12-26 广东欧珀移动通信有限公司 Mobile phone webpage interaction method
CN102929924A (en) * 2012-09-20 2013-02-13 百度在线网络技术(北京)有限公司 Method and device for generating word selecting searching result based on browsing content
EP2816492A1 (en) * 2012-11-26 2014-12-24 Huawei Technologies Co., Ltd. Locating method and locating device
CN103309996A (en) * 2013-06-21 2013-09-18 宇龙计算机通信科技(深圳)有限公司 Webpage content processing method and device
CN103744857A (en) * 2013-12-10 2014-04-23 厦门亿联网络技术股份有限公司 Method for searching instant messaging chatting records for keywords

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LKYTAL: "选中文字弹出快捷翻译/搜索", 《网址:HTTP://TIEBA.BAIDU.COM/P/2785863341》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930320A (en) * 2016-04-15 2016-09-07 惠州Tcl移动通信有限公司 Word crossing and searching method and system based on mobile terminals
WO2018196668A1 (en) * 2017-04-24 2018-11-01 维沃移动通信有限公司 Method of performing search operation for selected object content and terminal
CN107291703A (en) * 2017-05-17 2017-10-24 百度在线网络技术(北京)有限公司 Manner of articulation and device in translation service application
CN107291703B (en) * 2017-05-17 2021-06-08 百度在线网络技术(北京)有限公司 Pronunciation method and device in translation service application
WO2020042468A1 (en) * 2018-08-31 2020-03-05 北京搜狗科技发展有限公司 Data processing method and device, and device for processing data

Similar Documents

Publication Publication Date Title
US10275520B2 (en) System, methods and applications for embedded internet searching and result display
US11188709B2 (en) Cascading menus for remote popping
JP5723305B2 (en) Query generation from displayed text documents using virtual magnets
US8312383B2 (en) Mashup application processing system
CN105183724A (en) Translation method and electronic device
US20090313586A1 (en) Preview window including a storage context view of one or more computer resources
KR20110099225A (en) Previewing search results for suggested refinement terms and vertical searches
CN103631875A (en) Method for carrying out network search on browser side and browser
CN105095441A (en) Information acquisition method and device
CN105224175A (en) The method of content and electronic equipment on a kind of marking of web pages
CN105260433A (en) Webpage content collecting method and electronic device
CN105354187A (en) Method for translating webpage contents and electronic device
CN103440107A (en) Method and device for processing touch operation of electronic device
CN105279245A (en) Method for collecting contents on webpage and electronic device
CN111679818A (en) Method and system for editing display software
CN105138273B (en) A kind of method to make marks and electronic equipment
CN105242848A (en) Method for translating texts on web page and electronic device
CN101526949A (en) Operating method of desktop selected column after selecting text string by dragging and dropping left key of mouse
CN105243057A (en) Method for translating web page contents and electronic device.
CN104504058A (en) Web page presentation method and browser device
CN102981853B (en) A kind of Text Entry by webpage submits long article method and apparatus originally to
US20070073713A1 (en) Term search and link creation from a graphical user interface associated with presentation code
CN104461264B (en) Interactive interface generation method and device in a kind of browser of mobile terminal
CN106570061B (en) Webpage label management method and mobile terminal
CN105320751A (en) Method for making mark on webpage and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160224