CN107577676A - Web page translation method, apparatus and system - Google Patents

Web page translation method, apparatus and system Download PDF

Info

Publication number
CN107577676A
CN107577676A CN201710832732.0A CN201710832732A CN107577676A CN 107577676 A CN107577676 A CN 107577676A CN 201710832732 A CN201710832732 A CN 201710832732A CN 107577676 A CN107577676 A CN 107577676A
Authority
CN
China
Prior art keywords
web page
webpage
translated
page element
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
CN201710832732.0A
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 CAICHE QUMING TECHNOLOGY Co Ltd
Original Assignee
BEIJING CAICHE QUMING TECHNOLOGY 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 CAICHE QUMING TECHNOLOGY Co Ltd filed Critical BEIJING CAICHE QUMING TECHNOLOGY Co Ltd
Priority to CN201710832732.0A priority Critical patent/CN107577676A/en
Publication of CN107577676A publication Critical patent/CN107577676A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Machine Translation (AREA)

Abstract

The present invention, which provides a kind of web page translation method, apparatus and system, wherein method, to be included:N number of web page element in the webpage attribute and webpage to be translated of webpage to be translated is obtained, N is positive integer;N number of web page element is classified according to the element property of N number of web page element, and obtains M web page element to be translated in N number of web page element, M is the positive integer less than or equal to N;M translation result of the content to be translated in M web page element is obtained, M translation result corresponds with M web page element;According to the element property and webpage attribute of the classification results of N number of web page element, M web page element, M translation result is added into webpage to be translated and obtains translation control page.Web page translation method, apparatus and system provided by the invention, the correlation between the web page contents and original web page content after translation is improved, facilitates the reading of web page user.

Description

