Auxiliary translation method and system

文档序号:1614264 发布日期:2020-01-10 浏览:24次 中文

阅读说明:本技术 一种辅助翻译方法和系统 (Auxiliary translation method and system ) 是由 卢美辉 于 2018-07-03 设计创作,主要内容包括:本发明公开了一种辅助翻译方法和系统,通过Android设备端监听当前显示界面中显示内容是否发生改变;将界面显示的文字信息上传至服务器端;所述服务器端接收Android设备端上传的文字信息,解析所述文字信息,将解析出的信息翻译成目标语言,所述WEB设备端接收目标语言信息,并将所述目标语言信息进行显示。本发明所述方法和系统,利用服务器对获取的信息自动翻译,并传送到WEB设备端显示,从而提高了工作效率,节省开发时间,降低人力成本,同时也避免了在进行翻译测试时因翻译无法对比,导致反复调试失败的漏洞,且不需要多设备对比,可同时操作,减少设备需求,降低翻译成本和环境要求。(The invention discloses an auxiliary translation method and an auxiliary translation system, wherein an Android device end is used for monitoring whether display content in a current display interface is changed; uploading the character information displayed on the interface to a server side; the server side receives the character information uploaded by the Android equipment side, analyzes the character information, translates the analyzed information into a target language, and the WEB equipment side receives the target language information and displays the target language information. According to the method and the system, the server is used for automatically translating the acquired information and transmitting the information to the WEB equipment terminal for displaying, so that the working efficiency is improved, the development time is saved, the labor cost is reduced, meanwhile, the vulnerability of repeated debugging failure caused by the fact that translation cannot be compared in the translation test is avoided, multiple equipment comparison is not needed, the method and the system can be operated simultaneously, the equipment requirement is reduced, and the translation cost and the environmental requirement are reduced.)

1. An aided translation method, comprising:

the Android equipment end monitors whether the content displayed on the current display interface changes;

if the change occurs, acquiring the text information on the display interface, and uploading the text information to a server side;

the server receives the text information uploaded by the Android equipment terminal, analyzes the text information, translates the analyzed information into target language information, and sends the translated target language information to the WEB equipment terminal;

and the WEB equipment end receives the target language information sent by the server end and displays the target language information.

2. The aided translation method according to claim 1, wherein said method further comprises the steps of:

and the Android equipment terminal monitors the name of the application package by using the Android auxiliary tool service configuration.

3. The auxiliary translation method according to claim 1, wherein the Android device side uploads the text information to a server side and also uploads the MAC value of the Android device side to the server side together.

4. The auxiliary translation method according to claim 1, wherein the step of displaying the target language information by the WEB device side further comprises:

and setting the display size of the target language to be in equal proportion to the size of the text information displayed at the Android equipment end, wherein each target language is presented in a list form.

5. The aided translation method according to claim 2, wherein said step of translating the parsed information into a target language further comprises:

judging whether a translation database in the local system comprises language storage information corresponding to the translation of the analyzed information into a target language;

if yes, information translation is carried out through the translation database;

otherwise, inquiring the translation tool type corresponding to the translation of the analyzed information into the target language, and selecting the used translation tool; and the information is translated by the queried translation tool.

6. An aided translation system, comprising: the system comprises an Android device terminal, a server terminal and a WEB device terminal;

the Android device side comprises: the interface information monitoring module and the information uploading module;

the interface information monitoring module is used for monitoring whether the content displayed on the current display interface changes;

the information uploading module is used for acquiring the text information on the interface when the change of the display content in the current display interface is monitored, and packaging and uploading the text information and the MAC value of the Android equipment to the server side;

the server side is used for receiving the data packet information uploaded by the Android equipment side, analyzing the information contained in the data packet, translating the analyzed information into target language information and sending the translated language information to the WEB equipment side;

and the WEB equipment terminal is used for receiving and displaying the voice information sent by the server terminal.

7. The auxiliary translation system of claim 6, wherein the Android device side further comprises: a configuration module;

and the configuration module is used for configuring and monitoring the application package name by using the Android auxiliary tool service.

8. The auxiliary translation system of claim 6, wherein the information uploading module is further configured to upload the text information to a server and upload the MAC values of the Android device to the server together.

9. The auxiliary translation system according to claim 6, wherein the WEB device side further comprises: a display setting module;

the display setting module is used for setting the display size of the target language to be equal to the size of the text information displayed at the Android equipment end, and each target language is presented in a list form.

10. The aided translation system of claim 6, wherein the server-side further comprises:

the translation library judging module is used for judging whether a translation database corresponding to the translation of the analyzed information into the target language is stored in the local system;

