Translation method, device, storage medium and electronic device

By obtaining the first position selected by the user in the page to be translated, determining the second position of the selection mark, and displaying the selection mark at that position, the problem of low translation efficiency in the prior art is solved, and the convenience of fast positioning and translation is achieved.

CN114580447BActive Publication Date: 2025-04-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210259874.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2025-04-01
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

The existing translation technology is difficult to quickly locate and translate content in the target area in the page to be translated, and it is easy to reduce translation efficiency due to the complex operation path.

Method used

By obtaining the first position selected by the user in the page to be translated, a second position for the selection flag is determined based on the position, and a selection flag is displayed at the second position, thereby quickly assisting the user in positioning the translation object, avoiding occlusion, and shortening the translation operation path.

Benefits of technology

It quickly translates content in the target area, optimizes the translation process, improves the convenience and efficiency of translation, and avoids the reduction in translation efficiency caused by operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580447B_ABST
    Figure CN114580447B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a translation method, device, storage medium and electronic device, wherein the method comprises: obtaining a first position selected in a page to be translated, determining a second position for a selection mark based on the first position, displaying the selection mark at the first position, the first position being different from the second position, determining a target area corresponding to the selection mark, and determining a translation result of a translation object in the target area. The embodiment of the present application can improve the convenience of translation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a translation method, device, storage medium and electronic device. Background Art

[0002] In recent years, with the improvement and popularization of various translation software and translation tools applied to terminals, the language barrier has been broken for users. In the daily use of terminals, when users browse the information on the terminal page to be translated, such as encountering information that they cannot read or understand, the process of translating the information is usually involved. Summary of the invention

[0003] The present application provides a translation method, device, storage medium and electronic device, and the technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a translation method, the method comprising:

[0005] Get the first position selected in the page to be translated;

[0006] determining a second position for a selection mark based on the first position, and displaying the selection mark at the first position, wherein the first position is different from the second position;

[0007] A target area corresponding to the selection mark is determined, and a translation result of the translation object in the target area is determined.

[0008] In a second aspect, an embodiment of the present application provides a translation device, the device comprising:

[0009] A mark display module, used for acquiring a first position selected in the page to be translated, determining a second position for a selection mark based on the first position, and displaying the selection mark at the first position, wherein the first position is different from the second position;

[0010] The object translation module is used to determine the target area corresponding to the selection mark and determine the translation result of the translation object in the target area.

[0011] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0012] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0013] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0014] In one or more embodiments of the present application, by obtaining the first position selected by the user in the page to be translated, determining the second position for the selection mark based on the first position, and then displaying the selection mark at the second position different from the first position, by determining the target area corresponding to the selection mark, the translation object in the target area can be quickly translated, and the translation result of the translation object in the target area can be determined. In the above manner, by displaying the selection mark at the second position other than the first position selected by the user, the user can be quickly assisted to locate the translation object based on the selection mark, and the obstruction of the translation object can be avoided; the entire translation process shortens the translation operation path, optimizes the translation process, and improves the convenience of translation. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 It is a flowchart of a translation method provided in an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of a scene of a display page involved in the translation method provided in an embodiment of the present application;

[0018] Figure 3 It is a scene schematic diagram of a translation tool involved in the translation method provided in the embodiment of the present application;

[0019] Figure 4 It is a schematic diagram of a scenario of selecting a mark involved in the translation method provided in an embodiment of the present application;

[0020] Figure 5 It is a flowchart of another translation method provided in an embodiment of the present application;

[0021] Figure 6 It is a schematic diagram of a scenario triggered by a translation control involved in the translation method provided in an embodiment of the present application;

[0022] Figure 7 It is a flowchart of another translation method provided in an embodiment of the present application;

[0023] Figure 8It is a schematic diagram of a scene of a sign display range involved in the translation method provided in an embodiment of the present application;

[0024] Fig. 9 is a schematic diagram of a scene in which a selection mark is displayed in the translation method provided in an embodiment of the present application;

[0025] Fig.10 It is a schematic diagram of an interface of a translation control involved in the translation method provided in an embodiment of the present application;

[0026] Fig.11 It is a schematic diagram of an interface for displaying translation results on a terminal involved in the translation method provided in an embodiment of the present application;

[0027] Fig.12 It is a schematic diagram of another interface for displaying translation results on a terminal involved in the translation method provided in an embodiment of the present application;

[0028] Fig.13 is a structural schematic diagram of a translation device provided in an embodiment of the present application;

[0029] Fig.14 is a structural schematic diagram of a sign display module provided in an embodiment of the present application;

[0030] Fig.15 is a structural diagram of a position determination unit provided in an embodiment of the present application;

[0031] Fig.16 is a structural diagram of an object translation module provided in an embodiment of the present application;

[0032] Fig.17 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0033] Fig.18 It is a schematic diagram of the structure of the operating system and user space provided in the embodiment of the present application;

[0034] Fig.19 yes Fig.18 The architecture diagram of the Android operating system;

[0035] Fig. 20 yes Fig.18 Architecture diagram of the IOS operating system. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0037] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0038] The present application is described in detail below with reference to specific embodiments.

[0039] In one embodiment, Figure 1 As shown, a translation method is proposed, which can be implemented by a computer program and can be run on a translation device based on the von Neumann system. The computer program can be integrated in an application or run as an independent tool application. The translation device can be a terminal device, including but not limited to: a personal computer, a tablet computer, a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem. In different networks, terminal devices can be called different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, 5G network or terminal device in future evolution network, etc.

[0040] Specifically, the translation method includes:

[0041] S101: Acquire a first position selected in a page to be translated, and determine a second position for a selection mark based on the first position;

[0042] The first position can be understood as the operation position corresponding to the human-computer interaction operation (such as translation operation) when the user inputs the human-computer interaction operation in the interface to be translated; schematically, during the whole process in which the user intends to translate the translation object in the interface to be translated, the user can input a touch operation to touch the page to be translated of the terminal first, and the touch operation can be used to trigger the operation of the translation control on the page to be translated of the terminal, such as activating the translation control by inputting a touch operation and dragging the translation control to the user's desired translation position. In this process, the touch position corresponding to the touch operation is also the first position.

[0043] Optionally, the terminal may monitor the target operation (such as a touch operation, a press operation, a click operation, etc.) input by the user for the page to be translated, and when the target operation is monitored, the operation position corresponding to the target operation is used as the position selected by the user through the input operation on the page to be translated. It is understandable that if the user continues to input the target operation (such as the target operation may be a drag operation) over a period of time, the first position continues to change.

[0044] In a specific implementation scenario, the translation of the translation object can usually be implemented based on a translation control, and the user can complete the entire translation process by triggering the translation control. In some implementations, the translation control triggered by the user can be referred to as a first translation control.

