Text translation method and device, equipment, storage medium and computer program product

By setting the corresponding first and second areas in the text translation system and generating translated content using a large language model, the problem of inconsistent layout of the translated text page is solved, and users can easily compare reading and improve reading efficiency.

CN119918546APending Publication Date: 2025-05-02BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510006900.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

In the prior art, the page layout of the translated text is different from the page layout of the original paper, making it difficult for users to view in comparison and reduces the efficiency of reading and comprehension.

Method used

By in response to the triggered text translation instruction, a first area for displaying the text to be translated and a second area for displaying the translated text is determined, the first area text content is obtained and the translated content is generated through a large language model, the translated content is placed in the second area, the position corresponding to the original content, and the display is displayed in the second area.

Benefits of technology

It enables users to view translated text intuitively and conveniently, and read in comparison with the original text, improving users' reading and comprehension efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918546A_ABST
    Figure CN119918546A_ABST
Patent Text Reader

Abstract

The invention discloses a text translation method and device, equipment, a storage medium and a computer program product, and relates to the technical field of large models, and the text translation method comprises the steps that in response to a triggered text translation instruction, a first area used for displaying a to-be-translated text and a second area used for displaying a translated text are determined; obtaining text content displayed in the first area, and generating translation content through a large language model based on the text content; the translation content is placed at the position, corresponding to the text content, in the second area, the translation content is displayed according to the display mode of the second area, and the display mode of the second area is determined based on the display mode of the to-be-translated text in the first area. The translation content is placed in the second area and is parallel and aligned with the original text content, so that the user can check the translation text more visually and conveniently, and the reading and understanding efficiency of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of large model technology, and in particular to a text translation method, apparatus, device, storage medium and computer program product. Background Art

[0002] The current intelligent technology in the field of text translation is already quite mature. It can achieve accurate and complete translation of papers, reports and other texts in various fields into various languages, and the translation efficiency is very high. Basically, real-time translation can be achieved. However, the number of words in the translated text may be inconsistent with the number of words in the original text, which makes it impossible to compare the translation of a specific paragraph or sentence, thereby reducing the user's reading and comprehension efficiency.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present application is to provide a text translation method, apparatus, device, storage medium and computer program product, aiming to solve the technical problem that the page layout of the translated text is different from the page layout of the original paper, making it inconvenient to compare and view.

[0005] To achieve the above purpose, the present application proposes a text translation method, which comprises:

[0006] In response to the triggered text translation instruction, determining a first area for displaying the text to be translated and a second area for displaying the translated text;

[0007] Acquire text content displayed in the first area, and generate translation content based on the text content using a large language model;

[0008] The translation content is placed in a position corresponding to the text content in the second area, and the translation content is displayed according to a display mode of the second area, where the display mode of the second area is determined based on a display mode of the text to be translated in the first area.

[0009] Optionally, the step of determining a first area for displaying the text to be translated and a second area for displaying the translated text includes:

[0010] responding to a triggered text translation instruction, and determining a first region according to the text translation instruction;

[0011] Determine the mirror area position according to the layout format and area arrangement scheme of the first area;

[0012] The second area is determined according to the position of the mirror area.

[0013] Optionally, before the step of determining the position of the mirror area according to the layout format and the area arrangement scheme of the first area, the step further includes:

[0014] Detecting a current operating device type, and determining a positional relationship between the first area and the second area according to the current operating device type;

[0015] An area layout scheme is determined according to the current operating device type and the position relationship.

[0016] Optionally, the step of determining the area layout scheme according to the current operating device type and the position relationship includes:

[0017] When the type of the currently operated device is a mobile device type, determining that the positional relationship between the first area and the second area is an overlapping positional relationship;

[0018] The area arrangement scheme is determined to be such that display positions of the first area and the second area overlap, and display switching is achieved by window switching.

[0019] Optionally, when the current operating device type is a desktop device type, determining that the positional relationship between the first area and the second area is a parallel positional relationship;

[0020] The area arrangement scheme is determined as follows: the display positions of the first area and the second area are area parallel positions, and the parallel positions are one of vertical parallel positions and horizontal parallel positions.

[0021] Optionally, the step of acquiring text content displayed in the first area and generating translation content based on the text content by using a large language model includes:

[0022] intercepting text information of the text to be translated in the first area;

[0023] Determining text content that needs to be translated according to the text information;

[0024] The text content is input into the large language model to obtain the translated content that needs to be displayed.

[0025] Optionally, the step of determining text content to be translated according to the text information includes:

[0026] Determining a plurality of text paragraphs according to the text information;

[0027] Determining important content paragraphs according to the text paragraphs;

[0028] The text content that needs to be translated is determined according to the important content paragraphs.

[0029] Optionally, the step of determining the important content paragraphs according to the text paragraphs includes:

[0030] Determine paragraph outline information for each text paragraph;

[0031] At least one important content paragraph is selected from each text paragraph according to the paragraph outline information.

[0032] Optionally, after the step of inputting the text content into the large language model to obtain the translated content to be displayed, the step further includes:

[0033] Determine the paragraph completeness information for each important content paragraph;

[0034] Determine the incomplete display paragraphs in each important content paragraph according to the paragraph completeness information;

[0035] Completing and translating the incomplete displayed paragraph according to the large language model to obtain completed translated content;

[0036] The completed translation content is updated into the translation content.