the translation database translation module is used for translating the analyzed information into a translation database corresponding to the target language when the translation database is stored in the local system, and translating the information through the translation database;

the third-party translation module is used for inquiring the type of a translation tool corresponding to the translation of the analyzed information into the target language and selecting the used translation tool when a translation database corresponding to the translation of the analyzed information into the target language is not stored in the local system; and the information is translated by the queried translation tool.

Technical Field

The invention relates to the technical field of auxiliary information processing, in particular to an auxiliary translation method and an auxiliary translation system.

Background

At present, due to the common use of electronic equipment and the global knowledge sharing, when a system tester performs software testing, the system tester may encounter the defects that the testing language is unfamiliar, the language information cannot be recognized, and the language translation needs to be performed by a translation tool, so that the working efficiency is low. There is also a possibility that when a worker uses the device, the system language of the device is not familiar, and the worker cannot use the system, or perhaps when reading a document, the user cannot recognize the language used by the document, cannot acquire the content of the document, and needs to perform translation by means of translation software, resulting in a defect of low reading efficiency.

Therefore, the prior art is subject to further improvement.

Disclosure of Invention

In view of the above disadvantages in the prior art, the present invention aims to provide an auxiliary translation method and system for users, which overcomes the drawback of low efficiency caused by language translation usually performed by means of translation software or translation tools in the prior art.

The first embodiment provided by the invention is as follows: an auxiliary translation method is applied to auxiliary translation of an Android device side, the Android device side is in communication connection with a server side, and the server side is in communication connection with a WEB side;

the auxiliary translation method comprises the following steps:

the Android equipment end monitors whether the content displayed on the current display interface changes; if the change occurs, acquiring the text information on the interface, and uploading the text information to a server side;

the server receives the text information uploaded by the Android equipment terminal, analyzes the text information, translates the analyzed information into a target language, and sends the translated target language information to the WEB equipment terminal;

and the WEB equipment end receives the target language information sent by the server end and displays the target language information.

Optionally, before the Android device end monitors whether display content in the current display interface changes, the method further includes the following steps:

and the Android equipment terminal monitors the name of the application package by using the Android auxiliary tool service configuration.

Optionally, the Android device side uploads the text information to the server side, and simultaneously uploads the MAC value of the Android device side to the server side together.

Optionally, the step of displaying the target language information by the WEB device side further includes:

and setting the display size of the target language to be in equal proportion to the size of the text information displayed at the Android equipment end, wherein each target language is presented in a list form.

Optionally, the step of translating the parsed information into the target language further includes:

judging whether a translation database in the local system comprises language storage information corresponding to the translation of the analyzed information into a target language;

if yes, information translation is carried out through the translation database;

otherwise, inquiring the translation tool type corresponding to the translation of the analyzed information into the target language, and selecting the used translation tool; and the information is translated by the queried translation tool.

A second embodiment of the present invention discloses an auxiliary translation system, which includes: the system comprises an Android device terminal, a server terminal and a WEB device terminal;

the Android device side comprises: the interface information monitoring module and the information uploading module;

the interface information monitoring module is used for monitoring whether the content displayed on the current display interface changes;

the information uploading module is used for acquiring the text information on the interface when the change of the display content in the current display interface is monitored, and packaging and uploading the text information and the MAC value of the Android equipment to the server side;

the server side is used for receiving the data packet information uploaded by the Android equipment side, analyzing the information contained in the data packet, translating the analyzed information into target language information and sending the translated language information to the WEB equipment side;

and the WEB equipment terminal is used for receiving and displaying the voice information sent by the server terminal.

Optionally, the Android device side further includes: a configuration module;

and the configuration module is used for configuring and monitoring the application package name by using the Android auxiliary tool service.

Optionally, the information uploading module is further configured to upload the text information to a server side and upload the MAC values of the Android device side to the server side together.

Optionally, the WEB device side further includes: a display setting module;

the display setting module is used for setting the display size of the target language to be equal to the size of the text information displayed at the Android equipment end, and each target language is presented in a list form.

Optionally, the server further includes:

the translation library judging module is used for judging whether a translation database corresponding to the translation of the analyzed information into the target language is stored in the local system;

the translation database translation module is used for translating the analyzed information into a translation database corresponding to the target language when the translation database is stored in the local system, and translating the information through the translation database;

the third-party translation module is used for inquiring the type of a translation tool corresponding to the translation of the analyzed information into the target language and selecting the used translation tool when a translation database corresponding to the translation of the analyzed information into the target language is not stored in the local system; and the information is translated by the queried translation tool.