[0045] Indicatively, the translation control (such as the first translation control) can be understood as a control for realizing the translation and recognition function of the text in the specified entry, text, text, and image; in one or more embodiments, the first translation control is usually used to start the translation and recognition function. In practical applications, the first translation control can be displayed on the terminal's to-be-translated page in a specified image (such as a circle or a triangle). When the user triggers the first translation control by inputting the corresponding target operation on the terminal, the information recognition function of the first translation control can be triggered, such as double-clicking, single-clicking, and long pressing the first recognition control. Further, after the user triggers the first translation control by inputting the corresponding target operation, the terminal can control the first translation control to move based on the user's target operation (which can be understood as controlling the first translation control to perform operation follow-up processing, and the first translation control changes the current control display position in real time with the movement of the operation position indicated by the user's target operation), so that during the movement of the first translation control, the user can control the movement of the first translation control to approach or be close to the location of the translation area that the user expects to recognize. In the aforementioned process, the operation position corresponding to the target operation input by the user on the to-be-translated interface can also be regarded as the first position selected by the user in the to-be-translated interface.

[0046] S102: determining a second position for a selection mark based on the first position, and displaying the selection mark at the first position, wherein the first position is different from the second position;

[0047] The selection mark may generally be displayed in the form of an icon or pattern on the page to be translated. In some embodiments, the selection mark may be a control, and the selection mark is used to predict a reference translation position (i.e., a second position) that the user may select based on the selected first position and is displayed in the form of a mark at the reference translation position (i.e., the second position).

[0048] In some embodiments, the display mark can be used in conjunction with a translation control (such as a first translation control). When a user inputs a corresponding target operation to trigger the first translation control, and controls the movement of the first translation control through the target operation, the control display position of the first translation control usually matches (e.g., has the same position as) the first position corresponding to the input target operation. In some embodiments, the selection mark can be presented above the translation control.

[0049] In some embodiments, the selection mark may be displayed on the page to be translated in the form of a pattern mark, and the selection mark may prompt the user whether to select the second position where the selection mark is located for translation processing. The display position of the selection mark is usually different from the display position of the first translation control (such as the first position), and the display position of the first translation control is usually the operation touch position (that is, the first position); the display position of the selection mark and the operation touch position may be separated by a certain distance (such as displayed above the first position). For example, the user inputs the target operation by finger touch to trigger the first translation control to move closer to the user's desired translation area (or translation position). In the process of the user triggering the first translation control to move, the moving position of the first translation control is also the first position corresponding to the target operation. Based on the first position, the second position is determined to display the selection mark, wherein the second position displayed by the selection mark is usually different from the first position and separated by a certain distance.

[0050] In some embodiments, the user controls the movement of the first translation control through the corresponding target operation. The terminal can determine the second position in real time based on the first position selected for movement of the first translation control, and display a selection mark at the second position to prompt the user whether the second position where the selection mark is located or the area where the second position is located is selected to translate the translation object therein. During the entire translation process, prompting whether the translation is selected in the form of a selection mark can quickly locate the translation object, shorten the user's translation operation path, and improve translation efficiency. In addition, considering that the user usually blocks the display elements at the operation position when performing a target operation, such as when a finger touches a certain position, the finger will block the text or image at the certain position. By determining the second position based on the first position to display the selection mark at the second position, the effect of preventing the translation object from being blocked can be achieved.

[0051] It can be understood that when the user inputs a target operation (such as a move operation) for the first translation control on the terminal, the translation recognition function of the control can be triggered, such as double-clicking, single-clicking, and long pressing the first translation control.

[0052] In a specific implementation scenario, the terminal may receive a moving operation (which may be an operation in any form of operation) inputted by a user for a first translation control on a displayed page, and the terminal may control the first translation to move based on a first position corresponding to the moving operation in response to the moving operation for the first translation control on the page to be translated; in the process of moving the first translation control, each first position corresponding to the moving operation on the page to be translated is obtained in real time, so as to determine a second position in real time based on each first position, so as to display a selection mark at the second position;

[0053] It can be understood that the moving operation can be an operation of dragging the control to move the first translation control input. The user continues to input the first translation operation for the first translation control by dragging the control. During the process of dragging the first translation control to move, the terminal can obtain the user's moving position for the first translation control, specifically by obtaining the first position corresponding to the moving operation as its corresponding moving position.

[0054] In a specific implementation scenario, the first translation control of the terminal may be displayed at a certain position on the page to be translated. For example, after the user triggers a specific function, the first translation control may be displayed on the page to be translated, such as Figure 2 As shown, in Figure 2 In the reading page shown, the first translation control is a circular button control 10. Figure 2When reading English text on the page to be translated as shown, in the scenario where an uncommon word or sentence is encountered, the user usually needs to translate the text on the reading page. The user can input a moving operation for the button control 10 on the currently displayed page. The moving operation can be an operation of controlling the control 10 to move close to or near the user's desired translation position; schematically, the moving operation can be a dragging operation in which the user selects the object-translation control on the current page to be translated without removing the finger from the screen. When the terminal recognizes the user's dragging operation on the button control 10, it responds to the dragging operation and determines the dragging position (that is, the first position) in real time or periodically as the user's moving position for the first translation control 10. The terminal can determine the second position based on the first position for the first translation control (such as the second position can be above the first position), and display a selection mark at the second position to prompt the user to select whether the position or area where the mark is located is selected to translate the translation object at the position or area. Figure 4 As shown, Figure 4 It is a scene diagram of selecting a sign. Figure 4 In the figure, label 20 is a selection mark, label 10 is a first position of the current user in the process of moving the first translation control. The position where the selection mark 20 is displayed is usually outside the moving position and no longer on the first translation control to avoid visual obstruction. Based on the second position of the selection mark 20 or the area where the second position is located, the user can be intuitively prompted whether to select the translation.

[0055] It can be understood that the second position corresponding to the selection mark is separated from the first position by a certain distance (such as displayed above the operation touch position), and the prompt in the form of a selection mark will not block the corresponding text content. Through the selection mark, the user can intuitively locate the translation object at the "selection mark" during the movement, and the terminal can also quickly obtain the located translation object, shortening the user's translation operation path and improving translation efficiency.

[0056] In a feasible implementation, the terminal may have a translation tool that integrates at least one translation function. The translation tool can be understood as a control. The translation tool control may include at least a first translation control. The translation function corresponding to the first translation control is usually triggered by the user to translate the corresponding translation object to a specified area, such as the user moves the first translation control to the specified area to translate the text in the specified area; in one or more embodiments, the translation tool control may also include a third translation control with a global translation function. After the translation function corresponding to the third translation control is triggered, the terminal automatically translates all content objects on the current page.

[0057] Illustratively, the terminal can display the translation tool in the page to be translated. When the user operates the terminal to open the target page, the target mode is turned on, the target function is turned on, etc., the terminal automatically displays the translation tool on the current display page, such as floating the translation tool. It can be understood that the translation tool can be understood as a collection of at least one translation control with corresponding translation functions. In some embodiments, the translation tool can be represented in the form of a translation panel, such as Figure 3 As shown, Figure 3 is a scene diagram of a translation tool involved in an embodiment of the present application, in Figure 3 In the example, when the user browses a reading page, the terminal displays a translation tool-translation panel 40 on the current reading page, and the translation panel at least includes a first translation control (such as Figure 3 The free translation control shown in the ) option and the third translation control (as Figure 3 ) option shown in the full screen translation controls.

[0058] In a specific implementation scenario, the terminal can respond to the target operation on the third translation control and perform full-screen translation on the page to be translated. Figure 3 Select the third translation control (such as Figure 3 The full-screen translation control option shown in the figure) can trigger the full-screen translation function to perform full-screen translation on the page to be translated; for example, Figure 3 Click "Full Screen Translation" on the translation panel to enter the full screen translation mode, and the translation panel will be folded; the terminal control enters the full screen translation mode, loads the top-to-bottom light scanning animation, and starts to translate the screen content;

[0059] Indicative, such as Figure 3 As shown, the user can select the first translation control (such as Figure 3 In the first translation control (such as Figure 3 After selecting the free translation control shown in (the translation tool-translation panel 40 is hidden), as shown in Figure 2 As shown, the terminal displays the first translation control 10 in the current page to be translated, and the user can input a moving operation (such as a dragging operation on the first translation control) for the first translation control in the translation tool. The moving operation corresponds to the first position. The terminal can respond to the moving operation on the first translation control in the translation tool and control the movement of the first translation control based on the first position corresponding to the moving operation. During the movement of the first translation control 10, the next first position in the first translation control targeted by the user is obtained. The first position corresponding to the moving operation can be obtained periodically or in real time as the moving position, and the second position is determined based on each first position to display a selection mark at the second position, such as Figure 4 As shown, reference numeral 10 is a first position in the process of the current user moving the first translation control, and reference numeral 20 is a selection mark, which prompts the user to select whether the second position or the area of ​​the second position where the selection mark is located is selected to translate the corresponding translation object.

[0060] It is understandable that after the first translation control is triggered, the control image of the first translation control may obstruct the text on the page to be translated. In order to reduce the obstruction, the terminal may perform hidden display processing on the first translation control, and use the user's operation position of the first translation control as the moving position, and load the selection mark based on the moving position.

[0061] Illustratively, at time t0, the user triggers the first translation control by inputting a moving operation, and the touch operation may be a moving operation in which the finger does not leave the screen for a period of time with t0 as the starting touch time (such as dragging the first translation control to move), and the terminal detects at time t0 that the first translation control is triggered, and the user inputs the moving operation intention to continuously control the first translation control to move to the position where the user expects the translation, and the terminal controls the first translation control to move based on each first position corresponding to the moving operation, and at the same time, the terminal may use the first position corresponding to the moving operation obtained as the moving position of the first translation control at time t0 or a certain time t after time t0, and then determine the second position based on the first position, and display the selection mark at the second position;

[0062] Further, after triggering the first translation control, the terminal may perform a hidden display process on the first translation control. Schematically, the first translation control may be controlled to reduce the control image parameters (such as image brightness) to achieve the purpose of the hidden display process and prompt the user to select the translation object with the display selection mark loaded at the second position. It can be understood that the hidden display process of the first translation control may not present or display the pattern of the first translation control visually, and the first translation control may be displayed instead of the selection mark, so that the translation object selection process is moved forward by the selection mark, shortening the translation path.

[0063] It can be understood that the display position of the display mark is based on the selected first position corresponding to the moving operation input by the user for the first translation control as a reference, and the second position is determined by the first position and the selection mark is displayed at the second position. The selection mark can predict the position that the user expects to select during the process of the user operating the first translation control to move. When the position of the selection mark matches the position that the user expects to select, the user can end the output of the moving operation, and the translation object indicated by the selection mark can be determined for translation, so that the content that needs to be translated can be quickly located.

[0064] S103: Determine a target area corresponding to the selection mark, and determine a translation result of the translation object in the target area.

[0065] It can be understood that the user controls the movement of the first translation control through corresponding operations, and the terminal can display the selection mark at the second position based on the moving position of the first translation control in real time. That is to say, the display mark is based on the position change of the first position selected by the user input for the first translation control, and the display position of the display mark, that is, the second position, also changes accordingly. For example, the user can input a drag operation for the first translation control, and the drag position of the drag operation, that is, the first position, changes within a period of time, and the selection mark at the second position displayed based on the drag position also moves accordingly.

[0066] It can be understood that when the selection mark displayed based on the moving position stops moving, the terminal can obtain the target area corresponding to the position where the selection mark stops moving, and then translate the translation object in the target area.

[0067] It can be understood that the terminal can obtain the position after the selection mark stops moving, determine the target area based on the text content around the position, and then translate the translation object in the target area. It can be understood that translation is language translation, which can include translating the text of the translation object in any language into text in another language. For example, English text can be translated into Chinese text, and Chinese text can also be translated into English text.

[0068] Further, the translation result of the translation can be outputted. After the translation result is obtained, the translation result can be outputted. In the embodiment of the present application, there are multiple ways to output the translation result.

[0069] In an illustrative manner, the translation result can be displayed. It should be noted that the purpose of the user triggering the translation in the interface may be to enable the user to better recognize the content of the text. For example, if the text in the interface is in English, but the user may not be very familiar with English, then the user may want to convert the text in the interface into familiar Chinese. After obtaining the translation result, the translation result can be displayed.

[0070] Indicatively, the translation result can be displayed by the result to be translated page. Wherein, the display position of the result to be translated page can be determined according to the actual situation. For example, if the translation object corresponding to the target area itself is in the upper position in the interface, then the result to be translated page can be displayed in the relatively lower position in the interface, and correspondingly, if the translation object corresponding to the target area is in the lower position in the interface, then the result to be translated page can be displayed in the relatively upper position in the interface, thereby avoiding the result to be translated page and the translation object corresponding to the target area from occupying the display position mutually in this way. Furthermore, if the target area itself occupies most of the display screen area, the result to be translated page can be suspended and displayed in the middle position of the display screen.

[0071] Illustratively, the translation result can be directly overlaid on the translation object in the target area, so that the user can read the translated content conveniently; further, the layout of the translation result can be controlled to be relatively consistent with the translation object.

[0072] In an embodiment of the present application, by obtaining the first position selected by the user in the page to be translated, determining the second position for the selection mark based on the first position, and then displaying the selection mark at the second position different from the first position, by determining the target area corresponding to the selection mark, the translation object in the target area can be quickly translated, and the translation result of the translation object in the target area can be determined. In the above manner, by displaying the selection mark at the second position other than the first position selected by the user, the user can be quickly assisted to locate the translation object based on the selection mark, and the obstruction of the translation object can be avoided; the entire translation process shortens the translation operation path, optimizes the translation process, and improves the convenience of translation; and the entire translation process does not require the user to gradually frame the identification area throughout the entire process, which can shorten the regional operation path during the translation process and save regional selection time.

[0073] See also Figure 5 , Figure 5 This is a flowchart of another embodiment of a translation method proposed in this application. Specifically:

[0074] S201: receiving a move operation on a first translation control in a page to be translated, and obtaining a first position corresponding to the move operation.

[0075] In one or more embodiments, the first translation control may be understood as a control for implementing a translation and recognition function for a specified term, text, word, or text in an image.

[0076] Schematically, the first translation control is usually used to start the translation recognition function. In actual applications, the first translation control can be displayed on the terminal's to-be-translated page with a specified image (such as a circle or a triangle). When the user triggers the first translation control by inputting a moving operation on the terminal, the information recognition function of the first translation control can be triggered, such as double-clicking, single-clicking, and long pressing the first recognition control. Further, the user moves after triggering the first translation control by inputting a moving operation, and the terminal can control the first translation control to move based on the first position corresponding to the user's moving operation (the first position is also the operating position of the moving operation during the moving process) (which can be understood as controlling the first translation control to perform operation follow-up processing, and the first translation control changes the current control display position in real time with the movement of each first position indicated by the user's moving operation), so that during the movement of the first translation control, the user can control the movement of the first translation control to approach or be close to the location of the translation area that the user expects to identify. In the aforementioned process, the operating position corresponding to the moving operation input by the user on the to-be-translated interface can also be regarded as the first position selected by the user in the to-be-translated interface.

[0077] S202: Acquire a target angle and a target distance for a selection mark, and determine a second position indicated by the target angle and the target distance with reference to the first position.

[0078] The second position is the display position of the selection mark on the page to be translated;

[0079] The target angle can be understood as the angle between the first position and the second position;

[0080] The target distance can be understood as the distance between the first position and the second position;

[0081] In a feasible implementation, the target angle may be preset; the target distance may be preset. Schematically, after determining the first position, the position of the second position may be determined based on the preset target angle and target distance with the first position as a reference, as the second position.

[0082] In a feasible implementation, the target distance or target angle can be determined based on the operation parameters of the moving operation for the first translation control (such as operation force, touch operation area, moving speed, moving angle, etc.), that is, the target distance and target angle are not fixed values ​​but may change accordingly. For example, during the moving process, the operation parameters of the moving operation are obtained in real time or periodically, and the target angle and / or target distance are determined accordingly based on the change of the operation parameters. For example, the greater the operation force, the greater the target distance or the greater the target angle; for example, the target angle is the same as the moving angle and changes with the moving angle; for example, the faster the moving speed, the greater the target distance, and so on.

[0083] Optionally, a first mapping relationship between at least one reference operation parameter and a "reference distance" and a second mapping relationship between at least one reference operation parameter and a "reference angle" may be pre-established, and the mapping relationship may be represented in the form of a mapping set, a mapping list, a mapping array, etc. The operation parameters of the mobile operation are acquired in real time or periodically, and then the target distance corresponding to the operation parameters is determined based on the first mapping relationship, and / or the target angle corresponding to the operation parameters is determined based on the second mapping relationship, and then the second position indicated by the target angle and / or the target distance is determined with reference to the first position;

[0084] Optionally, the numerical sign of the target angle or target distance can also be changed based on the operation position of the moving operation. For example, when the moving position falls into the reference area corresponding to the lower left corner of the display interface, the numerical sign of the target angle or target distance (i.e., positive sign or negative sign) can be changed so that the selection mark is displayed in the upper right corner of the moving position. That is to say, a numerical sign mapping relationship between at least one reference area and a numerical sign (i.e., positive sign or negative sign) is pre-set, and then it is determined whether the moving position falls into the target area of ​​at least one reference area. If so, the numerical sign corresponding to the target area is obtained, and the positive or negative of the target angle or target distance is adjusted based on the current numerical sign, so that when the moving position is close to the peripheral side of the display interface, the display position of the selection mark can be adaptively adjusted to avoid the second position corresponding to the selection mark being out of the user's visual range.

[0085] In a feasible implementation, the selection mark usually changes based on the change of the first position. During the movement of the selection mark, the current target distance or target angle can be fine-tuned based on the operating parameters of the moving operation (such as the touch operation force and the touch operation area). A mapping relationship between at least one reference operating parameter and the fine-tuning factor can be established in advance. The mapping relationship can be represented in the form of a mapping set, a mapping list, a mapping array, etc. The operating parameters of the moving operation are obtained in real time or periodically, and then the target fine-tuning factor corresponding to the touch operation is determined based on the aforementioned mapping relationship. Then, the target angle and / or target distance are numerically fine-tuned based on the target fine-tuning factor to obtain the target angle and target distance after the numerical fine-tuning. Then, the second position indicated by the target angle and target distance is determined with reference to the first position. For example, the difference between the target fine-tuning factor and the target angle and / or target distance, the product of the difference between the target fine-tuning factor and the target angle and / or target distance, and so on can be calculated.

[0086] S203: Determine a reference area based on the second position, obtain at least one reference position corresponding to the reference area, and determine a second position for the selection mark from the at least one reference position.

[0087] The reference area is used to include the text content around the first position as a reference, and the area corresponding to all the text display content included in the reference is also the reference area; in some embodiments, the area size of the reference area is usually smaller than the area size of the page to be translated.

[0088] The reference area may contain reference translation objects selected by the user. The reference translation objects (such as keywords, key sentences, key paragraphs, etc. of the reference translation) that may be selected by the user for the page to be translated are predicted based on the text content of the reference area, and the position of the reference translation object is also the reference position.

[0089] In a feasible implementation, the reference area may be determined based on the reference area specification with the first position as a reference, for example: taking the first position as a reference point, determining the reference area indicated by the target area specification;

[0090] Optionally, the reference area specification may be pre-set. That is, a target area specification is pre-set, and after determining the first position, the corresponding reference area is determined based on the target area specification, and all text contents such as pictures, animations, tables, etc. are extracted from the reference area to obtain the text information in the reference area. Thus, the text information in the reference area is included in the reference to determine the reference position corresponding to the "reference translation object that may be selected by the user" in the reference area.

[0091] Optionally, the reference area specification can be: by obtaining the operation displacement characteristics of the moving operation, the operation displacement characteristics include at least one of the first position, touch force characteristics, touch direction characteristics, touch duration characteristics, touch point quantity characteristics, etc. Based on the operation displacement characteristics, the reference area of ​​the text content can be accurately predicted. For example, when the touch force characteristic feedback shows that the touch force is large, the current first position can be used as a reference point to include most of the surrounding text content for reference, thereby determining the target display area; when the touch point quantity characteristic feedback shows that there are many touch points, the current first position can be used as a reference point to include most of the surrounding text content for reference, which can be understood as determining a target area specification.

[0092] In a feasible implementation, a region specification model can be trained to obtain operation displacement features for mobile operations, input the operation displacement features into the trained region specification model, and output the target region specifications corresponding to the operation displacement features, wherein the target region specifications include region size, region shape, etc. Then, using the first position as a reference point, the target display region indicated by the target region specification is determined. It can be understood that the first position is used as a reference point, and the target region specification can indicate a target display region with reference to the reference point, such as using the reference point as the center point of the region, to determine the reference region corresponding to the target region specification.

[0093] It can be understood that the regional specification model can be implemented by fitting one or more models based on deep learning algorithms, such as Convolutional Neural Network (CNN) model, Deep Neural Network (DNN) model, Recurrent Neural Networks (RNN) model, embedding model, Gradient Boosting Decision Tree (GBDT) model, Logistic Regression (LR) model, etc.

[0094] In one or more embodiments, at least one reference position corresponding to the reference area can be obtained. In a specific implementation, the text content in the reference area can be obtained, at least one reference translation object can be determined based on the text content, the reference position corresponding to the at least one reference translation object can be obtained, and then the second position for the selection mark can be determined from the at least one reference position.

[0095] Usually, the reference translation object determined based on the reference area can cover the recognition content expected by the user with a high probability. By displaying the selection mark based on the reference position of the reference translation object, the translation object that the user needs to select can be predicted, and the content to be translated can be quickly located, thereby improving the efficiency of translation.

[0096] In a feasible implementation manner, the terminal determines at least one reference translation object based on the text content, which may be: performing semantic recognition on the text content, determining at least one key text in the text content, and using the at least one key text as a reference translation object;

[0097] It can be understood that semantic recognition processing is performed on the text content, and at least one of the key texts such as key fields, key segments, key sentences, etc. in the text content is determined after semantic recognition processing. At least one key text is determined based on the text content, and the key text is used as a reference translation object, that is, the second position is determined from the reference position corresponding to the reference translation object; it can be understood that the terminal determines the area where the key character information (that is, the key text) in the text content is located by performing semantic extraction and semantic understanding on the text content. Usually, the display position where the key text is located can be used as the predicted reference translation object. The number of reference translation objects can be multiple. Usually, the position where the key text is located is often the position that the user expects to select and identify with a high probability. This can assist the user to quickly determine the translation object in advance, save the user operation path during translation, and improve the efficiency of translation.

[0098] In a feasible implementation manner, the terminal determines at least one reference translation object based on the text content by: obtaining a historical translation record corresponding to the text content, and obtaining at least one reference translation object from the historical translation record.

[0099] The historical translation record includes translation data of at least one user terminal on a historical display page. In some embodiments, the display page browsed by the current user of the terminal (i.e., the page to be translated) may have other users who have browsed the historical display page, or browsed the historical display page of the same type as the display page; when these users browse the historical display page, there may be a situation where the historical text content of a certain area is translated. Based on this, the present application can refer to the historical text content of at least one user terminal on the historical display page when determining the reference translation object; for example, there are multiple user terminals that translate the historical text content of multiple areas on the historical display page, which usually corresponds to multiple historical text contents (such as historically translated words, sentences, paragraphs, etc.), and the terminal can use the historical text content as a reference translation object.

[0100] It can be understood that the terminal can use key semantic features (such as keywords, titles, etc.) as content identifiers of text content. It can be understood that the terminal can request at least one historical translation record of a user visiting a historical display page from the server based on the key semantic features. The content of the historical display page and the current display page can be the same or of the same type; in some embodiments, the historical display page and the display page display the same content, the difference lies in the time dimension, the historical display page is the interface of the previous display content, and the page to be translated is the interface of the current time.

[0101] S204: Displaying the selection mark at the second position, the second position being different from the second position.

[0102] For details, please refer to the method steps of one or more embodiments involved in this application, which will not be repeated here.

[0103] S205: Acquire a control touch state of the first translation control.

[0104] S206: If the touch state of the control is the stop touch state, obtain the target position corresponding to the selection mark, and determine the target area corresponding to the target position.

[0105] The touch state can at least be a touch moving state and a stop touch state; the terminal can obtain the user's touch state of the first translation control in real time or periodically, and determine whether the touch state is a stop touch state. When the touch state is a stop touch state, the terminal can determine the second position currently corresponding to the selection mark.

[0106] It can be understood that the user inputs a moving operation on the first translation control on the page to be translated, and based on the moving operation, controls the first translation control to move close to or close to the translation object to be identified, and displays a selection mark during the movement of the first translation control to prompt the user whether to select the translation object corresponding to the selection mark. Usually, during the movement of the first translation control: the touch state of the first translation control is the touch moving state; for example, the user continuously inputs a drag operation on the first translation control to control the movement of the first translation control, and at the same time displays the selection mark based on the first position. When the position of the selection mark covers the translation object that the user expects to select, the user stops inputting the drag operation, and the touch state of the first translation control monitored by the terminal is the stop touch state. The terminal responds to the stop touch state to determine the target position where the selection mark is currently located.

[0107] Illustratively, the user can continuously input a moving operation, that is, a dragging operation, on the icon of the first translation control by touching the icon with a finger at time t0, such as Figure 6 As shown, Figure 6 is a schematic diagram of a scenario triggered by a translation control, wherein the drag operation may be as follows Figure 6 After the user selects the dragged display object - the first translation control 10 on the current page to be translated, the finger does not leave the screen to perform the dragging operation, and during the dragging process; further, the dragged display object - the first translation control 10 can move with the movement of the finger. At the same time, in order to avoid blocking the text content of the page to be translated during the movement of the first translation control 10, the terminal can hide the display of the first translation control 10 after detecting the dragging operation at time t0, for example, controlling the image parameters of the first translation control 10 (such as image brightness) to gradually weaken; for example: the first translation control 10 can be controlled to move with the movement of the finger but the control image is not displayed, such as Figure 6As shown, when the user controls the first translation control 10 to move to point A, the first translation control performs the hidden display processing and no longer displays the information such as Figure 2 The control image of the first translation control 10 before being triggered is shown. It can be understood that the first translation control 10 is detected to be triggered at time t0, and the terminal displays a selection mark 20 (displayed outside point A) based on the first position A point of the first translation control 10 after obtaining the first position of the first translation control 10 after time t0 (it can be understood that there will be a certain operation delay from triggering the first translation control 10 to starting to move) to prompt the user whether to select the translation object corresponding to the selection mark. Usually, during the continuous movement process after the first translation control is triggered: the user's touch state for the first translation control is the touch movement state, and during the continuous input drag operation process, the second position is determined based on the first position corresponding to the drag operation, and the selection mark is displayed at the second position. When the position of the selection mark covers the translation object that the user expects to select, for example, during the continuous input drag operation process, the user moves to Figure 6 When the first position B is shown, the position of the selection mark 20 covers the translation object that the user expects to select, and the user stops inputting the drag operation. At this time, the touch state of the first translation control detected by the terminal is the stop touch state. The terminal responds to the stop touch state to determine the current target position of the selection mark. It can be understood that the target position at this time is the position C corresponding to the selection mark displayed based on the first position B.

[0108] It should be noted that movement operations such as dragging operations and tapping operations for controlling the translation control to move can be performed through external devices such as a mouse, a laser pen, and the like.

[0109] The target area may be an area where the text content corresponding to the target position is located, for example, it may be an area corresponding to key text in some embodiments; for example, it may be an area corresponding to a sentence corresponding to the target position; for example, it may be an area corresponding to a paragraph corresponding to the target position; for example, it may be an area corresponding to a character corresponding to the target position; and so on.

[0110] The content displayed in the target area is the translation object, and the translation object may include at least one character.

[0111] It is understandable that after determining the target position corresponding to the selection mark, the terminal can obtain the target area corresponding to the target position. For example, the target area where the text content (such as key text (keywords, keywords, key sentences), sentences, paragraphs, characters) at the target position is located is obtained to obtain the regional content (such as text content) in the target area as the translation object.

[0112] Optionally, based on the target position, the region of the entire line or multiple lines of reference text at the target position can be determined as the target region, or a preset range of the line at the target position can be determined as the target region, so as to obtain the text content in the target region as the translation object, and translate the translation object in the target region.

[0113] S207: Determine the translation result of the translation object in the target area.

[0114] In a feasible implementation, the terminal can perform optical character recognition on display elements (such as text, images, icons) in the target area through a text recognition method based on optical character recognition (OCR), and the recognition method is to use a display image indicated in the target area (which can be a screenshot of the target area), such as selecting a certain area at the target position as the target area to obtain a display image corresponding to the target area, detecting dark and light patterns of the rendered display image to determine its character shape, and then using a character recognition method to translate the shape into computer text; that is, for the characters on the page to be translated, optically convert the text on the page to be translated into a black and white dot matrix image file, and convert the text in the image into a text format (such as in the form of a character string) through a text recognition method based on optical character recognition (OCR), thereby obtaining the recognized translation object.

[0115] In a feasible implementation, the terminal translates the translation object. It can be to translate the text content of the translation object from the current language into another language, such as translating the text content of English into Chinese. The terminal calls the set translation software interface to call the software to perform language translation on the text content of the obtained translation object. Among them, the corresponding translation software interface can be a certain translation software that is set, and the translation software can be a translation application installed locally in the terminal, such as Kingsoft Dictionary, Youdao Translation, Baidu Translation, etc., or it can be a translation network interface of a translation software service provided on the network, such as Google Network Translation. Among them, after obtaining the translation result, it is output and displayed, and the translation result can be displayed by popping up a text box or a specific display area on the current page to be translated in the terminal.

[0116] In an embodiment of the present application, by obtaining the first position selected by the user in the page to be translated, determining the second position for the selection mark based on the first position, and then displaying the selection mark at a second position different from the first position, by determining the target area corresponding to the selection mark, the translation object in the target area can be quickly translated, and the translation result of the translation object in the target area can be determined. By displaying the selection mark at a second position other than the first position selected by the user in the above manner, the user can be quickly assisted to locate the translation object based on the selection mark, and the obstruction of the translation object can be avoided; the entire translation process shortens the translation operation path, optimizes the translation process, and improves the convenience of translation; and, based on the first position, the second position is determined and the second position does not overlap with the first position, so that the display mark is accurately displayed, and the position that the user expects to select can be accurately predicted; and, the entire translation process does not require the user to gradually frame the identification area throughout the entire process, which can shorten the regional operation path during the translation process and save regional selection time.

[0117] See also Figure 7 , Figure 7 This is a flowchart of another embodiment of a translation method proposed in this application. Specifically:

[0118] S301: receiving a move operation on a first translation control in a page to be translated, and obtaining a first position corresponding to the move operation.

[0119] For details, please refer to the method steps of one or more embodiments involved in this application, which will not be repeated here.

[0120] S302: Acquire a mark display range for a selection mark, and determine that the first position is within the mark display range;

[0121] S303: Determine a second position for the selection mark based on the first position, and display the selection mark at the second position, wherein the second position is different from the second position.

[0122] The mark display range is used to determine whether the first position of the first translation control falls within the mark display range during the movement of the first translation control. If so, a selection mark is loaded and displayed. It can be understood that when the first position of the first translation control is outside the mark display range, the terminal does not display the selection mark.

[0123] The logo display range may be a pre-set area range, or may be an area translation determined by performing text detection on the page to be translated.

[0124] In one or more embodiments, the selection mark may be understood as a control used in conjunction with the first translation control;

[0125] In one or more embodiments, the selection mark may be another image control form of the first translation control in a specific state; for example, the first translation control is displayed outside the mark display range as a default display icon, and the first translation control is displayed within the mark display range in the form of a selection mark. It should be noted that when the first translation control is displayed outside the mark display range as a default display icon: the default display image is displayed at the first position of the user for the first translation control, and usually the first position of the first translation control matches the operation position corresponding to the user's touch operation, and the operation position may be the first position; when the first translation control is displayed within the mark display range in the form of a selection mark: it is usually not displayed at the first position of the first translation control, but a second position is determined based on the first position, and the selection mark is displayed at the second position; this can facilitate users to quickly determine the translation object they want to select. In addition, the first position is highly correlated with the operation position corresponding to the trigger operation input by the user during the movement of the translation control. Directly based on the operation position is usually not conducive to improving translation efficiency. Instead, based on the operation position, a second position is predicted as the predicted position of the translation object with a high probability selected by the user, which can greatly improve the intelligence and translation efficiency of the translation process. The display position of the selection mark and the operation position are usually different and separated by a certain distance. In one or more embodiments, the first translation control may be a control independent of the selection mark.

[0126] Indicatively, Figure 8 As shown, Figure 8 This is a scene diagram of a sign display range involved in this application. Figure 8 In the example, the area outside the dotted line box is the non-marker display area. Within the non-marker display area, the user can input a moving operation to control the first translation control 10 to move. At this time, the selection mark is not displayed. For example, in Figure 8 Point C corresponding to the first position of the first translation control shown does not display a selection mark; in some implementation scenarios, the user dragging the first translation control within the non-marker display range will not trigger the display of the selection mark, which can effectively prevent the user from accidentally triggering the translation function and avoid directly displaying the selection mark to affect the user's normal page browsing. It can be understood that the user continuously inputs a moving operation for the first translation control from the non-marker display range to control the first translation control 10 to continue to move, and the terminal continuously monitors whether the first position falls within the mark display range. It can be understood that the first translation control 10 moves from the non-marker display range to the mark display range. If it is monitored that the first position at a certain time t is within the mark display range, the terminal displays the selection mark based on the first position.

[0127] Indicatively, Fig. 9 As shown, Fig. 9 is a schematic diagram of a scene in which a selection mark is displayed in the present application. The user continuously inputs a moving operation on the first translation control from a non-mark display range to control the first translation control 10 to continuously move, for example, from Figure 8 The point c shown controls the operation position of the first translation control 10 based on the moving operation as the "first position for the first translation control 10" to continue moving. Fig. 9 In the mark display range corresponding to the dotted line shown, the terminal detects that the current first position of the first translation control is point D, and point D falls within the mark display range. The terminal loads and displays the selection mark based on the first position-point D. It should be noted that the second position displayed by the selection mark does not coincide with "first position-point D". The specific method for determining the second position can refer to other embodiments involved in this application.

[0128] Schematically, during the movement of the first translation control, the first position corresponding to the first translation control enters the mark display range from the non-mark display range. When the first position falls into the mark display range, the terminal can control the first translation control to perform a hidden display process. The hidden display process can be to control the first translation control to gradually disappear on the page to be translated, and then determine the second position based on the first position to display the selection mark. For example, the first translation control is switched to display as a selection mark. During the entire translation process, the movement operation input by the user for the first translation control will not end with the hidden display process. Each first position corresponding to the movement operation can be continuously acquired in real time or periodically. Schematically, the first position corresponding to the first translation control is often the operation position corresponding to the continuously input movement operation. While performing the hidden display process, the selection mark is controlled to be displayed outside the first position, for example, above the first translation control. Fig. 9 A selection mark gradually appears above the position of the finger input movement operation shown;

[0129] In one or more embodiments, after the terminal determines that the first position is within the mark display range, it also includes: obtaining a third position after the first position (which can be understood as the next first position of the current first position, that is, the next operation position of the moving operation); if the third position is outside the mark display range, the first translation control is displayed in the interface to be translated, and the selection mark is canceled.

[0130] It can be understood that the next first position of the moving operation of the first translation control, that is, the third position, can be continuously monitored. It can be understood that the touch operation position of the moving operation is continuously obtained as the third position, and the third position after the first position is continuously monitored by obtaining the third position after the first position. If the third position is outside the mark display range, the first translation control is displayed in the page to be translated, and the display cancellation process of the selection mark is performed. It can be understood that the first translation control is displayed with a default control image outside the non-mark display range, and when the third position is outside the mark display range, the display cancellation process of the selection mark is performed.

[0131] In one or more embodiments of the present application, the moving operation may be a sliding operation, a continuous clicking operation, a continuous triggering operation, etc. The first translation control then moves to the first position corresponding to the corresponding first triggering operation. In this process, since the touch operation position of the moving operation is constantly changing, the first position for the moving operation and the third position after the first position (which can also be understood as the next first position) are also constantly changing. After the selection mark is displayed, the second position where the selection mark is located is also constantly changing.

[0132] S304: Acquire a control touch state for the first translation control. If the control touch state is a stop touch state, acquire a target position corresponding to the selection mark, and determine a target area corresponding to the target position.

[0133] For details, please refer to the method steps of one or more embodiments involved in this application, which will not be repeated here.

[0134] S305: loading a second translation control, controlling a control display area of ​​the second translation control to cover the target area, and performing a selection and display process on the translation object in the target area;

[0135] The second translation control is used to select the target area corresponding to the selection mark, so as to display the currently selected area to be identified to the user. In some implementation scenarios, the control display area of ​​the second translation control is used for the user to determine whether the area to be identified is accurately covered. Usually, the first translation control is associated with the second translation control. In some embodiments, the second translation control is used to select and display the translation object in the target area in the control display area. The selected display processing can be to display the translation object in a preset display format, such as adding a background to the translation object, highlighting the translation object, etc.

[0136] Indicative, such as Fig.10 As shown, Fig.10 This is a schematic diagram of the interface of a translation control involved in this application. Fig.10 In the interface shown, a second translation control 30 is displayed. The terminal controls the control display area of ​​the second translation control 30 to cover the target area so as to select and display the translation objects in the target area. After the translation objects in the target area are selected and displayed, the border of the control display area is presented in the form of a solid line.

[0137] In a specific implementation scenario, the terminal loads the second translation control to select and display the target area, so as to select and display the translation object in the target area, and the display area range of the second translation control is larger than the display area range of the first translation control. For example, the control display area of ​​the second translation control can be Fig.10 The solid-line frame area shown in . Loading the second translation control is mainly used to better display to the user the area to be recognized (i.e., the target area) predicted by the terminal based on the target position where the selection mark is located, and displaying it to the user can save the user from the tedious operation of selecting the appropriate position and then framing the recognition area to cover the translation object, saving the operation recognition path.

[0138] In a feasible implementation, after loading the second translation control and selecting and displaying the translation object in the target area, the user can further determine whether the control display area of ​​the second translation control is the final selected area to be identified; in some embodiments, the user can input corresponding operations to fine-tune the control display area so that the control display area accurately covers the translation object that the user expects to select.

[0139] In one or more embodiments, the terminal can detect the target operation for the second translation control. The target operation can be understood as the user's confirmation operation on the control display area predicted to be displayed by the terminal, that is, confirming that the control display area accurately covers the translation object and the control display area is the area that the user expects to be identified. At this time, the terminal determines to translate the translation object. In some implementations, the detection of the target operation can be: the terminal detects that the user has not input any human-computer interaction operation within a preset time, which can be understood as the user defaulting the current control display area to be the area to be identified and the area to be identified accurately covers the translation object without entering any operation.

[0140] According to some embodiments, the target operation can be understood as a user's regional correction operation on the control display area predicted to be displayed by the terminal, such as modifying the specifications of the area based on the control display area, such as expanding or reducing the recognition range of the control display area, such as Fig.10 As shown, the current user of the terminal can Fig.10The recognition range of the solid-line frame area is further narrowed on the basis of the solid-line frame area shown. Usually, the area correction operation can be understood as fine-tuning the current control display area. The control display area covering the target area can usually cover the user's desired recognition content as a translation object with a high probability. Compared with "the user inputs the entire recognition starting position to the recognition end position to determine the area to be recognized", the recognition operation path is greatly shortened, saving translation efficiency.

[0141] S306: translating the translation object in the control display area to obtain a translation result, and displaying the translation result;

[0142] It can be understood that after determining the control display area, the translation object in the control display area can be translated to obtain a translation result;

[0143] In a feasible implementation manner, the terminal obtains the translation object in the current control display area for translation to obtain a translation result.

[0144] Furthermore, the translation object in the control display area can be obtained by a text recognition method based on optical character recognition (OCR), and optical character recognition is performed on the display element information (such as text, images, icons) at the control display area, that is, the character set to be recognized in the control display area is used to extract the translation object. The recognition method is to obtain the display image indicated at the control display area, detect the dark and light patterns of the display image to determine its character shape, and then use the character recognition method to translate the shape into computer text; that is, for the characters in the area to be recognized, an optical method is used to convert the text on the area to be recognized into a black and white dot matrix image file, and the text in the image is converted into a text format (such as in the form of a character string) through a text recognition method based on optical character recognition (OCR), thereby obtaining the recognized character set to be recognized to obtain the translation object, and then translating the translation object.

[0145] It is understandable that after obtaining the translation result, the translation result is then displayed. Fig.11 middle, Fig.11The present invention is a schematic diagram of an interface for displaying translation results in a terminal. The terminal finds the translation result of the English information "Then his letters stopped, but she received one from another officer, telling her that he had been wounded and was in a certain army hospital in England." At this time, the translation is completed, the terminal cancels the icon corresponding to the loading of the translation, loads a translation result display box 40 at the second translation control 30, and displays the translation result corresponding to the translation object in the translation result display box 40.

[0146] Illustratively, the translation result can be displayed by a result display page (such as a translation result display box). Wherein, the display position of the result display page can be determined according to the actual situation. For example, if the translation object corresponding to the target area itself is in an upper position in the interface, then the result page to be translated can be displayed in a relatively lower position in the interface, and correspondingly, if the translation object corresponding to the target area is in a lower position in the interface, then the result display page can be displayed in a relatively upper position in the interface, thereby avoiding the result display page and the translation object corresponding to the target area from crowding out the display position with each other in this way. Furthermore, if the target area itself occupies most of the display screen area, the result display page can be suspended and displayed in the middle of the display screen.

[0147] Furthermore, the translation result can be overlaid and displayed at the translation object in the control display area. The translation result can be directly overlaid on the translation object in the target area, and the user can read the translated content conveniently; further, the layout of the translation result can be controlled to be relatively consistent with the translation object.

[0148] Schematically, in the process of performing OCR recognition on the regional image of the control display area through the OCR algorithm module, the original character blocks (i.e., the translation objects) and the background parts in the control display area to be translated can be obtained, and the text characters in each original character block, as well as the position and size of each original character block in the original image can be identified. The original character block refers to the text character block in the regional image of the control display area obtained by OCR recognition. Then, according to the translation result corresponding to each original character block in the regional image of the control display area, and the position and size of each original character block in the regional image, a target character block is generated. Next, according to the position of the target character block corresponding to the original character block, the background and the target character block are synthesized to generate a translation result image. Finally, the translation result image is overlaid and displayed at the location of the control display area. As shown in FIG. Fig.12 As shown, Fig.12 The present invention is a schematic diagram of an interface for displaying translation results on a terminal. When the terminal finds the translation result of a translation object, the translation is completed. The terminal cancels the icon corresponding to the loading translation and displays the translation result in the solid line area of ​​the second translation control 30. The display mode in which the translation result covers the translation object can avoid affecting the layout content of the original display page, and the content can be read without leaving the original display page when reading the physical examination, so that the content can be read immersively.

[0149] In an embodiment of the present application, the above-mentioned method allows the translation object to be quickly located based on the displayed selection mark during the movement of the first translation control. During the entire translation process, the translation operation path is greatly shortened, the translation process is optimized, and the convenience of translation is improved; and the first position is determined based on the moving position and the first position does not overlap with the moving position, thereby achieving accurate display of the display mark and accurately predicting the position that the user expects to select; and the entire translation process does not require the user to gradually frame the recognition area throughout the entire process, which can shorten the area operation path during the translation process and save area selection time; and the translation result can be overwritten on the original translation object, and the layout is basically consistent with the original content visual effect, which can improve the readability after translation; and small-area OCR recognition of the target area can be used to shorten the translation time; and setting the mark display range can avoid false triggering and improve the intelligence of the translation.

[0150] The following will be combined Fig.13 , the translation device provided in the embodiment of the present application is introduced in detail. It should be noted that, Fig.13 The translation device shown is used to execute the present application Figures 1 to 12 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figures 1 to 12 The embodiment shown.

[0151] See also Fig.13 , which shows a schematic diagram of the structure of the translation device of the embodiment of the present application. The translation device 1 can be implemented as all or part of the user terminal through software, hardware or a combination of both. According to some embodiments, the translation device 1 includes a translation module 11, a translation module 12 and a translation module 13, which are specifically used to:

[0152] A mark display module 11 is used to obtain a first position selected in the page to be translated, determine a second position for a selection mark based on the first position, and display the selection mark at the first position, wherein the first position is different from the second position;

[0153] The object translation module 12 is used to determine the target area corresponding to the selection mark, and determine the translation result of the translation object in the target area.

[0154] Optional, such as Fig.14 As shown, the logo display module 11 includes:

[0155] A position determination unit 111 is used to obtain a first position selected in the page to be translated, and determine a second position for the selection mark based on the first position;

[0156] The mark display unit 112 is used to display the selection mark at the first position, and the first position is different from the second position.

[0157] Optionally, the location determination unit 111 is specifically configured to:

[0158] Obtaining a target angle and a target distance for a selection mark, and determining a second position indicated by the target angle and the target distance with reference to the first position; or,

[0159] A reference area is determined based on the first position, at least one reference position corresponding to the reference area is acquired, and a second position for the selection mark is determined from the at least one reference position.

[0160] Optional, such as Fig.15 As shown, the position determination unit 111 includes:

[0161] The content acquisition subunit 1111 is used to acquire the text content in the reference area;

[0162] The position determination subunit 1112 is configured to determine at least one reference translation object based on the text content and a reference position of the at least one reference translation object.

[0163] Optionally, the position determination subunit 1112 is specifically configured to:

[0164] Performing semantic recognition on the text content, determining at least one key text in the text content, and using the key text as a reference translation object; or,

[0165] A historical translation record corresponding to the text content is obtained, and at least one reference translation object is obtained from the historical translation record.

[0166] Optionally, the position determining unit 111 is specifically configured to: receive a move operation on a first translation control in the page to be translated, and obtain a first position corresponding to the move operation.

[0167] Optional, such as Fig.16 As shown, the object translation module 12 includes:

[0168] A state acquisition unit 121, configured to acquire a control touch state for the first translation control;

[0169] The area acquisition unit 122 is used to acquire the target position corresponding to the selection mark and determine the target area corresponding to the target position if the touch state of the control is the stop touch state.

[0170] Optionally, the device 1 is specifically used for:

[0171] Loading a second translation control, controlling a control display area of ​​the second translation control to cover the target area, and performing a selection and display process on the translation object in the target area;

[0172] The determining the translation result of the translation object in the target area includes:

[0173] The translation object in the control display area is translated to obtain a translation result, and the translation result is displayed.

[0174] Optionally, the device 1 is specifically used for:

[0175] The translation result is displayed in the control display area.

[0176] Optionally, the device 1 is specifically used for:

[0177] Get the logo display range for the selected logo;

[0178] It is determined that the first position is within the mark display range, and a second position for selecting the mark is determined based on the first position.

[0179] Optionally, the device 1 is specifically used for:

[0180] Performing a hiding and display process on the first translation control in the page to be translated;

[0181] Optionally, the device 1 is specifically used for:

[0182] A third position after the first position is obtained. If the third position is outside the mark display range, the first translation control is displayed in the interface to be translated, and the display of the selection mark is cancelled.

[0183] It should be noted that the translation device provided in the above embodiment only uses the division of the above functional modules as an example when executing the translation method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the translation device provided in the above embodiment and the translation method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0184] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0185] In an embodiment of the present application, the above-mentioned method allows the translation object to be quickly located based on the displayed selection mark during the movement of the first translation control. During the entire translation process, the translation operation path is greatly shortened, the translation process is optimized, and the convenience of translation is improved; and the first position is determined based on the moving position and the first position does not overlap with the moving position, thereby achieving accurate display of the display mark and accurately predicting the position that the user expects to select; and the entire translation process does not require the user to gradually frame the recognition area throughout the entire process, which can shorten the area operation path during the translation process and save area selection time; and the translation result can be overwritten on the original translation object, and the layout is basically consistent with the original content visual effect, which can improve the readability after translation; and small-area OCR recognition of the target area can be used to shorten the translation time; and setting the mark display range can avoid false triggering and improve the intelligence of the translation.

[0186] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figures 1 to 12 The translation method of the embodiment shown in the figure can be specifically executed by referring to Figures 1 to 12 The specific description of the illustrated embodiment will not be repeated here.

[0187] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figures 1 to 12 The translation method of the embodiment shown in the figure can be specifically executed by referring to Figures 1 to 12 The specific description of the illustrated embodiment will not be repeated here.

[0188] Please refer to Fig.17, which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150.

[0189] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing text content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0190] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems. The data storage area may also store data created by the electronic device during use, such as a phone book, audio and video data, chat record data, etc.

[0191] See also Fig.18 As shown, the memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, different application scenarios in the same third-party application also have different requirements for system resources. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.

[0192] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0193] Taking the Android operating system as an example, the programs and data stored in the memory 120 are as follows: Fig.19As shown, the memory 120 may store a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, wherein the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to the operating system space, and the application layer 380 belongs to the user space. The Linux kernel layer 320 provides underlying drivers for various hardware of electronic devices, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, etc. The system runtime library layer 340 provides the main feature support for the Android system through some C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D drawing support, and the Webkit library provides browser kernel support, etc. The Android runtime library (Android runtime) is also provided in the system runtime library layer 340, which mainly provides some core libraries that allow developers to use the Java language to write Android applications. The application framework layer 360 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application runs in the application layer 380. These applications can be native applications that come with the operating system, such as contact applications, text messaging applications, clock applications, camera applications, etc.; they can also be third-party applications developed by third-party developers, such as game applications, instant messaging applications, photo beautification applications, etc.