Web page translation method, apparatus and system
Technical field
The present invention relates to Internet technology, and the invention particularly relates to a kind of web page translation method, apparatus and system.
Background technology
With the development of Internet technology, network gradually incorporates the life of people, and many is contained in the website of internet The web page contents being made up of a variety of different language.In order to facilitate reading, seek text from a kind of language translation into another language Different types of language conversion in web page contents is generally that user is cognizable by using machine translation system by the user of speech Language realizes the reading to web page contents.
Web page translation system of the prior art, original web page content to be translated on webpage is obtained first, and will be original Text is translated as the web page contents after translation, by the way that the web page contents after translating are presented in discrete window or framework, by original Beginning web page contents interweave with the web page contents after being translated in discrete window or framework, and the web page contents after intertexture are presented to The reading user of webpage realizes web page translation.
Using prior art, because the web page contents after translation are by discrete window or framework presentation, translation is caused Correlation between web page contents afterwards and original web page content is poor, it has not been convenient to which web page user is read.
The content of the invention
The present invention provides a kind of web page translation method, apparatus and system, improves the web page contents after translation and original net Correlation between page content, facilitates the reading of web page user.
The present invention provides a kind of web page translation method, including:
N number of web page element in the webpage attribute and the webpage to be translated of webpage to be translated is obtained, the N is just whole Number;
N number of web page element is classified according to the element property of N number of web page element, and obtained described N number of M web page element to be translated in web page element, the M are the positive integer less than or equal to the N;
Obtain M translation result of the content to be translated in the M web page element, the M translation result and the M Individual web page element corresponds;
According to the classification results of N number of web page element, the element property of the M web page element and the webpage category Property, the M translation result is added into the webpage to be translated and obtains translation control page.
In an embodiment of the present invention, classification results, the M web page element according to N number of web page element Element property and the webpage attribute, the M translation result is added into the webpage to be translated and obtains translation control page, bag Include:
The first web page element corresponding to the first translation result in the M translation result is obtained, if first webpage The classification results of element meet the first preparatory condition, then according to the webpage attribute of the webpage to be translated, described first is translated As a result with the form of web page element, add by first web page element in the webpage to be translated;
The second web page element corresponding to the second translation result in the M translation result is obtained, if second webpage The classification results of element meet the second preparatory condition, then by second translation result in a text form, add described second After content to be translated in web page element.
In an embodiment of the present invention, first preparatory condition includes:The type of web page element be topic Types and/or Segment type;
Second preparatory condition includes:The type of web page element is small text type and/or link type.
In an embodiment of the present invention, it is described by first translation result with the form of web page element, treated described in addition By first web page element in translating web page, including:
Replicate first web page element and obtain the first web page element copy, the first web page element copy and described the One web page element pattern is identical;
First translation result is replaced into the content to be translated in the first web page element copy;
The first web page element copy is inserted into first web page element by the position in the webpage to be translated;
It is described then by second translation result in a text form, add in be translated in second web page element Rong Hou, including:
Replicate second web page element and obtain the second web page element copy, the second web page element copy and described the Two web page element patterns are identical;
After content of text of second translation result addition in the second web page element copy;
The second web page element copy is inserted into position of second web page element in the webpage to be translated to replace Change second web page element.
In an embodiment of the present invention, the webpage attribute includes following one or more:Character code, the net of webpage Page language statement, webpage visibility region height, webpage visibility region width, webpage full text height, webpage full text width, currently The page relative to the window viewing area upper left corner vertical range and horizontal range;
The element property includes following one or more:The element property includes following one or more:Member Plain type, element class name, element tags title, element pattern, the relative position of element and absolute position, the parent element of element With subclass attribute of an element, the text size of element, the text languages of element, the text trimming space of element, the text of element Whether it is pure digi-tal, whether the text of element is link, whether the text of element includes forbidden character, whether the text of element wraps Containing code.
In an embodiment of the present invention, the M translation knot for obtaining the content to be translated in the M web page element Fruit, including:
The content to be translated in the M web page element is sent to server;
Receive the M translation result that the server is sent.
In an embodiment of the present invention, the translation content includes:Content of text, image content and/or video content;
Then the translation result includes:Translation result corresponding to the content of text, the content of text pair in the picture Translation result corresponding to the content of text in translation result and/or the video answered.
The present invention provides a kind of web page translation device, including:
Element acquisition device, the element acquisition device are used to obtaining the webpage attribute of webpage to be translated and described to be translated N number of web page element in webpage, the N are positive integer;
Element classification device, the element sorter are used for the element property according to N number of web page element to institute State N number of web page element to be classified, and obtain M web page element to be translated in N number of web page element, the M be less than Equal to the positive integer of the N;
Acquisition device is translated, the translation acquisition device is used for the M for obtaining the content to be translated in the M web page element Individual translation result, the M translation result correspond with the M web page element;
Web page translation device, the web page translation device are used for classification results, the M according to N number of web page element The element property of individual web page element and the webpage attribute, the M translation result is added into the webpage to be translated and turned over Translate control page.
The present invention provides a kind of web page translation method, including:Terminal to server sends webpage to be translated;
The server obtains N number of webpage member in the webpage attribute and the webpage to be translated of the webpage to be translated Element, the N are positive integer;
The server is classified according to the element property of N number of web page element to N number of web page element, and is obtained M web page element to be translated in N number of web page element is taken, the M is the positive integer less than or equal to the N;
The server obtains M translation result of the content to be translated in the M web page element, the M translation As a result corresponded with the M web page element;
The server is according to the classification results of N number of web page element, the element property of the M web page element and institute Webpage attribute is stated, the M translation result is added into the webpage to be translated obtains translation control page;
The server sends the translation control page to the terminal;
After the terminal receives the translation control page, the browser of the terminal shows the translation control page.
The present invention provides a kind of web page translation system, including:Terminal and server;
The terminal is used to send webpage to be translated to the server;
The server is used to obtain N number of webpage in the webpage attribute and the webpage to be translated of the webpage to be translated Element, the N are positive integer;
The server is additionally operable to divide N number of web page element according to the element property of N number of web page element Class, and M web page element to be translated in N number of web page element is obtained, the M is the positive integer less than or equal to the N;
The server is additionally operable to obtain M translation result of the content to be translated in the M web page element, the M Individual translation result corresponds with the M web page element;
The server is additionally operable to the classification results according to N number of web page element, the element category of the M web page element Property and the webpage attribute, the M translation result is added into the webpage to be translated and obtains translation control page;
The server is additionally operable to send the translation control page to the terminal;
The terminal is additionally operable to after receiving the translation control page, and the browser of the terminal shows the translation control Page.
The present invention, which provides a kind of web page translation method, apparatus and system, wherein method, to be included:Obtain the net of webpage to be translated N number of web page element in page attribute and webpage to be translated, N are positive integer;According to the element property of N number of web page element to N number of net Page element is classified, and obtains M web page element to be translated in N number of web page element, and M is the positive integer less than or equal to N;Obtain M translation result of the content to be translated in M web page element is taken, M translation result corresponds with M web page element;Root According to the element property and webpage attribute of the classification results of N number of web page element, M web page element, M translation result is added and waits to turn over Translate webpage and obtain translation control page.Web page translation method, apparatus and system provided by the invention, there is provided one kind is in webpage to be translated Translation uniformity and the overall translation effect of high compatible degree are improved on original interface basis, lifting web page translation Consumer's Experience Technical scheme, the correlation between the web page contents and original web page content after translation is improved, facilitate web page user reading. And by being translated in units of the text of each element, show the user interface of the control translating web page of original text translation Neatly, it is attractive in appearance, meet the reading habit of users, improve user's reading experience of translation uniformity and web page translation, subtract Few workload manually participated in, reduces cost of labor, improves translation efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also To obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of web page translation embodiment of the method one of the present invention;
Fig. 2A is the structural representation of the webpage to be translated of web page translation embodiment of the method two of the present invention;
Fig. 2 B are the structural representation of the translation control page of web page translation embodiment of the method two of the present invention;
Fig. 3 is the structural representation of the translation control page of web page translation embodiment of the method three of the present invention;
Fig. 4 is the structural representation of web page translation device embodiment one of the present invention;
Fig. 5 is the schematic flow sheet of web page translation embodiment of the method four of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
Term " first ", " second ", " the 3rd " in description and claims of this specification and above-mentioned accompanying drawing, " The (if present)s such as four " are for distinguishing similar object, without for describing specific order or precedence.It should manage The data that solution so uses can exchange in the appropriate case, so as to embodiments of the invention described herein for example can with except Order beyond those for illustrating or describing herein is implemented.In addition, term " comprising " and " having " and theirs is any Deformation, it is intended that cover it is non-exclusive include, for example, containing the process of series of steps or unit, method, system, production Product or equipment are not necessarily limited to those steps clearly listed or unit, but may include not list clearly or for this The intrinsic other steps of a little process, method, product or equipment or unit.
Technical scheme is described in detail with specifically embodiment below.These specific implementations below Example can be combined with each other, and may be repeated no more for same or analogous concept or process in some embodiments.
Fig. 1 is the schematic flow sheet of web page translation embodiment of the method one of the present invention.Method shown in the present embodiment performs master Body is arbitrarily to possess the relative program in the browser or electronic equipment in the electronic equipment or electronic equipment of web page browsing function, Electronic equipment includes mobile phone, computer and tablet personal computer etc..As shown in figure 1, the present embodiment web page translation method comprises the following steps:
S101:Obtain N number of web page element in the webpage attribute and webpage to be translated of webpage to be translated.
Wherein, N is the positive integer more than zero.This step can be to be translated by the browser in electronic equipment or program parsing Webpage, obtain N number of web page element in the webpage attribute and webpage of webpage.When obtaining web page element by the way of traversal, The daughter element of each element in the main body body of webpage to be translated is obtained by recursion cycle traversal.
Alternatively, webpage attribute can include following one or more:The character code of webpage, the phonetic sound of webpage Bright, webpage visibility region height, webpage visibility region width, webpage in full height, webpage full text width, current page relative to The vertical range and horizontal range in the window viewing area upper left corner etc..
S102:N number of web page element is classified according to the element property of N number of web page element, and obtains N number of web page element In M web page element to be translated.
Wherein, M is the positive integer less than or equal to N.Obtain the member of each web page element in N number of web page element that S101 is obtained Plain attribute, and N number of web page element is classified according to the element property of N number of web page element.
In this step, also extract and possess the M web page element that can translate content in web page element as webpage to be translated member Element, specifically, it can be text type or picture/mb-type that the web page element of content can be translated by, which possessing,.Text type Text in web page element, which can be extracted, directly to be translated, and can pass through image the problem of in the web page element of picture/mb-type Treatment technology, after extracting the text in image, the text extracted in image is translated.
It is preferred that in S101 and S102 steps, by current page relative to the window viewing area upper left corner it is vertical away from From and horizontal range, and the absolute position of element, calculate and current occurred and the member on browser window will be appeared in Element.Such as alternatively, currentElement meets following condition:The vertical range that the ordinate of element is less than current page adds twice The height of window and the abscissa of element are less than width of the horizontal range plus window of current page.After conditions above M web page element to be translated is generated after filtering, and obtains translation result.After scroll bar, which rolls event, to be occurred, M to be translated is updated Individual web page element, realize that webpage rolls loading translation result with this.
Alternatively, element property can include following one or more:Element type, element class name, element tags name Title, element pattern, the relative position of element and absolute position, the parent element and subclass attribute of an element of element, the text of element This length, the text languages of element, the text of element trims space, whether the text of element is pure digi-tal, the text of element is Whether whether the text comprising forbidden character, element includes code etc. to the no text for link, element.
Such as:Element type can include text type and picture/mb-type.Then in S102, N number of web page element is obtained Element type, and all N number of web page elements are divided into two types, the type of m web page element therein is text type, The type of other N-m web page element is picture/mb-type.
A kind of possible implementation of this step is:According to the tag types of web page element, bookmark name, element class name etc. N number of web page element is filtered and classified, wherein the mode filtered includes judging that element type is element or text, judged Whether the class name of element is labeled as having done translation processing, judges whether the bookmark name of element is script, judges the text of element Whether have behind this trimming space value, judge element text length whether beyond limitation, the text for judging element whether be conjunction Method character etc., web page element is specifically divided into five type groups:H tag element groups, P tag element groups, SPAN tag elements Group and A tag elements group and other text element groups.Wherein, H represents title element, and P represents paragraph element, and SPAN represents small text This element, A represent linking element.
S103:Obtain M translation result of the content to be translated in M web page element.
Wherein, M translation result corresponds with M web page element.Wherein, translation result can be content to be translated The translation result of at least one object language composition, object language can carry out selection setting by the user of electronic equipment, or The font that is used when electronic equipment is according to consumer electronic devices browses the custom of webpage and automatically selects object language for user.
Alternatively, the translation content in the present embodiment includes:Content of text, image content and/or video content;Then translate As a result accordingly include:Translation result corresponding to content of text, translation result and/or video corresponding to the content of text in picture Translation result corresponding to interior content of text.
For example, when if the translation content in web page element is the picture comprising word content, pass through image in S103 After treatment technology is extracted and translated to the word in picture, the translation result by the word content in picture is the webpage Translation result corresponding to element.If the translation content in web page element is the video comprising captions, video is obtained in S103 In caption data and translation, be translation result corresponding to the web page element by the translation result of caption data.
Specifically, translation result being obtained in this step can be performed by electronic equipment, such as be included by electronic equipment Offline translation module by content translation to be translated be object language cypher text.
Or this step can also perform translation by electronic equipment by the back-end server for being used to translate of network insertion Processing, and translation result is returned to electronic equipment, for example, S103 includes:
S1031:The content to be translated in M web page element is sent to server;
S1032:The M translation result that the reception server is sent.
Wherein alternatively, for electronic equipment by network attached server, server is used for the text sent to electronic equipment Content translation to be translated is the translation result of object language, after the completion of server translation, translation result is sent and is back to electronics Equipment.Wherein, such as above-mentioned embodiment, if the content to be translated in web page element includes image content or video content, service Device is additionally operable to extract the word in picture by image processing techniques, the word in video is extracted or to regarding The captions of frequency are extracted.
S104:According to the element property and webpage attribute of the classification results of N number of web page element, M web page element, by M Translation result adds webpage to be translated and obtains translation control page.
Specifically, according in S102 to the element property of the classification results of N number of web page element, M web page element, and S101 The webpage attribute of middle acquisition, M translation result is added in the Webpage of webpage to be translated, obtain including original N number of net The amended translation control page of page element and M translation result being inserted.
Wherein, can be according to the classification of different web page elements, and spatial contrast element shared by translation result in S104 Text importing area size, different generations is carried out to the text of translation result and handled, processing specifically includes:According to webpage The element type of attribute and different elements, element property is changed, each translation result is inserted into net corresponding with translation result In page element or by web page element.
Alternatively, a kind of S104 possible implementation includes:
S1041:The first web page element corresponding to the first translation result in M translation result is obtained, if the first webpage is first The classification results of element meet the first preparatory condition, then according to the webpage attribute of webpage to be translated, by the first translation result with webpage The form of element, add by the first web page element in webpage to be translated;
S1042:The second web page element corresponding to the second translation result in M translation result is obtained, if the second webpage is first The classification results of element meet the second preparatory condition, then by the second translation result in a text form, add in the second web page element Content to be translated after.
Wherein alternatively, the first preparatory condition includes:The type of web page element is topic Types and/or Segment type;The Two preparatory conditions include:The type of web page element is small text type and/or link type.
Alternatively, in above-described embodiment S1041 by the first translation result with the form of web page element, add webpage to be translated In the first web page element by, including:
S10411:Replicate the first web page element and obtain the first web page element copy, the first web page element copy and the first net Page element pattern is identical;
S10412:First translation result is replaced into the content to be translated in the first web page element copy;
S10413:First web page element copy is inserted into the first web page element by the position in webpage to be translated.
Alternatively, in above-described embodiment S1042 by the second translation result in a text form, add the second web page element in Content to be translated after, including:
S10421:Replicate the second web page element and obtain the second web page element copy, the second web page element copy and the second net Page element pattern is identical;
S10422:After content of text of the second translation result addition in the second web page element copy;
S10423:Second web page element copy is inserted into position of second web page element in webpage to be translated and replaces second Web page element.
Specifically for example:Using the mode classification in above-described embodiment, web page element is divided into five type groups:H labels Element group, P tag element groups, SPAN tag elements group and A tag elements group and other text element groups.H tag elements group and P Tag element group meets the first preparatory condition, then replicates newtonium, by the completely the same new element text of the pattern for replicating generation Content modification is translation word, and new element is inserted after newtonium;SPAN tag elements group, A tag elements group and other texts This element group meets the second preparatory condition, then by translation word addition after the content of text of newtonium.
Especially, such as above-mentioned embodiment, if the content to be translated in web page element includes image content, picture is being obtained After translation result corresponding to content, the translation result is replaced into original image content and obtains new web page element, and will be new Web page element replaces original web page element.Especially, such as above-mentioned embodiment, if the content to be translated in web page element includes regarding Frequency content and when video content is captions, after translation result corresponding to captions is obtained, former captions are added to by the translation result By data.
Alternatively, after S104, in addition to:It will add corresponding to M translation result on the element class name of M web page element Add the label for having done translation processing.
To sum up, the web page translation method that the present embodiment provides, there is provided one kind is on the original interface basis of webpage to be translated Translation uniformity and the overall translation effect of high compatible degree are improved, the technical scheme of web page translation Consumer's Experience is lifted, improves The correlation between web page contents and original web page content after translation, facilitate web page user reading.What the present embodiment provided Web page translation method, by being translated in units of the text of each element, make the use of the control translating web page of original text translation Family interface display is neat, attractive in appearance, meets the reading habit of users, and the user for improving translation uniformity and web page translation reads Experience is read, the workload manually participated in is reduced, reduces cost of labor, improve translation efficiency.
For example, Fig. 2A is the structural representation of the webpage to be translated of web page translation embodiment of the method two of the present invention;Fig. 2 B are The structural representation of the translation control page of web page translation embodiment of the method two of the present invention.As shown in Figure 2 A, webpage to be translated includes 3 Individual web page element is respectively element " Hello World " and the small text type of the element " Title " of topic Types, Segment type Element " Weather ".Wherein, topic Types and Segment type meet the first preparatory condition, and small text type meets that second is pre- If condition.
Therefore, as shown in Figure 2 B, after obtaining the English text in 3 web page elements, translation result is obtained, by " Title " Translation result " title " added as new web page element in webpage after title types of elements, by " Hello World's " Translation result " hello world " also serves as new web page element and added in webpage after paragraph types of elements, and by " Weather " Translation result " weather " be directly added into former web page element.
In this example using translator of English be Chinese for example, the translation result of multilingual can also be obtained, do not limited herein It is fixed.
Fig. 3 is the structural representation of the translation control page of web page translation embodiment of the method three of the present invention.As shown in figure 3, this The structural representation that the distinct electronic apparatuses such as computer or mobile phone compare the displaying result of page to translation is respectively show in embodiment. With processing mode with embodiment in above-mentioned figure, its implementation is identical with principle, repeats no more for the judgement of each element in figure.
Fig. 4 is the structural representation of web page translation device embodiment one of the present invention.As shown in figure 4, the present embodiment webpage turns over Translating device includes:Element acquisition device 401, element classification device 402, translate acquisition device 403 and web page translation device 404. Wherein, element acquisition device 401 is used to obtain N number of web page element in the webpage attribute and webpage to be translated of webpage to be translated, N For positive integer;Element classification device 402 is used to classify to N number of web page element according to the element property of N number of web page element, and M web page element to be translated in N number of web page element is obtained, M is the positive integer less than or equal to N;Translation acquisition device 403 is used for M translation result of the content to be translated in M web page element is obtained, M translation result corresponds with M web page element; Web page translation device 404 is used for element property and webpage attribute according to the classification results of N number of web page element, M web page element, M translation result is added into webpage to be translated and obtains translation control page.
Web page translation device shown in the present embodiment is used to perform web page translation method shown in Fig. 1, its realization principle and skill Art effect is identical, and here is omitted.
Alternatively, in the above-described embodiments, web page translation device 404 is specifically used for obtaining in the M translation result First web page element corresponding to first translation result, if the classification results of first web page element meet the first preparatory condition, Then according to the webpage attribute of the webpage to be translated, by first translation result with the form of web page element, treated described in addition By first web page element in translating web page;
The second web page element corresponding to the second translation result in the M translation result is obtained, if second webpage The classification results of element meet the second preparatory condition, then by second translation result in a text form, add described second After content to be translated in web page element.
Alternatively, in the above-described embodiments, first preparatory condition includes:The type of web page element is topic Types And/or Segment type;Second preparatory condition includes:The type of web page element is small text type and/or link type.
Alternatively, in the above-described embodiments, web page translation device 404 obtains also particularly useful for first web page element is made First web page element copy, the first web page element copy are identical with the first web page element pattern;
First translation result is replaced into the content to be translated in the first web page element copy;
The first web page element copy is inserted into first web page element by the position in the webpage to be translated; With:
Replicate second web page element and obtain the second web page element copy, the second web page element copy and described the Two web page element patterns are identical;
After content of text of second translation result addition in the second web page element copy;
The second web page element copy is inserted into position of second web page element in the webpage to be translated to replace Change second web page element.
Alternatively, in the above-described embodiments,
The webpage attribute includes following one or more:The height of webpage, the width of webpage, browser window are big Vertical range and horizontal range small, window scroll bar is current;
The element property includes following one or more:Element type, element class name, element tags title, element Relative position and absolute position, the parent element of element and subclass attribute of an element, the length and languages of text type element, Whether element is pure digi-tal, whether element is whether connection, element comprising forbidden character and build space etc..
Alternatively, in the above-described embodiments, translation acquisition device 403 is specifically used for,
The content to be translated in the M web page element is sent to server;
Receive the M translation result that the server is sent.
Alternatively, in the above-described embodiments, the translation content includes:In content of text, image content and/or video Hold;Then the translation result includes:Translation result corresponding to the content of text, turned over corresponding to the content of text in the picture Translate translation result corresponding to the content of text in result and/or the video.
Web page translation device shown in the present embodiment is used to perform web page translation method shown in foregoing embodiments, and it is realized Philosophy and technique effect is identical, and here is omitted.
One embodiment of the invention also provides a kind of web page translation method, and Fig. 5 is web page translation embodiment of the method four of the present invention Schematic flow sheet.As shown in figure 5, the present embodiment method includes:
S501:Terminal to server sends webpage to be translated;
S502:Server obtains N number of web page element in the webpage attribute and webpage to be translated of webpage to be translated, and N is just Integer;
S503:Server is classified according to the element property of N number of web page element to N number of web page element, and obtains N number of net M web page element to be translated in page element, M are the positive integer less than or equal to N;
S504:Server obtains M translation result of the content to be translated in M web page element, M translation result and M Individual web page element corresponds;
S505:Server according to the element property and webpage attribute of the classification results of N number of web page element, M web page element, M translation result is added into webpage to be translated and obtains translation control page;
S506:Server sends translation control page to terminal;
S507:After terminal receives translation control page, the browser display translation control page of terminal.
Specifically, in the present embodiment, by each step shown in Fig. 1 by the server execution dedicated for translation, except holding Row main body is different, remaining web page translation method and principle all same, S502 to S505 implementation and principle with it is foregoing each S101 to S104 in embodiment is identical, repeats no more.Wherein, only need will be to be translated by S501 for the browser in terminal Webpage upload server, the step of obtaining translation control page is performed by server.Server translation completion obtains translation control page Afterwards, control page will be translated by S506 to send to terminal, so that terminal shows the translation pair by the browser of terminal in S507 According to page.
One embodiment of the invention also provides a kind of web page translation system, including:Terminal and server;
Terminal is used to send webpage to be translated to server;
Server is used to obtain N number of web page element in the webpage attribute and webpage to be translated of webpage to be translated, and N is just whole Number;
Server is additionally operable to classify to N number of web page element according to the element property of N number of web page element, and obtains N number of M web page element to be translated in web page element, M are the positive integer less than or equal to N;
Server is additionally operable to obtain M translation result of the content to be translated in M web page element, M translation result and M Individual web page element corresponds;
Server is additionally operable to the element property and webpage category of the classification results according to N number of web page element, M web page element Property, M translation result is added into webpage to be translated and obtains translation control page;
Server is additionally operable to send translation control page to terminal;
Terminal is additionally operable to after receiving translation control page, the browser display translation control page of terminal.
Web page translation system shown in the present embodiment is used to perform web page translation method shown in foregoing embodiments, and it is realized Philosophy and technique effect is identical, repeats no more.
The application also provides a kind of storage medium, including:Readable storage medium storing program for executing and computer program, the computer program The web page translation method provided for realizing foregoing each embodiment.
The application also provides a kind of program product, and the program product includes computer program (i.e. execute instruction), the calculating Machine program storage is in readable storage medium storing program for executing.At least one processor of encoding device can read the meter from readable storage medium storing program for executing Calculation machine program, at least one computing device computer program cause encoding device to implement foregoing various embodiments and provide Web page translation method.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey Sequence upon execution, execution the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology The scope of scheme.