The method and the system have the beneficial effects that whether the display content in the current display interface is changed or not is monitored through the Android device terminal; if the change occurs, acquiring the text information on the interface, and uploading the text information to a server side; the server receives the text information uploaded by the Android equipment terminal, analyzes the text information, translates the analyzed information into a target language, and sends the translated target language information to the WEB equipment terminal; and the WEB equipment end receives the target language information sent by the server end and displays the target language information. According to the method and the system, the server is used for automatically translating the acquired information and transmitting the information to the WEB equipment end for displaying, so that the working efficiency is improved, the development time is saved, the labor cost is reduced, and the test difficulty is reduced; the vulnerability of repeated debugging failure caused by the fact that translation cannot be compared when translation testing is carried out is avoided, multi-device comparison is not needed, simultaneous operation can be carried out, equipment requirements are reduced, and translation cost and environment requirements are reduced.

Drawings

FIG. 1 is a flow chart of the steps of a method of aiding translation according to the present invention;

FIG. 2 is a flowchart illustrating steps of an Android device side when the method of the present invention is implemented;

FIG. 3 is a flow chart of server side steps in a particular implementation of the method of the present invention;

FIG. 4 is a flowchart of steps at the WEB device side when the method of the present invention is embodied;

FIG. 5 is a schematic diagram of the auxiliary translation system according to the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The first embodiment provided by the invention is as follows: an auxiliary translation method is applied to auxiliary translation of an Android device side, wherein the Android device side is in communication connection with a server side, and the server side is in communication connection with a WEB side;

as shown in fig. 1, the auxiliary translation method includes:

step S1, the Android device side monitors whether the content displayed on the current display interface changes; and if the change occurs, acquiring the text information on the interface, and uploading the text information to the server side.

When language test is carried out on an Android device terminal or information is browsed by using the Android device terminal, characters of a display interface can generate corresponding changes along with control operation, and the displayed characters of the display interface can possibly generate languages unfamiliar to testers or device users. Text area coordinates, width and height, text, equipment name and equipment language. In the character information, the coordinates of the character area can quickly and accurately acquire the changed characters; the width and the height can ensure that the translated characters are consistent with a display page before translation when being pushed to a Web end for display; and (3) writing: the one-to-one correspondence between the characters to be translated and the translated characters can be ensured; the device name: the MAC value and the device list are listed in a device list and displayed at a Web end;

device current system language: the equipment terminal translates the current system language of the equipment, namely the preset language, and the server terminal translates the analyzed information into the current system language of the equipment.

Preferably, the server side needs to perform the translation operation for a plurality of Android device sides at the same time, so that in a specific implementation process, the server may perform the translation operation for information uploaded by the plurality of Android device sides at the same time. The MAC value of each device has uniqueness, and the device side can be distinguished through the MAC value and is used as a unique standard when the device is selected.

And step S2, the server receives the character information uploaded by the Android device terminal, analyzes the character information, translates the analyzed information into a target language, and sends the translated target language information to the WEB device terminal.

And the server receives the text information uploaded by the Android equipment terminal, analyzes the text information, translates the analyzed text information into a target language, and pushes the translated target language to the web equipment terminal for display.

Further, in the specific implementation, the server translates the target language through the translation database stored therein, but there may be a case where the translation database in the server cannot translate the parsed text information into the target language, and therefore, translation software of a third party is needed to translate the text information.

And step S3, the WEB equipment end receives the target language information sent by the server end and displays the target language information.

And the WEB equipment end receives the translated target language information sent by the server end and displays the target language information.

Specifically, in order to realize more targeted monitoring of the content of the display interface, before the Android device monitors whether the display content in the current display interface changes, the method further includes the following steps:

and the Android equipment terminal monitors the name of the application package by using the Android auxiliary tool service configuration.

On the basis of the method, after the configuration monitoring application package name is added, the method provided by the invention monitors whether the display interface of the application program with the configured monitoring application package name is changed or not only when the application program is used, and if the content of the display interface of the application program is monitored to be changed, the text information of the display interface in the current year is acquired and uploaded to the server side.

The above method is described in more detail below with reference to specific application examples thereof.

As shown in fig. 2, a schematic diagram of a procedure flow of an Android device side is shown.

And step H21, the Android device side starts an application program APP side with the corresponding function of the method disclosed by the invention, and starts to use the auxiliary translation function.

And step H22, the Android device side mainly configures the name of an application packet to be monitored through the Access serviceservice, monitors whether the interface is changed, if so, executes the step H13, otherwise, repeats the step.

And step H23, analyzing the character information of the display interface.

And step H24, sending the character information data analyzed last time to the server.

And H23, ending.

As shown in fig. 3, it is a server-side flowchart, which includes the following steps:

and H31, starting the server, and establishing connection with the Android equipment terminal.