[0037] Optionally, the step of placing the translation content at a position corresponding to the text content in the second area and displaying the translation content in a display manner of the second area includes:

[0038] Determining text position information of the text content in the first area;

[0039] Determining the placement position of each translation paragraph in the translation content according to the text position information;

[0040] The translated content is placed in a position corresponding to the text content in the second area according to the placement position, and the translated content is displayed in a display manner of the second area.

[0041] Optionally, the step of determining the placement position of each translation paragraph in the translation content according to the text position information includes:

[0042] Determine the center point position of a text paragraph in the text content according to the text position information;

[0043] Determining a correspondence between the text paragraph and the translation paragraph in the translation content according to the text content and the translation content;

[0044] The placement position of each translation paragraph in the translation content is determined according to the position of the paragraph center point and the corresponding relationship.

[0045] Optionally, after the step of placing the translated content at a position corresponding to the text content in the second area and displaying the translated content in a display manner of the second area, the step further includes:

[0046] When the position of the first area moves, determining the moving direction information and the moving track information of the first area;

[0047] The placement position of the translation content in the second area is updated according to the moving direction information and the moving track information.

[0048] Optionally, after the step of updating the placement position of the translation content in the second area according to the moving direction information and the moving track information, the step further includes:

[0049] When the text content in the first area is updated, determining to delete content and to update content;

[0050] Deleting the paragraph corresponding to the deleted content in the translated content to obtain the initial updated translated content;

[0051] Generate an updated translation text corresponding to the updated content by using the large language model;

[0052] The initially updated translation content is updated according to the updated translation text to obtain adjusted translation content, and the adjusted translation content is placed in a corresponding position in the second region aligned with the text content.

[0053] Optionally, after the step of obtaining the text content displayed in the first area and generating translation content based on the text content by using a large language model, the step further includes:

[0054] Acquire historical operation information of the current user, and determine user knowledge level assessment information based on the historical operation information;

[0055] The translation content is adjusted according to the user knowledge level assessment information.

[0056] Optionally, the step of adjusting the translation content according to the user knowledge level assessment information includes:

[0057] Determining a user knowledge level condition based on the user knowledge level assessment information;

[0058] Filter the translation content according to the user knowledge level condition to obtain the translation text to be replaced that does not meet the user knowledge level assessment information in the translation content;

[0059] The translation content is updated according to the translation text to be replaced.

[0060] In addition, to achieve the above-mentioned purpose, the present application also proposes a text translation device, which includes:

[0061] An area setting module, for determining, in response to a triggered text translation instruction, a first area for displaying a text to be translated and a second area for displaying a translated text;

[0062] A text translation module, used to obtain the text content displayed in the first area, and generate translation content based on the text content through a large language model;

[0063] The text placement module is used to place the translation content in a position corresponding to the text content in the second area, and display the translation content according to the display mode of the second area, and the display mode of the second area is determined based on the display mode of the text to be translated in the first area.

[0064] Optionally, the area setting module is further used to respond to a triggered text translation instruction and determine a first area according to the text translation instruction; determine a mirror area position according to a layout format and an area arrangement scheme of the first area; and determine a second area according to the mirror area position.

[0065] Optionally, the text translation module is further used to intercept text information of the text to be translated in the first area; determine the text content to be translated based on the text information; and input the text content into the large language model to obtain the translated content to be displayed.

[0066] Optionally, the text translation module is further used to determine multiple text paragraphs according to the text information; determine important content paragraphs according to the text paragraphs; and determine text content that needs to be translated according to the important content paragraphs.

[0067] Optionally, the text translation module is further used to determine paragraph outline information of each text paragraph; and select at least one important content paragraph from each text paragraph according to the paragraph outline information.

[0068] In addition, to achieve the above-mentioned purpose, the present application also proposes a text translation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the text translation method described above.

[0069] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the text translation method described above are implemented.

[0070] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the text translation method described above are implemented.

[0071] One or more technical solutions proposed in this application have at least the following technical effects:

[0072] This application determines a first area for displaying the text to be translated and a second area for displaying the translated text in response to a triggered text translation instruction; obtains the text content displayed in the first area, and generates translation content based on the text content through a large language model; places the translation content in the second area at a position corresponding to the text content, and displays the translation content according to the display method of the second area, and the display method of the second area is determined based on the display method of the text to be translated in the first area. In this way, it is achieved to directly generate a second area for comparison based on the area of ​​the display or screen where the original text is located, and then place the translation content in the second area and place it parallel and aligned with the original text content, so that the user can view the translated text more intuitively and conveniently, and can read it in comparison with the original text, which improves the user's reading and comprehension efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0074] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0075] Figure 1 A flowchart of the first embodiment of the text translation method of the present application is provided;

[0076] Figure 2 A schematic diagram of a region provided for an embodiment of a text translation method of the present application;

[0077] Figure 3 A schematic diagram of center point alignment provided for an embodiment of a text translation method of the present application;

[0078] Figure 4 A flowchart of the second embodiment of the text translation method of this application is provided;

[0079] Figure 5A schematic diagram showing an incomplete paragraph provided in an embodiment of the text translation method of the present application;

[0080] Figure 6 This is a schematic diagram of the module structure of the text translation device according to the embodiment of the present application;

[0081] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the text translation method in the embodiment of the present application.