[0194] Taking the operating system as an IOS system as an example, the programs and data stored in the memory 120 are as follows: Fig. 20As shown, the IOS system includes: a core operating system layer 420 (Core OS layer), a core service layer 440 (Core Services layer), a media layer 460 (Media layer), and a touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes the operating system kernel, drivers, and underlying program frameworks, which provide functions closer to the hardware for use by the program framework located in the core service layer 440. The core service layer 440 provides system services and / or program frameworks required by the application, such as the foundation framework, account framework, advertising framework, data storage framework, network connection framework, geographic location framework, motion framework, etc. The media layer 460 provides audio-visual interfaces for the application, such as graphics and image related interfaces, audio technology related interfaces, video technology related interfaces, and wireless playback (AirPlay) interfaces for audio and video transmission technologies. The touchable layer 480 provides various commonly used interface-related frameworks for application development, and the touchable layer 480 is responsible for the user's touch interaction operations on the electronic device. For example, local notification service, remote push service, advertising framework, game tool framework, message user interface (UI) framework, user interface UIKit framework, map framework, etc.

[0195] exist Fig. 20 Among the frameworks shown, the frameworks related to most applications include but are not limited to: the basic framework in the core service layer 440 and the UIKit framework in the touchable layer 480. The basic framework provides many basic object classes and data types, provides the most basic system services for all applications, and has nothing to do with UI. The classes provided by the UIKit framework are basic UI class libraries for creating touch-based user interfaces. iOS applications can provide UIs based on the UIKit framework, so it provides the basic architecture of applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, etc.