And step H32, the server receives Android terminal data.

Step H33 the server analyzes the information contained in the packet, and does not perform step H25, and saves the received data.

And step H35, saving the data, and simultaneously, step H24 pushing the original text to the Web end for display.

Step H36, after querying the translation database, executing step H37, judging whether the translation needs to be queried through third-party translation (Google, Baidu translation, etc.), if so, executing step H39, otherwise, executing step H310;

step H39, after inquiring the translation tool, executing step H38, storing the newly added translation into a database, facilitating the Web end to check the historical data, and then executing step H310; the last 5 historical records can be selected (5 times are designed, but the times can be adjusted according to actual conditions);

and step H310, sending the searched translation result to a Web end for display by using WebSocket.

Fig. 4 is a flow chart of the Web end, and as can be seen from fig. 4, the method includes the following steps:

h41: judging whether equipment is selected or not, if so, performing H43, and if not, performing H42;

h42: acquiring an equipment list, selecting equipment, and recording selected equipment information;

h43: establishing a WebSocket connection for receiving data and sending the data to a server;

h44: and judging whether data are pushed or not, if so, displaying the data, and if not, continuing to wait.

Optionally, the step of displaying the target language information by the WEB device side further includes:

and setting the display size of the target language to be in equal proportion to the size of the text information displayed at the Android equipment end, wherein each target language is presented in a list form.

Optionally, the step of translating the parsed information into the target language further includes:

judging whether a translation database in the local system comprises language storage information corresponding to the translation of the analyzed information into a target language;

if yes, information translation is carried out through the translation database;

otherwise, inquiring the translation tool type corresponding to the translation of the analyzed information into the target language, and selecting the used translation tool; and the information is translated by the queried translation tool.

The second embodiment of the present invention discloses an auxiliary translation system, as shown in fig. 5, including: an Android device end 510, a server end 520 and a WEB device end 530;

the Android device terminal 510 includes: an interface information monitoring module 5101 and an information uploading module 5102;

the interface information monitoring module 5101 is configured to monitor whether display content in a current display interface changes;

the information uploading module 5102 is configured to, when it is monitored that display content in a current display interface changes, obtain text information on the interface, and package and upload the text information and an MAC value of the Android device to the server;

the server 520 is configured to receive the information of the data packet uploaded by the Android device, parse the information contained in the data packet, translate the parsed information into a target language, and send the translated language information to the WEB device;

and the WEB device end 530 is configured to receive the voice information sent by the server end and display the voice information.

Optionally, the Android device end 510 further includes: a configuration module 5103;

the configuration module 5103 is configured to configure and monitor the name of the application package by using an Android auxiliary tool service.

Optionally, the information uploading module 5102 is further configured to upload the text information to a server, and simultaneously upload the MAC values of the Android device to the server.

Optionally, the WEB device end 530 further includes: the display setting module 5301;

the display setting module 5301 is configured to set a display size of the target language to be equal to a size of the text information displayed at the Android device, where each target language is presented in a list form.

Optionally, the server 520 further includes:

the translation library judging module is used for judging whether a translation database corresponding to the translation of the analyzed information into the target language is stored in the local system;

the translation database translation module is used for translating the analyzed information into a translation database corresponding to the target language when the translation database is stored in the local system, and translating the information through the translation database;

the third-party translation module is used for inquiring the type of a translation tool corresponding to the translation of the analyzed information into the target language and selecting the used translation tool when a translation database corresponding to the translation of the analyzed information into the target language is not stored in the local system; and the information is translated by the queried translation tool.

The invention discloses an auxiliary translation method and an auxiliary translation system, wherein an Android device end is used for monitoring whether display content in a current display interface is changed; if the change occurs, acquiring the text information on the interface, and uploading the text information to a server side; the server receives the text information uploaded by the Android equipment terminal, analyzes the text information, translates the analyzed information into a target language, and sends the translated target language information to the WEB equipment terminal; and the WEB equipment end receives the target language information sent by the server end and displays the target language information. According to the method and the system, the server is used for automatically translating the acquired information and transmitting the information to the WEB equipment end for displaying, so that the working efficiency is improved, the development time is saved, the labor cost is reduced, and the test difficulty is reduced; the vulnerability of repeated debugging failure caused by the fact that translation cannot be compared when translation testing is carried out is avoided, multi-device comparison is not needed, simultaneous operation can be carried out, equipment requirements are reduced, and translation cost and environment requirements are reduced.

It should be understood that equivalents and modifications of the technical solution and inventive concept thereof may occur to those skilled in the art, and all such modifications and alterations should fall within the scope of the appended claims.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种转换中文、英文语言的信息沟通方法及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!