[0082] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0083] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0084] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0085] The main solution of the embodiment of the present application is: by responding to a triggered text translation instruction, determine a first area for displaying the text to be translated, and a second area for displaying the translated text; obtain the text content displayed in the first area, and generate translation content based on the text content through a large language model; place the translation content in a position corresponding to the text content in the second area, and display the translation content according to the display method of the second area, and the display method of the second area is determined based on the display method of the text to be translated in the first area.

[0086] In this embodiment, for the convenience of description, the following description is made by taking the identification computer as the execution subject.

[0087] Since the existing intelligent technology in the field of text translation is already quite mature, it can achieve accurate and complete translation of papers, reports and other texts in various fields into various languages, and the translation efficiency is very high, and basically real-time translation can be achieved. However, the number of words in the translated text may be inconsistent with the number of words in the original text, which leads to the inability to compare the translation of a specific paragraph or sentence, thereby reducing the user's reading and comprehension efficiency.

[0088] The present application provides a solution, through which a second area for comparison is generated directly according to the area of ​​the display or screen where the original text is located, and then the translated content is placed in the second area and placed parallel and aligned with the original text content, so that the user can view the translated text more intuitively and conveniently, and can read it in comparison with the original text, thereby improving the user's reading and comprehension efficiency.

[0089] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a server, etc. that can realize the above functions. The computer of the text translation device is taken as an example to illustrate this embodiment and the following embodiments.

[0090] Based on this, the present application embodiment provides a text translation method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the text translation method of this application.

[0091] In this embodiment, the text translation method includes steps S10 to S30:

[0092] Step S10, in response to the triggered text translation instruction, determining a first area for displaying the text to be translated and a second area for displaying the translated text;

[0093] It should be noted that the text translation instruction is an instruction triggered by the user through voice, video, operation and other actions, so that the text to be translated can be translated.

[0094] It should be understood that if Figure 2 As shown, two areas are set in parallel within the screen, one of which is the first area and the other is the second area. The first area displays the text content of the text to be translated, and the second area is the area where the translated content is placed. Each paragraph corresponds to the translated content and is placed horizontally in parallel. The dotted line is the vertical center line of the display area, A is the first area, and B is the horizontally aligned second area. 1, 2, and 3 in area A are three different paragraphs in the text content, and a, b, and c in area B are the corresponding translated paragraphs of the translated content.

[0095] In a feasible implementation, in order to accurately generate the second area, step S10 includes: responding to a triggered text translation instruction and determining the first area according to the text translation instruction; determining the mirror area position according to the layout format and area arrangement scheme of the first area; and determining the second area according to the mirror area position.

[0096] In a specific implementation, the first area is first determined according to the text translation instruction, that is, the display area selected by the user for text translation is determined according to the text translation instruction. After the first area is determined, the position of the mirror area is determined according to the layout format of the first area combined with a predetermined area layout scheme, and then the position of the second area is determined at the mirror area position. The display method of the second area, that is, the text placement method in the second area is adapted to the format of the text to be translated in the first area.

[0097] In a feasible implementation manner, in order to accurately determine the position of the mirror area where the second area is set for display, the step of determining the position of the mirror area according to the layout format and area layout plan of the first area also includes: detecting the current operating device type, and determining the positional relationship between the first area and the second area according to the current operating device type; determining the area layout plan according to the current operating device type and the positional relationship.

[0098] It should be noted that the area layout plan is not the same based on the current operating device type, so the current operating device type is detected first, which can be a mobile device (such as a smartphone, tablet computer, etc.) or a desktop device (such as a desktop computer, laptop computer, etc.).

[0099] It should be understood that after determining the current operating device type, the positional relationship between the first area and the second area in the rule setting can be determined, so that a specific area layout plan can be generated based on the current operating device type and positional relationship, and then the scene area position of the second area can be determined.

[0100] In a feasible implementation, when the current operating device is a mobile device, the step of determining the area layout plan based on the current operating device type and the position relationship includes: when the current operating device type is a mobile device type, determining that the position relationship between the first area and the second area is an overlapping position relationship; determining that the area layout plan is that the display positions of the first area and the second area overlap, and realizing display switching by window switching.

[0101] In a specific implementation, when the current device is a mobile device, the screen size may not support the simultaneous display of the first area and the second area. In this case, the position relationship can be set to an overlapping position relationship. In this case, the position relationship of the first area and the second area is set to an overlapping relationship of two windows. The view is switched through fixed buttons or fixed trigger conditions to achieve comparative viewing of the translated texts in the first area and the second area.

[0102] In a feasible implementation, when the current operating device is a desktop device, the step of determining the area layout plan based on the current operating device type and the position relationship includes: when the current operating device type is a desktop device type, determining that the position relationship between the first area and the second area is a parallel position relationship; determining that the area layout plan is that the display positions of the first area and the second area are area parallel positions, and the parallel position is one of vertical parallel or horizontal parallel.

[0103] It should be noted that when the current operating device is a desktop device, the display screen can display the first area and the second area at the same time. The area layout scheme can be set to display the first area and the second area side by side, which can be vertical, parallel or in other directions, thereby realizing the position comparison of the translated text.

[0104] It should be understood that if the first area covers the entire display area or a second area of ​​the same size as the first area cannot be set, the display area is divided along the vertical center line and the text to be translated in the first area is adaptively placed on one side.

[0105] Step S20, obtaining text content displayed in the first area, and generating translation content based on the text content through a large language model;