Claims (10)

  1. A kind of 1. web page translation method, it is characterised in that including:
    N number of web page element in the webpage attribute and the webpage to be translated of webpage to be translated is obtained, the N is positive integer;
    N number of web page element is classified according to the element property of N number of web page element, and obtains N number of webpage M web page element to be translated in element, the M are the positive integer less than or equal to the N;
    Obtain M translation result of the content to be translated in the M web page element, the M translation result and the M net Page element corresponds;
    , will according to the classification results of N number of web page element, the element property of the M web page element and the webpage attribute The M translation result adds the webpage to be translated and obtains translation control page.
  2. 2. according to the method for claim 1, it is characterised in that the classification results according to N number of web page element, institute The element property of M web page element and the webpage attribute are stated, the M translation result is added into the webpage to be translated obtains Translation control page, including:
    The first web page element corresponding to the first translation result in the M translation result is obtained, if first web page element Classification results meet the first preparatory condition, then according to the webpage attribute of the webpage to be translated, by first translation result With the form of web page element, add by first web page element in the webpage to be translated;
    The second web page element corresponding to the second translation result in the M translation result is obtained, if second web page element Classification results meet the second preparatory condition, then by second translation result in a text form, addition second webpage After content to be translated in element.
  3. 3. according to the method for claim 2, it is characterised in that
    First preparatory condition includes:The type of web page element is topic Types and/or Segment type;
    Second preparatory condition includes:The type of web page element is small text type and/or link type.
  4. 4. according to the method in claim 2 or 3, it is characterised in that it is described by first translation result with web page element Form, add by first web page element in the webpage to be translated, including:
    Replicate first web page element and obtain the first web page element copy, the first web page element copy and first net Page element pattern is identical;
    First translation result is replaced into the content to be translated in the first web page element copy;
    The first web page element copy is inserted into first web page element by the position in the webpage to be translated;
    It is described then by second translation result in a text form, the content to be translated added in second web page element Afterwards, including:
    Replicate second web page element and obtain the second web page element copy, the second web page element copy and second net Page element pattern is identical;
    After content of text of second translation result addition in the second web page element copy;
    The second web page element copy is inserted into position of second web page element in the webpage to be translated and replaces institute State the second web page element.
  5. 5. according to the method described in claim any one of 1-3, it is characterised in that
    The webpage attribute includes following one or more:Character code, the language statement of webpage, the webpage visual field of webpage Height, webpage full text width, current page are left relative to window viewing area in full for domain height, webpage visibility region width, webpage The vertical range and horizontal range at upper angle;
    The element property includes following one or more:Element type, element class name, element tags title, element pattern, The relative position of element and absolute position, the parent element and subclass attribute of an element of element, the text size of element, element Text languages, the text of element trims space, whether the text of element is pure digi-tal, whether the text of element is link, element Text whether comprising forbidden character, the text of element whether include code.
  6. 6. according to the method described in claim any one of 1-3, it is characterised in that described to obtain in the M web page element M translation result of content to be translated, including:
    The content to be translated in the M web page element is sent to server;
    Receive the M translation result that the server is sent.
  7. 7. according to the method described in claim any one of 1-3, it is characterised in that the translation content includes:Content of text, figure Piece content and/or video content;
    Then the translation result includes:Translation result corresponding to the content of text, corresponding to the content of text in the picture Translation result corresponding to content of text in translation result and/or the video.
  8. A kind of 8. web page translation device, it is characterised in that including,
    Element acquisition device, the element acquisition device are used to obtain the webpage attribute of webpage to be translated and the webpage to be translated Interior N number of web page element, the N are positive integer;
    Element classification device, the element classification device are used for the element property according to N number of web page element to N number of net Page element is classified, and obtains M web page element to be translated in N number of web page element, and the M is less than or equal to described N positive integer;
    Acquisition device is translated, the translation acquisition device turns over for obtaining M of the content to be translated in the M web page element Result is translated, the M translation result corresponds with the M web page element;
    Web page translation device, the web page translation device are used for classification results, the M net according to N number of web page element The element property of page element and the webpage attribute, the M translation result is added into the webpage to be translated and obtains translation pair According to page.
  9. A kind of 9. web page translation method, it is characterised in that including:
    Terminal to server sends webpage to be translated;
    The server obtains N number of web page element in the webpage attribute and the webpage to be translated of the webpage to be translated, institute It is positive integer to state N;
    The server is classified according to the element property of N number of web page element to N number of web page element, and obtains institute M web page element to be translated in N number of web page element is stated, the M is the positive integer less than or equal to the N;
    The server obtains M translation result of the content to be translated in the M web page element, the M translation result Corresponded with the M web page element;
    The server is according to the classification results of N number of web page element, the element property of the M web page element and the net Page attribute, the M translation result is added into the webpage to be translated and obtains translation control page;
    The server sends the translation control page to the terminal;
    After the terminal receives the translation control page, the browser of the terminal shows the translation control page.
  10. A kind of 10. web page translation system, it is characterised in that including:Terminal and server;
    The terminal is used to send webpage to be translated to the server;
    N number of webpage member that the server is used to obtain in the webpage attribute and the webpage to be translated of the webpage to be translated Element, the N are positive integer;
    The server is additionally operable to classify to N number of web page element according to the element property of N number of web page element, and M web page element to be translated in N number of web page element is obtained, the M is the positive integer less than or equal to the N;
    The server is additionally operable to obtain M translation result of the content to be translated in the M web page element, and the M are turned over Result is translated to correspond with the M web page element;
    The server be additionally operable to the classification results according to N number of web page element, the M web page element element property and The webpage attribute, the M translation result is added into the webpage to be translated and obtains translation control page;
    The server is additionally operable to send the translation control page to the terminal;
    The terminal is additionally operable to after receiving the translation control page, and the browser of the terminal shows the translation control page.