[0196] Among them, the method and principle of implementing data communication between third-party applications and the operating system in the IOS system can be referred to the Android system, and this application will not go into details here.

[0197] Among them, the input device 130 is used to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screen displays, which are used to receive touch operations on or near the user using any suitable object such as a finger or a touch pen, and to display the user interface of each application. The touch screen display is usually set on the front panel of the electronic device. The touch screen display can be designed as a full screen, a curved screen or a special-shaped screen. The touch screen display can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.

[0198] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.

[0199] In the embodiment of the present application, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiment of the present application.

[0200] The electronic device of the embodiment of the present application may also be equipped with a display device, which may be any device capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), etc. The user may use the display device on the electronic device 101 to view displayed text, images, videos and other information. The electronic device may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.

[0201] exist Fig.17 In the electronic device shown, where the electronic device may be a terminal, the processor 110 may be used to call an application stored in the memory 120 and specifically perform the following operations:

[0202] Get the first position selected in the page to be translated;

[0203] determining a second position for a selection mark based on the first position, and displaying the selection mark at the second position, wherein the first position is different from the second position;

[0204] A target area corresponding to the selection mark is determined, and a translation result of the translation object in the target area is determined.

[0205] In one embodiment, when the processor 101 determines the second position for the selection mark based on the first position, the processor 101 specifically performs the following operations:

[0206] Obtaining a target angle and a target distance for a selection mark, and determining a second position indicated by the target angle and the target distance with reference to the first position; or,

[0207] A reference area is determined based on the first position, at least one reference position corresponding to the reference area is acquired, and a second position for the selection mark is determined from the at least one reference position.

[0208] In an embodiment, when executing the step of acquiring at least one reference position corresponding to the reference area, the processor 101 specifically performs the following operations:

[0209] Obtaining text content in the reference area;

[0210] At least one reference translation object is determined based on the text content, and based on a reference position of the at least one reference translation object.

[0211] In one embodiment, when the processor 101 determines at least one reference translation object based on the text content, the processor 101 specifically performs the following operations:

[0212] Performing semantic recognition on the text content, determining at least one key text in the text content, and using the key text as a reference translation object; or,

[0213] A historical translation record corresponding to the text content is obtained, and at least one reference translation object is obtained from the historical translation record.

[0214] In one embodiment, when the processor 101 executes the step of obtaining the first position selected in the page to be translated, the processor 101 specifically performs the following operations:

[0215] A move operation on a first translation control in a page to be translated is received, and a first position corresponding to the move operation is acquired.

[0216] In one embodiment, the processor 101, when executing the step of determining the target area corresponding to the selection mark, includes:

[0217] Acquire a control touch state for the first translation control;

[0218] If the touch state of the control is the stop touch state, the target position corresponding to the selection mark is obtained, and the target area corresponding to the target position is determined.

[0219] In one embodiment, after determining the target area corresponding to the selection mark, the processor 101 further performs the following operations: loading a second translation control, controlling a control display area of ​​the second translation control to cover the target area, and selecting and displaying the translation object in the target area;

[0220] The determining the translation result of the translation object in the target area includes:

[0221] The translation object in the control display area is translated to obtain a translation result, and the translation result is displayed.

[0222] In one embodiment, when the processor 101 displays the translation result, the processor 101 specifically performs the following operations:

[0223] The translation result is displayed in the control display area.

[0224] In an embodiment, when the processor 101 determines the second position for the selection mark based on the first position, the processor 101 specifically performs the following steps:

[0225] Get the logo display range for the selected logo;

[0226] It is determined that the first position is within the mark display range, and a second position for selecting the mark is determined based on the first position.

[0227] In one embodiment, after executing the step of determining that the first position is within the sign display range, the processor 101 further performs the following operations:

[0228] The first translation control is hidden and displayed in the page to be translated.

[0229] In one embodiment, when executing the step of obtaining the moving position of the first translation control, the processor 101 specifically performs the following operations:

[0230] In one embodiment, after executing the step of determining that the first position is within the sign display range, the processor 101 further performs the following operations:

[0231] A third position after the first position is obtained. If the third position is outside the mark display range, the first translation control is displayed in the interface to be translated, and the display of the selection mark is cancelled.

[0232] In an embodiment of the present application, the above-mentioned method allows the translation object to be quickly located based on the displayed selection mark during the movement of the first translation control. During the entire translation process, the translation operation path is greatly shortened, the translation process is optimized, and the convenience of translation is improved; and the first position is determined based on the moving position and the first position does not overlap with the moving position, thereby achieving accurate display of the display mark and accurately predicting the position that the user expects to select; and the entire translation process does not require the user to gradually frame the recognition area throughout the entire process, which can shorten the area operation path during the translation process and save area selection time; and the translation result can be overwritten on the original translation object, and the layout is basically consistent with the original content visual effect, which can improve the readability after translation; and small-area OCR recognition of the target area can be used to shorten the translation time; and setting the mark display range can avoid false triggering and improve the intelligence of the translation.

[0233] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0234] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A translation method, characterized in that: The method comprises: Receiving a move operation on a first translation control in a page to be translated, and obtaining a first position corresponding to the move operation; determining a second position for a selection mark based on the first position, and displaying the selection mark at the second position, wherein the first position is different from the second position; Determine a target area corresponding to the selection mark, and determine a translation result of a translation object in the target area; The determining a second position for the selection mark based on the first position comprises: Acquire a target angle and a target distance for a selection mark, and determine a second position indicated by the target angle and the target distance with reference to the first position; The target angle is the angle between the first position and the second position; The target distance is the distance between the first position and the second position; The target area is determined based on the text content around the position where the selection mark stops moving.