[0106] It should be understood that after determining the first area and the second area, the text content displayed in the first area is directly extracted, and then imported into the large language model for translation based on the text content to obtain the translated content. The large language model is a large model that is pre-set and trained, and can provide more accurate and professional translation for different users and knowledge in different fields.

[0107] Step S30: placing the translation content in a position corresponding to the text content in the second area, and displaying the translation content in accordance with a display mode of the second area, wherein the display mode of the second area is determined based on a display mode of the text to be translated in the first area.

[0108] In a specific implementation, after the translation content is obtained, the translation content is placed in the second area. Specifically, each paragraph of the translation content is placed at a horizontal comparison position of the corresponding original text in the first area.

[0109] In a feasible implementation, in order to accurately place the translation content, step S30 includes: determining the text position information of the text content in the first area; determining the placement position of each translation paragraph in the translation content according to the text position information; placing the translation content in the second area at a position corresponding to the text content according to the placement position, and displaying the translation content in accordance with the display method of the second area.

[0110] It should be noted that the positions of each paragraph of the text content in the first area are first determined, that is, the text position information, which includes the position coordinates of each paragraph in the display area.

[0111] It should be understood that after the text position information is determined, the position of each translation paragraph in the translation content corresponding to the original text of the text to be translated is determined according to the text position information.

[0112] It should be understood that after the placement position is determined, the translation content is placed in the corresponding position coordinates of the second area, so that the translation content is placed in the position corresponding to the text content.

[0113] It should be noted that after the translated content is placed in the position corresponding to the text content, it needs to be displayed, and the page of the translated content should be displayed according to the display method of the second area, and the display method of the second area is determined based on the display method of the text to be translated in the first area. The display method of the second area that needs to be determined includes but is not limited to text format parameters such as the font, font size, color, paragraph settings, and layout information such as the position of each paragraph, the shape of the area occupied, and the size of the area.

[0114] In a feasible implementation manner, in order to accurately determine the placement position, the step of determining the placement position of each translation paragraph in the translation content according to the text position information includes: determining the position of the paragraph center point of the text paragraph in the text content according to the text position information; determining the correspondence between the text paragraph and the translation paragraph in the translation content according to the text content and the translation content; and determining the placement position of each translation paragraph in the translation content according to the paragraph center point position and the correspondence.

[0115] In a specific implementation, firstly, the center point position of each text paragraph in the text content of the text to be translated is determined according to the text position information, that is, Figure 3 Each text paragraph in the first area shown is regarded as a quadrilateral, and then the center point of the quadrilateral is determined as the center point position of the paragraph.

[0116] It should be noted that after determining the position of the center point of the paragraph, the correspondence between each paragraph of the translation content and each paragraph of the text content of the text to be translated is determined, so that each translation paragraph in the translation content can be placed in the second area at a position aligned with the center point of the text paragraph according to the correspondence. Figure 3 As shown, the center point of the translated paragraph is horizontally aligned with the center point of the corresponding paragraph in the first area along the center line.

[0117] In a feasible implementation manner, in order to adjust the translation content in real time after the user switches the screen, after step S30, it also includes: when the position of the first area moves, determining the moving direction information and the moving trajectory information of the first area; updating the placement position of the translation content in the second area according to the moving direction information and the moving trajectory information.

[0118] It should be understood that after the translated text is displayed in the second area, if it is detected that the position of the first area moves, the moving direction information and moving track information of the first area are first determined. The movement of the first area can be used to switch the area of ​​the text to be translated in real time for the user, or the user slides the page, turns the page up and down, etc. on the browser page, and the text in the first area changes at this time.

[0119] In a specific implementation, after determining the moving direction information and the moving track information, the updated text to be translated and the text content to be updated and deleted are determined according to the moving direction information and the moving track information, so that the translation content in the second area and the placement position of the translation content can be updated.

[0120] In a feasible implementation manner, in order to accurately adjust the translation content when the first area moves, the step of updating the placement position of the translation content in the second area according to the moving direction information and the moving trajectory information also includes: when the text content of the first area is updated, determining the deleted content and the updated content; deleting the paragraph corresponding to the deleted content in the translation content to obtain the initial updated translation content; generating an updated translation text corresponding to the updated content through the large language model; updating the initial updated translation content according to the updated translation text to obtain the adjusted translation content, and placing the adjusted translation content in the corresponding position aligned with the text content in the second area.

[0121] It should be noted that after determining to update the text content in the first region, the deleted content and updated content, that is, the change of the text itself, are determined, and then the translation content corresponding to the deleted content is deleted in the second region to obtain the initial updated translation content.

[0122] It should be understood that after obtaining the initial updated translation content, the updated content is input into the large language model, so as to obtain the translation text corresponding to the updated content, and then the updated translation text is updated to the corresponding position of the second region.

[0123] In a feasible implementation, in order to provide a more understandable translation based on the user's knowledge level, after step S10, it also includes: obtaining the current user's historical operation information, and determining the user's knowledge level assessment information based on the historical operation information; and adjusting the translation content based on the user's knowledge level assessment information.

[0124] In the specific implementation, after the translation content is generated, the historical operation information of the current user is obtained, including the user's historical reading habits, search records, the scope of the text consulted, etc. Then, the user's knowledge level is evaluated based on the current historical operation information to obtain the user's knowledge level evaluation information, such as undergraduate level, amateur level, etc.