CN201710832732.0A 2017-09-15 2017-09-15 Web page translation method, apparatus and system Pending CN107577676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710832732.0A CN107577676A (en) 2017-09-15 2017-09-15 Web page translation method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710832732.0A CN107577676A (en) 2017-09-15 2017-09-15 Web page translation method, apparatus and system

Publications (1)

Publication Number Publication Date
CN107577676A true CN107577676A (en) 2018-01-12

Family

ID=61033453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710832732.0A Pending CN107577676A (en) 2017-09-15 2017-09-15 Web page translation method, apparatus and system

Country Status (1)

Country Link
CN (1) CN107577676A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280219A (en) * 2018-02-07 2018-07-13 深圳壹账通智能科技有限公司 Text interpretation method, device, computer equipment and storage medium
CN109669742A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Methods of exhibiting, device, terminal device and the storage medium of website
CN109783579A (en) * 2019-01-22 2019-05-21 南京焦点领动云计算技术有限公司 A kind of method of quick copy and translation web site
CN110119515A (en) * 2019-04-18 2019-08-13 珠海格力电器股份有限公司 A kind of interpretation method, device, terminal and readable storage medium storing program for executing
WO2020019330A1 (en) * 2018-07-27 2020-01-30 华为技术有限公司 Mail translation method, and electronic device
CN111125603A (en) * 2019-12-27 2020-05-08 百度时代网络技术(北京)有限公司 Webpage scene recognition method and device, electronic equipment and storage medium
CN113553802A (en) * 2021-06-30 2021-10-26 上海硬通网络科技有限公司 Typesetting method, device, equipment and storage medium for characters in hidden picture of webpage
CN114154092A (en) * 2021-11-18 2022-03-08 网易有道信息技术(江苏)有限公司 Method for translating web pages and related product
WO2023061020A1 (en) * 2021-10-15 2023-04-20 华为技术有限公司 Web 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
US8412509B1 (en) * 2000-07-17 2013-04-02 Globalenglish Corporation Interactive translation tool
CN104090869A (en) * 2014-06-25 2014-10-08 武汉传神信息技术有限公司 Network information translating method and translating system
CN106303303A (en) * 2016-08-17 2017-01-04 北京金山安全软件有限公司 Method and device for translating subtitles of media file and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8412509B1 (en) * 2000-07-17 2013-04-02 Globalenglish Corporation Interactive translation tool
CN104090869A (en) * 2014-06-25 2014-10-08 武汉传神信息技术有限公司 Network information translating method and translating system
CN106303303A (en) * 2016-08-17 2017-01-04 北京金山安全软件有限公司 Method and device for translating subtitles of media file and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《电脑爱好者》杂志社: "《网络应用绝密X档案 网络优化、调整、排障万用全书》", 31 August 2006 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280219A (en) * 2018-02-07 2018-07-13 深圳壹账通智能科技有限公司 Text interpretation method, device, computer equipment and storage medium
WO2020019330A1 (en) * 2018-07-27 2020-01-30 华为技术有限公司 Mail translation method, and electronic device
CN109669742A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Methods of exhibiting, device, terminal device and the storage medium of website
CN109783579B (en) * 2019-01-22 2020-06-02 南京焦点领动云计算技术有限公司 Method for quickly copying and translating website
CN109783579A (en) * 2019-01-22 2019-05-21 南京焦点领动云计算技术有限公司 A kind of method of quick copy and translation web site
CN110119515A (en) * 2019-04-18 2019-08-13 珠海格力电器股份有限公司 A kind of interpretation method, device, terminal and readable storage medium storing program for executing
CN110119515B (en) * 2019-04-18 2020-11-20 珠海格力电器股份有限公司 Translation method, translation device, terminal and readable storage medium
CN111125603A (en) * 2019-12-27 2020-05-08 百度时代网络技术(北京)有限公司 Webpage scene recognition method and device, electronic equipment and storage medium
CN111125603B (en) * 2019-12-27 2023-06-27 百度时代网络技术(北京)有限公司 Webpage scene recognition method and device, electronic equipment and storage medium
CN113553802A (en) * 2021-06-30 2021-10-26 上海硬通网络科技有限公司 Typesetting method, device, equipment and storage medium for characters in hidden picture of webpage
WO2023061020A1 (en) * 2021-10-15 2023-04-20 华为技术有限公司 Web content translation method, computer device, storage medium, and program product
CN114154092A (en) * 2021-11-18 2022-03-08 网易有道信息技术(江苏)有限公司 Method for translating web pages and related product
CN114154092B (en) * 2021-11-18 2023-04-18 网易有道信息技术(江苏)有限公司 Method for translating web pages and related product