2. The method according to claim 1, characterized in that The determining a second position for the selection mark based on the first position comprises: A reference area is determined based on the first position, at least one reference position corresponding to the reference area is acquired, and a second position for the selection mark is determined from the at least one reference position.

3. The method according to claim 2, characterized in that The acquiring at least one reference position corresponding to the reference area includes: Obtaining text content in the reference area; At least one reference translation object is determined based on the text content, and based on a reference position of the at least one reference translation object.

4. The method according to claim 3, characterized in that: The determining at least one reference translation object based on the text content includes: Performing semantic recognition on the text content, determining at least one key text in the text content, and using the key text as a reference translation object; or, A historical translation record corresponding to the text content is obtained, and at least one reference translation object is obtained from the historical translation record.

5. The method according to claim 1, characterized in that The determining the target area corresponding to the selection mark includes: Acquire a control touch state for the first translation control; If the touch state of the control is the stop touch state, the target position corresponding to the selection mark is obtained, and the target area corresponding to the target position is determined.

6. The method according to claim 1, characterized in that After determining the target area corresponding to the selection mark, the method further includes: Loading a second translation control, controlling a control display area of ​​the second translation control to cover the target area, and performing a selection and display process on the translation object in the target area; The determining the translation result of the translation object in the target area includes: The translation object in the control display area is translated to obtain a translation result, and the translation result is displayed.

7. The method according to claim 6, characterized in that The displaying of the translation result comprises: The translation result is displayed in the control display area.

8. The method according to claim 1, characterized in that The determining a second position for the selection mark based on the first position comprises: Get the logo display range for the selected logo; It is determined that the first position is within the mark display range, and a second position for selecting the mark is determined based on the first position.

9. The method according to claim 8, characterized in that After determining that the first position is within the sign display range, the method further includes: The first translation control is hidden and displayed in the interface to be translated.

10. The method according to claim 8, characterized in that After determining that the first position is within the sign display range, the method further includes: A third position after the first position is obtained. If the third position is outside the mark display range, the first translation control is displayed in the interface to be translated, and the display of the selection mark is cancelled.

11. A translation device, characterized in that: The device comprises: a mark display module, configured to receive a move operation on a first translation control in a page to be translated, obtain a first position corresponding to the move operation, determine a second position for a selection mark based on the first position, and display the selection mark at the first position, wherein the first position is different from the second position; An object translation module, used to determine a target area corresponding to the selection mark, and determine a translation result of a translation object in the target area; The mark display module is further used to obtain a target angle and a target distance for a selected mark, and determine a second position indicated by the target angle and the target distance with reference to the first position; The target angle is the angle between the first position and the second position; The target distance is the distance between the first position and the second position; The target area is determined based on the text content around the position where the selection mark stops moving.

12. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps as claimed in any one of claims 1 to 10.

13. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Translation method and device, storage medium and electronic equipment

    CN113934501A