[0125] In a feasible implementation, in order to accurately adjust the translation content based on the user's knowledge level, the step of adjusting the translation content according to the user's knowledge level assessment information includes: determining the user's knowledge level condition according to the user's knowledge level assessment information; filtering the translation content according to the user's knowledge level condition to obtain the translation text to be replaced in the translation content that does not meet the user's knowledge level assessment information; and updating the translation content according to the translation text to be replaced.

[0126] It should be noted that first, the user knowledge level conditions are determined based on the user knowledge level assessment information, that is, the information related to the user's understanding of the text to be translated is determined, and then the translation content is screened based on the user knowledge level conditions to determine the translation text to be replaced that does not meet the user knowledge level assessment information, that is, professional terms, explanatory texts, etc. in the translation content that are higher than the user's knowledge level need to be replaced with texts that the user's knowledge level can understand, thereby updating the translation content, making the final translation easier for users to understand and read, and improving reading and comprehension efficiency.

[0127] This embodiment provides a text translation method, which determines a first area for displaying a text to be translated and a second area for displaying a translated text in response to a triggered text translation instruction; obtains the text content displayed in the first area, and generates translation content based on the text content through a large language model; places the translation content in the second area at a position corresponding to the text content, and displays the translation content in accordance with the display method of the second area, and the display method of the second area is determined based on the display method of the text to be translated in the first area. In this way, it is achieved that a second area for comparison is generated directly according to the area of ​​the display or screen where the original text is located, and then the translation content is placed in the second area and is placed parallel and aligned with the original text content, so that the user can view the translated text more intuitively and conveniently, and can read it in comparison with the original text, thereby improving the user's reading and understanding efficiency.

[0128] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , step S20 includes steps S201 to S203:

[0129] Step S201, intercepting text information of the text to be translated in the first area;

[0130] It should be noted that first, the text to be translated in the first defined area is subjected to text recognition to obtain text information, which includes information such as specific text and paragraph layout.

[0131] Step S202, determining the text content to be translated according to the text information;

[0132] It should be understood that after the text information is determined, the text that needs to be translated corresponding to the text information is determined, that is, the text information is screened to eliminate meaningless content that does not need to be translated.

[0133] In a feasible implementation, in order to accurately determine the text content to be translated, step S202 includes: determining multiple text paragraphs according to the text information; determining important content paragraphs according to the text paragraphs; and determining the text content to be translated according to the important content paragraphs.

[0134] In the specific implementation, first determine the multiple text paragraphs in the text information, that is, split the text information to obtain multiple text paragraphs with paragraphs as individuals, then determine the important content paragraphs based on the content of the text paragraphs, and finally use the text corresponding to the important content paragraphs as the text content to be translated.

[0135] In a feasible implementation, in order to accurately determine the important content paragraphs, the step of determining the important content paragraphs based on the text paragraphs includes: determining the paragraph outline information of each text paragraph; and selecting at least one important content paragraph from each text paragraph based on the paragraph outline information.

[0136] It should be noted that the paragraph outline of each text paragraph is first determined, so as to determine the main idea and viewpoint of each text paragraph, so that at least one important content paragraph can be selected from the text paragraph, that is, paragraphs without specific meaning and transition paragraphs are deleted and not translated, so as to reduce useless information received by users.

[0137] Step S203: input the text content into the large language model to obtain the translated content to be displayed.

[0138] In a specific implementation, after the text content is obtained, the text content is input into a large language model for processing, so that the translated content can be obtained.

[0139] In a feasible implementation manner, in order to perform predictive translation on incompletely displayed paragraphs, after step S203, it also includes: determining the paragraph completeness information of each important content paragraph; determining the incompletely displayed paragraphs in each important content paragraph based on the paragraph completeness information; completing and translating the incompletely displayed paragraphs according to the large language model to obtain completed translation content; and updating the completed translation content into the translated content.

[0140] It should be noted that first, the paragraph integrity information of each important paragraph is determined, that is, whether each paragraph in the first area is complete, such as Figure 5 As shown, there may be a paragraph a which is not completely displayed in the first area, only a part of it, in which case a is displayed as an incomplete paragraph.

[0141] It should be understood that after determining to display an incomplete paragraph, the content of the incomplete paragraph is completed through a large language model, that is, the content of the entire paragraph is predicted and completed based on the existing content, and then the completed content is translated to obtain the completed translation content, at which time the completed translation content is updated to the translated content.

[0142] This embodiment intercepts the text information of the text to be translated in the first area; determines the text content to be translated based on the text information; and inputs the text content into the large language model to obtain the translated content to be displayed. In this way, the text in the first area is screened, so that the text to be translated is determined for translation and display, avoiding the translation of unimportant or redundant content, thereby improving the user's reading experience.

[0143] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the text translation method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0144] This application also provides a text translation device, please refer to Figure 6 , the text translation device comprises:

[0145] The region setting module 10 is used to determine a first region for displaying the text to be translated and a second region for displaying the translated text in response to a triggered text translation instruction.

[0146] The text translation module 20 is used to obtain the text content displayed in the first area and generate translation content based on the text content through a large language model.

[0147] The text placement module 30 is used to place the translation content in a position corresponding to the text content in the second area, and display the translation content according to the display mode of the second area, which is determined based on the display mode of the text to be translated in the first area.