Similar Documents

Publication Publication Date Title
CN107577676A (en) Web page translation method, apparatus and system
CN103677516B (en) The interface creating method of terminal and device
US10339209B2 (en) Webpage display method and device
CN106599940A (en) Picture character identification method and apparatus thereof
CN106326251B (en) The full-scale adaptation method and device of object to be presented
CN107885792B (en) Webpage article display method, device and system
CN105094775B (en) Webpage generation method and device
CN107147940A (en) Method, device, electronic equipment and the storage medium of content carousel
CN109670069A (en) A kind of composition method and composing system of calligraphic character image
CN108121539A (en) Component processing method and device
CN105975268A (en) Method of width self-adaptation for PC end information system webpage interface
CN111382192A (en) Data list display method and device and electronic equipment
CN111222069A (en) Report component adjusting method and device and related equipment
CN105786881A (en) Self-adaptive electronic book and magazine file structure and corresponding methods and devices
CN104331429B (en) The method and device of multiple features dimension quantization is carried out to network object
CN103365920A (en) Method for displaying webpage, browser and mobile terminal
CN113297345A (en) Analysis report generation method, electronic equipment and related product
CN106327550A (en) Icon generation method and device for recommendation website on browser homepage
CN113283432A (en) Image recognition and character sorting method and equipment
JP6924544B2 (en) Cartoon data display system, method and program
CN106445320A (en) Method and device for manufacturing and displaying contents of electronic book
CN116306506A (en) Intelligent mail template method based on content identification
CN102637159B (en) Document display method and device
CN105373565A (en) Webpage processing method and apparatus
CN103927363A (en) Browser grid display method and system and browser client

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1245440

Country of ref document: HK

RJ01 Rejection of invention patent application after publication

Application publication date: 20180112

RJ01 Rejection of invention patent application after publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1245440

Country of ref document: HK