[0148] This embodiment determines a first area for displaying the text to be translated and a second area for displaying the translated text in response to a triggered text translation instruction; obtains the text content displayed in the first area, and generates translation content based on the text content through a large language model; places the translation content in the second area at a position corresponding to the text content, and displays the translation content in accordance with the display method of the second area, and the display method of the second area is determined based on the display method of the text to be translated in the first area. In this way, it is achieved to directly generate a second area for comparison based on the area of ​​the display or screen where the original text is located, and then place the translation content in the second area and place it parallel and aligned with the original text content, so that the user can view the translated text more intuitively and conveniently, and can read it in comparison with the original text, thereby improving the user's reading and comprehension efficiency.

[0149] In one embodiment, the area setting module 10 is further used to respond to a triggered text translation instruction and determine a first area according to the text translation instruction; determine a mirror area position according to a layout format and an area arrangement scheme of the first area; and determine a second area according to the mirror area position.

[0150] In one embodiment, the area setting module 10 is further used to detect the current operating device type, and determine the position relationship between the first area and the second area according to the current operating device type; and determine the area layout plan according to the current operating device type and the position relationship.

[0151] In one embodiment, the area setting module 10 is also used to determine that the position relationship between the first area and the second area is an overlapping position relationship when the current operating device type is a mobile device type; determine that the area layout plan is that the display positions of the first area and the second area overlap, and realize display switching through window switching.

[0152] In one embodiment, the area setting module 10 is also used to determine that the position relationship between the first area and the second area is a parallel position relationship when the current operating device type is a desktop device type; determine that the area layout scheme is that the display position of the first area and the second area is a parallel position of the area, and the parallel position is one of vertical parallel or horizontal parallel.

[0153] In one embodiment, the text translation module 20 is further used to intercept the text information of the text to be translated in the first area; determine the text content to be translated based on the text information; and input the text content into the large language model to obtain the translation content to be displayed.

[0154] In one embodiment, the text translation module 20 is further used to determine multiple text paragraphs according to the text information; determine important content paragraphs according to the text paragraphs; and determine text content that needs to be translated according to the important content paragraphs.

[0155] In one embodiment, the text translation module 20 is further configured to determine paragraph outline information of each text paragraph; and select at least one important content paragraph from each text paragraph according to the paragraph outline information.

[0156] In one embodiment, the text translation module 20 is also used to determine the paragraph completeness information of each important content paragraph; determine the incomplete displayed paragraphs in each important content paragraph based on the paragraph completeness information; complete and translate the incomplete displayed paragraphs according to the large language model to obtain completed translation content; and update the completed translation content to the translated content.

[0157] In one embodiment, the text placement module 30 is further used to determine text position information of the text content in the first area; determine the placement position of each translation paragraph in the translation content according to the text position information; place the translation content in the second area at a position corresponding to the text content according to the placement position, and display the translation content according to the display method of the second area, and the display method of the second area is determined based on the display method of the text to be translated in the first area.

[0158] In one embodiment, the text placement module 30 is further used to determine the position of the paragraph center point of the text paragraph in the text content according to the text position information; determine the correspondence between the text paragraph and the translation paragraph in the translation content according to the text content and the translation content; and determine the placement position of each translation paragraph in the translation content according to the paragraph center point position and the correspondence.

[0159] In one embodiment, the text placement module 30 is further used to determine the moving direction information and moving track information of the first area when the position of the first area moves; and update the placement position of the translation content in the second area according to the moving direction information and the moving track information.

[0160] In one embodiment, the text placement module 30 is further used to determine the deleted content and the updated content when the text content in the first area is updated; delete the paragraph corresponding to the deleted content in the translated content to obtain the initial updated translation content; generate the updated translation text corresponding to the updated content through the large language model; update the initial updated translation content according to the updated translation text to obtain the adjusted translation content, and place the adjusted translation content in the corresponding position aligned with the text content in the second area.

[0161] In one embodiment, the text placement module 30 is further used to obtain historical operation information of the current user, and determine user knowledge level assessment information based on the historical operation information; and adjust the translation content based on the user knowledge level assessment information.

[0162] In one embodiment, the text placement module 30 is further used to determine a user knowledge level condition based on the user knowledge level assessment information; filter the translation content based on the user knowledge level condition to obtain the translation text to be replaced that does not meet the user knowledge level assessment information in the translation content; and update the translation content based on the translation text to be replaced.

[0163] The text translation device provided by the present application adopts the text translation method in the above embodiment, which can solve the technical problem that the page layout of the translated text is different from the page layout of the original paper, making it inconvenient to compare and view. Compared with the prior art, the beneficial effects of the text translation device provided by the present application are the same as the beneficial effects of the text translation method provided by the above embodiment, and other technical features in the text translation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0164] The present application provides a text translation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the text translation method in the above-mentioned embodiment 1.

[0165] Reference below Figure 7, which shows a schematic diagram of the structure of a text translation device suitable for implementing the embodiment of the present application. The text translation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The text translation device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0166] like Figure 7 As shown, the text translation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the text translation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the text translation device to communicate with other devices wirelessly or by wire to exchange data. Although the text translation device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0167] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0168] The text translation device provided by the present application adopts the text translation method in the above embodiment, which can solve the technical problem that the page layout of the translated text is different from the page layout of the original paper, making it inconvenient to compare and view. Compared with the prior art, the beneficial effects of the text translation device provided by the present application are the same as the beneficial effects of the text translation method provided by the above embodiment, and other technical features in the text translation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0169] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0170] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0171] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the text translation method in the above-mentioned embodiment.

[0172] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0173] The computer-readable storage medium may be included in the text translation device; or may exist independently without being assembled into the text translation device.

[0174] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a text translation device, the text translation device: determines a first area for displaying a text to be translated and a second area for displaying a translated text in response to a triggered text translation instruction; obtains text content displayed in the first area, and generates translation content based on the text content through a large language model; places the translation content at a position corresponding to the text content in the second area, and displays the translation content in accordance with a display method of the second area, where the display method of the second area is determined based on a display method of the text to be translated in the first area.

[0175] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0176] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0177] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0178] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned text translation method, and can solve the technical problem that the page layout of the translated text is different from the page layout of the original paper, which is inconvenient to compare and view. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the text translation method provided by the above-mentioned embodiment, and will not be repeated here.

[0179] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned text translation method when executed by a processor.

[0180] The computer program product provided by the present application can solve the technical problem that the page layout of the translated text is different from the page layout of the original paper, which makes it inconvenient to compare and view. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the text translation method provided by the above embodiment, and will not be elaborated here.

[0181] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

[0182] The present invention discloses A1. a text translation method, the method comprising:

[0183] In response to the triggered text translation instruction, determining a first area for displaying the text to be translated and a second area for displaying the translated text;

[0184] Acquire text content displayed in the first area, and generate translation content based on the text content using a large language model;

[0185] The translation content is placed in a position corresponding to the text content in the second area, and the translation content is displayed according to a display mode of the second area, where the display mode of the second area is determined based on a display mode of the text to be translated in the first area.

[0186] A2. As described in the method of A1, the step of determining the first area for displaying the text to be translated and the second area for displaying the translated text comprises:

[0187] responding to a triggered text translation instruction, and determining a first region according to the text translation instruction;

[0188] Determine the mirror area position according to the layout format and area arrangement scheme of the first area;

[0189] The second area is determined according to the position of the mirror area.

[0190] A3. The method as described in A2, wherein the step of determining the position of the mirror area according to the layout format and area arrangement scheme of the first area further includes:

[0191] Detecting a current operating device type, and determining a positional relationship between the first area and the second area according to the current operating device type;

[0192] An area layout scheme is determined according to the current operating device type and the position relationship.

[0193] A4. As described in the method of A3, the step of determining the area layout scheme according to the current operating device type and the position relationship includes:

[0194] When the type of the currently operated device is a mobile device type, determining that the positional relationship between the first area and the second area is an overlapping positional relationship;

[0195] The area arrangement scheme is determined to be such that display positions of the first area and the second area overlap, and display switching is achieved by window switching.

[0196] A5. As described in the method of A3, the step of determining the area layout scheme according to the current operating device type and the position relationship includes:

[0197] When the current operating device type is a desktop device type, determining that the positional relationship between the first area and the second area is a parallel positional relationship;

[0198] The area arrangement scheme is determined as follows: the display positions of the first area and the second area are area parallel positions, and the parallel positions are one of vertical parallel positions and horizontal parallel positions.

[0199] A6. As described in the method of A1, the step of obtaining the text content displayed in the first area and generating translation content based on the text content through a large language model includes:

[0200] intercepting text information of the text to be translated in the first area;

[0201] Determining text content that needs to be translated according to the text information;

[0202] The text content is input into the large language model to obtain the translated content that needs to be displayed.

[0203] A7. As described in the method of A6, the step of determining the text content to be translated according to the text information comprises:

[0204] Determining a plurality of text paragraphs according to the text information;

[0205] Determining important content paragraphs according to the text paragraphs;

[0206] The text content that needs to be translated is determined according to the important content paragraphs.

[0207] A8. The method as described in A7 is characterized in that the step of determining the important content paragraph according to the text paragraph comprises:

[0208] Determine paragraph outline information for each text paragraph;

[0209] At least one important content paragraph is selected from each text paragraph according to the paragraph outline information.

[0210] A9. The method as described in A6, wherein after the step of inputting the text content into the large language model to obtain the translated content to be displayed, the method further comprises:

[0211] Determine the paragraph completeness information for each important content paragraph;

[0212] Determine the incomplete display paragraphs in each important content paragraph according to the paragraph completeness information;

[0213] Completing and translating the incomplete displayed paragraph according to the large language model to obtain completed translated content;

[0214] The completed translation content is updated into the translation content.

[0215] A10. As described in the method of A1, the step of placing the translation content in a position corresponding to the text content in the second region and displaying the translation content in a display manner of the second region comprises:

[0216] Determining text position information of the text content in the first area;

[0217] Determining the placement position of each translation paragraph in the translation content according to the text position information;

[0218] The translated content is placed in a position corresponding to the text content in the second area according to the placement position, and the translated content is displayed in a display manner of the second area.

[0219] A11. As described in the method of A10, the step of determining the placement position of each translation paragraph in the translation content according to the text position information comprises:

[0220] Determine the center point position of a text paragraph in the text content according to the text position information;

[0221] Determining a correspondence between the text paragraph and the translation paragraph in the translation content according to the text content and the translation content;

[0222] The placement position of each translation paragraph in the translation content is determined according to the position of the paragraph center point and the corresponding relationship.

[0223] A12. The method according to any one of A1 to A11, wherein after the step of placing the translation content in the second region at a position corresponding to the text content and displaying the translation content in a display manner of the second region, the method further comprises:

[0224] When the position of the first area moves, determining the moving direction information and the moving track information of the first area;

[0225] The placement position of the translation content in the second area is updated according to the moving direction information and the moving track information.

[0226] A13. The method as described in A12, wherein after the step of updating the placement position of the translation content in the second area according to the moving direction information and the moving trajectory information, the step further includes:

[0227] When the text content in the first area is updated, determining to delete content and to update content;

[0228] Deleting the paragraph corresponding to the deleted content in the translated content to obtain the initial updated translated content;

[0229] Generate an updated translation text corresponding to the updated content by using the large language model;

[0230] The initially updated translation content is updated according to the updated translation text to obtain adjusted translation content, and the adjusted translation content is placed in a corresponding position in the second region aligned with the text content.

[0231] A14. The method as described in any one of A1-A11, wherein after the step of obtaining the text content displayed in the first area and generating translation content based on the text content through a large language model, the method further comprises:

[0232] Acquire historical operation information of the current user, and determine user knowledge level assessment information based on the historical operation information;

[0233] The translation content is adjusted according to the user knowledge level assessment information.

[0234] A15. The method as described in A14, wherein the step of adjusting the translation content according to the user knowledge level assessment information comprises:

[0235] Determining a user knowledge level condition based on the user knowledge level assessment information;

[0236] Filter the translation content according to the user knowledge level condition to obtain the translation text to be replaced that does not meet the user knowledge level assessment information in the translation content;

[0237] The translation content is updated according to the translation text to be replaced.

[0238] The present invention also discloses B16. a text translation device, the device comprising:

[0239] An area setting module, for determining, in response to a triggered text translation instruction, a first area for displaying a text to be translated and a second area for displaying a translated text;

[0240] A text translation module, used to obtain the text content displayed in the first area, and generate translation content based on the text content through a large language model;

[0241] The text placement module is used to place the translation content in a position corresponding to the text content in the second area, and display the translation content according to the display mode of the second area, and the display mode of the second area is determined based on the display mode of the text to be translated in the first area.

[0242] B17. In the text translation device as described in B16, the area setting module is also used to respond to a triggered text translation instruction and determine the first area according to the text translation instruction; determine the mirror area position according to the layout format and area arrangement scheme of the first area; and determine the second area according to the mirror area position.

[0243] The present invention also discloses C18. A text translation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the text translation method described above.

[0244] The present invention also discloses D19. a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the text translation method as described above are implemented.

[0245] The present invention also discloses E20. a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the text translation method described above are implemented.

Claims

1. A text translation method, characterized in that: The method includes: In response to the triggered text translation instruction, determining a first area for displaying the text to be translated and a second area for displaying the translated text; Acquire text content displayed in the first area, and generate translation content based on the text content using a large language model; The translation content is placed in a position corresponding to the text content in the second area, and the translation content is displayed according to a display mode of the second area, where the display mode of the second area is determined based on a display mode of the text to be translated in the first area.

2. The method according to claim 1, characterized in that The step of determining a first area for displaying the text to be translated and a second area for displaying the translated text comprises: responding to a triggered text translation instruction, and determining a first region according to the text translation instruction; Determine the mirror area position according to the layout format and area arrangement scheme of the first area; The second area is determined according to the position of the mirror area.

3. The method according to claim 2, characterized in that Before the step of determining the position of the mirror area according to the layout format and the area arrangement scheme of the first area, the following step is further included: Detecting a current operating device type, and determining a positional relationship between the first area and the second area according to the current operating device type; An area layout scheme is determined according to the current operating device type and the position relationship.

4. The method according to claim 3, characterized in that The step of determining the area layout scheme according to the current operating device type and the position relationship comprises: When the type of the currently operated device is a mobile device type, determining that the positional relationship between the first area and the second area is an overlapping positional relationship; The area arrangement scheme is determined to be such that display positions of the first area and the second area overlap, and display switching is achieved by window switching.

5. The method according to claim 3, characterized in that The step of determining the area layout scheme according to the current operating device type and the position relationship comprises: When the current operating device type is a desktop device type, determining that the positional relationship between the first area and the second area is a parallel positional relationship; The area arrangement scheme is determined as follows: the display positions of the first area and the second area are area parallel positions, and the parallel positions are one of vertical parallel positions and horizontal parallel positions.

6. The method according to claim 1, characterized in that The step of obtaining the text content displayed in the first area and generating translation content based on the text content through a large language model includes: intercepting text information of the text to be translated in the first area; Determining text content that needs to be translated according to the text information; The text content is input into the large language model to obtain the translated content that needs to be displayed.

7. A text translation device, characterized in that: The device comprises: An area setting module, for determining, in response to a triggered text translation instruction, a first area for displaying a text to be translated and a second area for displaying a translated text; A text translation module, used to obtain the text content displayed in the first area, and generate translation content based on the text content through a large language model; The text placement module is used to place the translation content in a position corresponding to the text content in the second area, and display the translation content according to the display mode of the second area, and the display mode of the second area is determined based on the display mode of the text to be translated in the first area.

8. A text translation device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the text translation method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the text translation method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the text translation method according to any one of claims 1 to 6 are implemented.