Text translation method and device, equipment, storage medium and product
By obtaining user login information in the browser, determining user portraits and generating customized translation strategies, and combining artificial intelligence translation models for text translation, the problem of not being able to achieve customized text translation in the existing technology is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202510006081.4
- 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
The prior art cannot realize customized text translation, resulting in the same translated text being unable to personalize the translation results of different users.
By obtaining the user's login information in the browser, the user's user portrait is determined, and a specific text translation strategy is generated based on the user portrait, and the translation is combined with an artificial intelligence translation model integrated on the browser.
It realizes customized translation of the same translated text according to different user roles, improving the user experience.
Smart Images

Figure CN119918547A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to text translation methods, devices, equipment, storage media and products. Background Art
[0002] Text translation is a common task in daily work, for example, translation between Chinese and English, Chinese and Korean, etc. For this purpose, many translation applications have been launched on the market. For example, the text to be translated can be translated by entering it in a designated text box in the browser. However, when different users enter the same translation text, the translation results are exactly the same. Therefore, the above method cannot achieve customized text translation.
[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 this application is to provide a text translation method, device, equipment, storage medium and product, aiming to solve the technical problem that the existing methods cannot achieve customized text translation.
[0005] To achieve the above purpose, the present application proposes a text translation method, which comprises:
[0006] In response to a text translation request triggered in a browser, obtaining the text to be translated and login information of the browser;
[0007] Determine a corresponding user portrait according to the login information;
[0008] Generate a corresponding text translation strategy based on the user portrait;
[0009] Based on the artificial intelligence translation model integrated in the browser, the text to be translated is translated according to the text translation strategy.
[0010] In one embodiment, the step of determining the corresponding user portrait according to the login information includes:
[0011] Determine the user's identification information according to the login information;
[0012] Based on the artificial intelligence search model integrated in the browser, searching for the user's portrait-related information according to the identification information;
[0013] Determine the corresponding user portrait according to the portrait association information.
[0014] In one embodiment, the step of determining the user's identification information according to the login information includes:
[0015] Extracting a login account from the login information, and counting the number of digits of the login account;
[0016] When the number of digits of the login account is a first preset number, querying the real-name authentication name of the user according to the login account;
[0017] The user's identification information is determined based on the login account and the real-name authentication name.
[0018] In one embodiment, after the step of counting the number of digits of the login account, the method further includes:
[0019] When the number of digits of the login account is a second preset number, verifying the login account;
[0020] When the verification passes, the user's identification information is determined based on the login account.
[0021] In one embodiment, the step of determining the corresponding user portrait according to the portrait association information includes:
[0022] Cleaning the image-related information;
[0023] Classify the cleaned image association information to obtain various types of image association information;
[0024] Obtaining a current portrait determination scene, and filtering the various portrait-related information according to the current portrait determination scene;
[0025] Determine the corresponding user portrait based on the filtered portrait association information.
[0026] In one embodiment, the step of determining the corresponding user portrait according to the filtered various portrait association information includes:
[0027] Synchronize the filtered portrait-related information to the information queue, wherein the information queue is configured with a corresponding message processing object;
[0028] Based on the message processing object, feature extraction is performed on the portrait related information in each of the information queues to obtain portrait related features;
[0029] Normalizing each of the portrait-related features, and combining the normalized portrait-related features;
[0030] Based on the artificial intelligence portrait model integrated in the browser, the corresponding user portrait is determined according to the portrait-related feature group and each of the portrait-related features.
[0031] In one embodiment, the step of generating a corresponding text translation strategy based on the user portrait includes:
[0032] Determine the user's text comprehension level feature value and role based on the user portrait;
[0033] Parse text translation requests;
[0034] When it is determined according to the request parsing result that there is no additional text translation requirement, a corresponding text translation strategy is generated according to the text comprehension level feature value and the role.
[0035] In one embodiment, after the step of parsing the text translation request, the method further includes:
[0036] When it is determined according to the request parsing result that there is an additional text translation requirement, generating an initial text translation strategy according to the text comprehension level feature value and the role;
[0037] Determining translation strategy adjustment suggestions based on the additional text translation requirements;
[0038] The initial text translation strategy is adjusted according to the translation strategy adjustment suggestion to obtain a corresponding text translation strategy.
[0039] In one embodiment, after the step of translating the text to be translated according to the text translation strategy, the method further includes:
[0040] Obtaining a translation corresponding to the text to be translated, and performing format checking on the translation;
[0041] After the format check is passed, the content check is performed on the translation;
[0042] When content verification fails, obtain the previous text, the next text, and the fragment of the text to be translated at the content error position;
[0043] Predicting the correct text at the error position of the content according to the previous text, the next text and the segment;
[0044] A target translation is generated according to the correct text and the translation, and the target translation is displayed.
[0045] In one embodiment, after the step of generating a target translation according to the correct text and the translation, the method further includes:
[0046] Obtaining a user's operation instruction for the target translation;
[0047] When the operation instruction is a download instruction, displaying an options page;
[0048] Obtain the document format and download path required by the user according to the option page;
[0049] The target translation is packaged based on the document format, and the packaged target translation is pushed to the folder corresponding to the download path.
[0050] In addition, to achieve the above-mentioned purpose, the present application also proposes a text translation device, which includes:
[0051] An acquisition module, configured to acquire the text to be translated and the login information of the browser in response to a text translation request triggered in the browser;
[0052] A determination module, used to determine a corresponding user portrait according to the login information;
[0053] A generation module, used to generate a corresponding text translation strategy based on the user portrait;
[0054] A translation module is used to translate the text to be translated based on the artificial intelligence translation model integrated in the browser and according to the text translation strategy.
[0055] In one embodiment, the determination module is also used to determine the user's identification information based on the login information; based on the artificial intelligence search model integrated on the browser, search for the user's portrait-related information based on the identification information; and determine the corresponding user portrait based on the portrait-related information.
[0056] In one embodiment, the determination module is also used to extract the login account from the login information and count the number of digits of the login account; when the number of digits of the login account is a first preset number, query the real-name authentication name of the user based on the login account; and determine the user's identification information based on the login account and the real-name authentication name.
[0057] In one embodiment, the determination module is also used to clean the portrait-related information; classify the cleaned portrait-related information to obtain various types of portrait-related information; obtain the current portrait determination scene, and filter the various types of portrait-related information according to the current portrait determination scene; and determine the corresponding user portrait according to the filtered various types of portrait-related information.
[0058] In one embodiment, the determination module is also used to synchronize the various types of filtered portrait-related information to the information queue, wherein the information queue is configured with a corresponding message processing object; based on the message processing object, feature extraction is performed on the portrait-related information in each of the information queues to obtain portrait-related features; each of the portrait-related features is normalized and the normalized portrait-related features are combined; based on the artificial intelligence portrait model integrated on the browser, the corresponding user portrait is determined according to the portrait-related feature group and each of the portrait-related features.
[0059] In one embodiment, the generation module is further used to determine the user's text comprehension level characteristic value and role based on the user portrait; parse the text translation request; and when it is determined according to the request parsing result that there is no additional text translation requirement, generate a corresponding text translation strategy according to the text comprehension level characteristic value and the role.
[0060] In one embodiment, the translation module is further used to obtain a translation corresponding to the text to be translated, and perform a format check on the translation; after the format check passes, perform a content check on the translation; when the content check fails, obtain the preceding text, following text, and a fragment of the text to be translated at the content error position; predict the correct text at the content error position based on the preceding text, following text, and the fragment; generate a target translation based on the correct text and the translation, and display the target translation.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] One or more technical solutions proposed in the present application have at least the following technical effects: by responding to a text translation request triggered in a browser, obtaining the text to be translated and the login information of the browser; determining the corresponding user portrait according to the login information; generating a corresponding text translation strategy based on the user portrait; based on the artificial intelligence translation model integrated in the browser, translating the text to be translated according to the text translation strategy; in the above manner, after obtaining the login information of the browser, determining the user portrait, and then generating a text translation strategy corresponding to the user portrait, that is, generating different text translation strategies for different user portraits, and then translating the text to be translated in combination with the artificial intelligence translation model pre-integrated in the browser, thereby realizing customized text translation, that is, translating different translations for the same translation text according to different user roles, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, are used to explain the principles of the present application.
[0066] 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.
[0067] Figure 1 A flowchart of the first embodiment of the text translation method of the present application is provided;
[0068] Figure 2 A flowchart of the second embodiment of the text translation method of this application is provided;
[0069] Figure 3 This is a schematic diagram of the module structure of the text translation device according to the embodiment of the present application;
[0070] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the text translation method in the embodiment of the present application.
[0071] 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
[0072] 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 capable of realizing the above functions, a text translation device, etc. The following takes a text translation device as an example to illustrate this embodiment and the following embodiments.
[0073] 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.
[0074] In this embodiment, the text translation method includes steps S10 to S40:
[0075] Step S10, in response to a text translation request triggered in the browser, obtaining the text to be translated and the login information of the browser.
[0076] It should be noted that a text translation request refers to a translation request triggered in a browser when a user needs to translate a text. The text translation request may be triggered by uploading the text to be translated and clicking a translation button. For a browser, a user needs to log in before using a translation application. After a successful login, the browser's cache module will record the user's login information, which includes but is not limited to a login account, nickname, etc.
[0077] It should be understood that in response to the text translation request triggered in the browser, it is determined whether the object to be translated uploaded by the user is a document. If so, the uploaded document is parsed into the text to be translated. If not, the text to be translated entered by the user is obtained from the text input box.
[0078] Step S20, determining the corresponding user portrait according to the login information.
[0079] It can be understood that the user portrait refers to the image portrayed based on the user's portrait-related information in multiple dimensions. The user portrait includes but is not limited to age, gender, geographic location, occupation, interests and hobbies, and text reading information.
[0080] Furthermore, in order to effectively improve the accuracy of determining the user portrait, step S20 includes: determining the user's identification information according to the login information; searching for the user's portrait-related information according to the identification information based on the artificial intelligence search model integrated in the browser; and determining the corresponding user portrait according to the portrait-related information.
[0081] It should be understood that identification information refers to information that identifies different users, which can be unique information or a combination of multiple information, such as a login account and a real-name authentication name. Portrait-related information refers to information associated with a user portrait, which can be searched based on an artificial intelligence search model integrated in the browser.
[0082] It should be noted that the browser in this embodiment can be an artificial intelligence (AI) browser that integrates multiple artificial intelligence models, such as artificial intelligence search models, artificial intelligence portrait models, artificial intelligence translation models, etc., so that the browser has a variety of different functions to meet the diverse needs of users.
[0083] Furthermore, in order to effectively improve the accuracy of determining the user's identification information, the step of determining the user's identification information based on the login information includes: extracting the login account from the login information and counting the number of digits of the login account; when the number of digits of the login account is a first preset number, querying the user's real-name authentication name based on the login account; and determining the user's identification information based on the login account and the real-name authentication name.
[0084] It can be understood that the login account refers to the account of the user who successfully logs into the translation application of the browser. The first preset number can be 11 digits. When it is determined that the number of digits of the login account is the first preset number, it indicates that the user registered and logged in with a mobile phone number. In order to avoid the situation where the mobile phone number is used by multiple people due to cancellation, it is necessary to query the user's real-name authentication name based on the login account. The real-name authentication name can be the user's real name. At this time, the user's identification information is determined based on the combination of the login account and the real-name authentication name.
[0085] Furthermore, in order to effectively improve the accuracy of determining the user's identification information, after the step of counting the number of digits of the login account, the method further includes: when the number of digits of the login account is a second preset number, verifying the login account; and when the verification passes, determining the user's identification information according to the login account.
[0086] It should be understood that the second preset number can be 18 digits. When the number of digits in the login account is determined to be the second preset number, it indicates that the user registered and logged in with the ID number, and the ID number is the only credential and will not be used by multiple people. In addition, in order to effectively improve the accuracy of determining the user's identification information, it is also necessary to perform multi-dimensional verification on the login account, such as verification of the address code, verification of the sequence code, and verification of the check code. When all the above verifications are passed, the user's identification information is determined based on the login account.
[0087] Furthermore, in order to effectively improve the accuracy of determining the user portrait, the step of determining the corresponding user portrait according to the portrait association information includes: cleaning the portrait association information; classifying the cleaned portrait association information to obtain various types of portrait association information; obtaining the current portrait determination scene, and filtering the various types of portrait association information according to the current portrait determination scene; and determining the corresponding user portrait according to the filtered various types of portrait association information.
[0088] It is understandable that after obtaining the portrait association information, the portrait association information is cleaned to filter out redundant, erroneous information, and in order to effectively improve the efficiency of filtering the portrait association information, the cleaned portrait association information is classified, for example, portrait association information of category A, portrait association information of category B, and portrait association information of category C. The current portrait determination scenario refers to a scenario for determining a user portrait. In this embodiment, the current portrait determination scenario can be a portrait scenario for text translation.
[0089] It should be understood that after obtaining the current portrait determination scene, the various types of portrait related information are filtered according to the current portrait determination scene, that is, the portrait related information that is irrelevant to the current portrait determination scene or has a low correlation is filtered out, and then the corresponding user portrait is determined based on the filtered various types of portrait related information.
[0090] Furthermore, in order to effectively improve the efficiency of determining user portraits. The step of determining the corresponding user portrait according to the various types of portrait-related information after screening includes: synchronizing the various types of portrait-related information after screening to the information queue, wherein the information queue is configured with a corresponding message processing object; based on the message processing object, simultaneously extracting features of the portrait-related information in each of the information queues to obtain portrait-related features; normalizing each of the portrait-related features, and combining the normalized portrait-related features; based on the artificial intelligence portrait model integrated on the browser, determining the corresponding user portrait according to the portrait-related feature group and each of the portrait-related features.
[0091] It should be understood that the information queue refers to a queue used to store information. In the present embodiment, in order to effectively improve the efficiency of determining user portraits, information queues with the same number as the categories of portrait-related information are introduced, and message processing objects corresponding to the information queues are configured. The message processing object can be a message processing instance. The various types of portrait-related information after screening are synchronized to the information queue respectively, and feature extraction is performed simultaneously based on the message processing objects, that is, the portrait-related features are extracted in parallel.
[0092] It can be understood that in order to provide rich portrait-related features, each portrait-related feature is normalized, and the normalized portrait-related features are randomly combined to obtain a portrait-related feature group, and then the corresponding user portrait is comprehensively determined by combining each portrait-related feature.
[0093] Step S30, generating a corresponding text translation strategy based on the user portrait.
[0094] It should be understood that the text translation strategy refers to the strategy for translating the text to be translated. Different translations are translated for different user profiles of the same translation text. For example, for user A, the user profile is a, and the text translation strategy generated at this time is strategy 1. For user B, the user profile is b, and the text translation strategy generated at this time is strategy 2.
[0095] Step S40: based on the artificial intelligence translation model integrated in the browser, the text to be translated is translated according to the text translation strategy.
[0096] It can be understood that the artificial intelligence translation model refers to an artificial intelligence model used to translate text. The artificial intelligence translation model is pre-trained and integrated on the browser. After determining the text translation strategy, the text to be translated is translated into the corresponding translation based on the artificial intelligence translation model integrated on the browser. For example, when the text to be translated is in English, the translation is the Chinese corresponding to English.
[0097] Furthermore, in order to effectively improve the accuracy of the generated translation. After step S40, it also includes: obtaining the translation corresponding to the text to be translated, and performing format verification on the translation; after the format verification passes, performing content verification on the translation; when the content verification fails, obtaining the preceding text, the succeeding text, and the fragment of the text to be translated at the content error position; predicting the correct text at the content error position based on the preceding text, the succeeding text, and the fragment; generating a target translation based on the correct text and the translation, and displaying the target translation.
[0098] It should be understood that after obtaining the translation corresponding to the text to be translated, it is also necessary to perform multi-dimensional verification on the translation, for example, format verification, content verification, etc. When the format verification fails, the format of the entire translation is converted. When the content verification fails, the correct text needs to be predicted. In order to effectively improve the accuracy of the predicted text, it is necessary to combine the previous text, the next text and the fragment of the text to be translated at the content error position to predict the correct text at the content error position, and then insert the correct text into the content error position, and generate the target translation in combination with other correctly translated translations.
[0099] Furthermore, in order to effectively improve the user experience. After the step of generating the target translation according to the correct text and the translation, it also includes: obtaining the user's operation instruction for the target translation; when the operation instruction is a download instruction, displaying an option page; obtaining the document format and download path required by the user according to the option page; packaging the target translation based on the document format, and pushing the packaged target translation to the folder corresponding to the download path.
[0100] It can be understood that the operation instruction refers to the instruction for the user to operate the displayed target translation, which includes but is not limited to the pull-down scroll bar instruction, download instruction, delete instruction and play instruction, etc. When the operation instruction is identified as a download instruction, it indicates that the user wants to download the target translation. At this time, the option page is displayed for the user to select the required document format and download path. The document format can be TXT format, DOC format, ODT format, etc.
[0101] It should be understood that the information obtained from the option page includes but is not limited to the document format and download path required by the user. After the document format is determined, the target translation is encapsulated as a file of the document format, that is, the encapsulated target translation exists in the form of a file, and then the encapsulated target translation is pushed to the folder corresponding to the download path, for example, C:\a.
[0102] This embodiment obtains the text to be translated and the login information of the browser in response to a text translation request triggered in the browser; determines the corresponding user portrait according to the login information; generates a corresponding text translation strategy based on the user portrait; and translates the text to be translated according to the text translation strategy based on the artificial intelligence translation model integrated in the browser. In the above manner, after obtaining the login information of the browser, the user portrait is determined, and then a text translation strategy corresponding to the user portrait is generated, that is, different text translation strategies are generated for different user portraits, and then the text to be translated is translated in combination with the artificial intelligence translation model pre-integrated in the browser, thereby realizing customized text translation, that is, translating different translations according to different user roles for the same translation text, thereby improving the user experience.
[0103] 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 2 , step S30 includes steps S301 to S303:
[0104] Step S301, determining the text comprehension level feature value and role of the user based on the user portrait.
[0105] It should be understood that the text understanding degree feature value refers to the feature value of the degree to which the user understands the text. The larger the text understanding feature value, the deeper the user's understanding of the text. The role refers to the role the user plays in the logical context of the text.
[0106] Step S302: parsing the text translation request.
[0107] It is understandable that in order to determine whether the user has additional text translation requirements, after responding to the text translation request triggered in the browser, the text translation request needs to be parsed.
[0108] Furthermore, in order to effectively improve the accuracy of determining text translation, step S302 includes: when it is determined that there is an additional text translation requirement according to the request parsing result, generating an initial text translation strategy according to the text comprehension level feature value and the role; determining a translation strategy adjustment suggestion according to the additional text translation requirement; adjusting the initial text translation strategy according to the translation strategy adjustment suggestion to obtain a corresponding text translation strategy.
[0109] It should be understood that the additional text translation requirement represents the user's request for additional text translation based on their own needs. For example, the user requires a more detailed translation. The initial text translation strategy generated according to the text comprehension level feature value and the role is to simplify the translated text. However, after obtaining the user's additional text translation requirement, the initial text translation strategy is adjusted according to the translation strategy adjustment suggestion. At this time, the text translation strategy is to translate the text to be translated in detail, for example, to perform a medium translation of the keywords in the text.
[0110] Step S303: when it is determined according to the request parsing result that there is no additional text translation requirement, a corresponding text translation strategy is generated according to the text comprehension level feature value and the role.
[0111] It should be understood that when it is determined based on the request parsing result that there is no additional text translation requirement, it indicates that the user has no additional translation needs. At this time, a corresponding text translation strategy is generated based on the text comprehension level characteristic value and the role. For example, when the text comprehension level characteristic value is greater than a preset threshold and the role is an expert, a text translation strategy is generated for deep translation of keywords in the text.
[0112] This embodiment determines the user's text comprehension level characteristic value and role based on the user portrait; parses the text translation request; when it is determined according to the request parsing result that there is no additional text translation requirement, generates a corresponding text translation strategy according to the text comprehension level characteristic value and the role; through the above method, after determining the user portrait, further determine the user's text comprehension level characteristic value and role, and then parse the text translation request to determine whether there is an additional text translation requirement, if not, directly generate the text translation strategy according to the text comprehension level characteristic value and role, if so, it is necessary to generate the text translation strategy in combination with the additional text translation requirement, so as to effectively improve the generated text translation strategy and thus improve the user experience.
[0113] This application also provides a text translation device, please refer to Figure 3 , the text translation device comprises:
[0114] The acquisition module 10 is used to obtain the text to be translated and the login information of the browser in response to a text translation request triggered in the browser.
[0115] The determination module 20 is used to determine the corresponding user portrait according to the login information.
[0116] The generating module 30 is used to generate a corresponding text translation strategy based on the user portrait.
[0117] The translation module 40 is used to translate the text to be translated based on the artificial intelligence translation model integrated in the browser and according to the text translation strategy.
[0118] This embodiment obtains the text to be translated and the login information of the browser in response to a text translation request triggered in the browser; determines the corresponding user portrait according to the login information; generates a corresponding text translation strategy based on the user portrait; and translates the text to be translated according to the text translation strategy based on the artificial intelligence translation model integrated in the browser. In the above manner, after obtaining the login information of the browser, the user portrait is determined, and then a text translation strategy corresponding to the user portrait is generated, that is, different text translation strategies are generated for different user portraits, and then the text to be translated is translated in combination with the artificial intelligence translation model pre-integrated in the browser, thereby realizing customized text translation, that is, translating different translations according to different user roles for the same translation text, thereby improving the user experience.
[0119] 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 existing method cannot realize customized text translation. 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.
[0120] In one embodiment, the determination module 20 is also used to determine the user's identification information based on the login information; based on the artificial intelligence search model integrated on the browser, search for the user's portrait-related information based on the identification information; and determine the corresponding user portrait based on the portrait-related information.
[0121] In one embodiment, the determination module 20 is also used to extract the login account from the login information and count the number of digits of the login account; when the number of digits of the login account is a first preset number, query the real-name authentication name of the user according to the login account; and determine the user's identification information according to the login account and the real-name authentication name.
[0122] In one embodiment, the determination module 20 is further configured to verify the login account when the number of digits of the login account is a second preset number; and when the verification passes, determine the user's identification information according to the login account.
[0123] In one embodiment, the determination module 20 is also used to clean the portrait-related information; classify the cleaned portrait-related information to obtain various types of portrait-related information; obtain the current portrait determination scene, and filter the various types of portrait-related information according to the current portrait determination scene; and determine the corresponding user portrait according to the filtered various types of portrait-related information.
[0124] In one embodiment, the determination module 20 is also used to synchronize the various types of filtered portrait-related information to the information queue, wherein the information queue is configured with a corresponding message processing object; based on the message processing object, feature extraction is performed on the portrait-related information in each of the information queues to obtain portrait-related features; each of the portrait-related features is normalized and the normalized portrait-related features are combined; based on the artificial intelligence portrait model integrated on the browser, the corresponding user portrait is determined according to the portrait-related feature group and each of the portrait-related features.
[0125] In one embodiment, the generation module 30 is further used to determine the user's text comprehension level characteristic value and role based on the user portrait; parse the text translation request; and when it is determined according to the request parsing result that there is no additional text translation requirement, generate a corresponding text translation strategy according to the text comprehension level characteristic value and the role.
[0126] In one embodiment, the generation module 30 is further used to generate an initial text translation strategy based on the text comprehension level feature value and the role when it is determined that there is an additional text translation requirement based on the request parsing result; determine a translation strategy adjustment suggestion based on the additional text translation requirement; and adjust the initial text translation strategy based on the translation strategy adjustment suggestion to obtain a corresponding text translation strategy.
[0127] In one embodiment, the translation module 40 is further used to obtain a translation corresponding to the text to be translated, and perform a format check on the translation; after the format check passes, perform a content check on the translation; when the content check fails, obtain the preceding text, the succeeding text, and a fragment of the text to be translated at the content error position; predict the correct text at the content error position based on the preceding text, the succeeding text, and the fragment; generate a target translation based on the correct text and the translation, and display the target translation.
[0128] In one embodiment, the translation module 40 is further used to obtain the user's operation instructions for the target translation; when the operation instruction is a download instruction, display an option page; obtain the document format and download path required by the user according to the option page; package the target translation based on the document format, and push the packaged target translation to the folder corresponding to the download path.
[0129] 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.
[0130] Reference below Figure 4 , 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 4 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.
[0131] like Figure 4As 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.
[0132] 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.
[0133] 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 existing method cannot realize customized text translation. 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 the 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.
[0134] 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.
[0135] 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.
[0136] 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.
[0137] 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.
[0138] 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.
[0139] 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).
[0140] 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.
[0141] 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.
[0142] The readable storage medium provided in 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 existing method cannot realize customized text translation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the text translation method provided in the above-mentioned embodiment, and will not be elaborated here.
[0143] 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.
[0144] The computer program product provided by this application can solve the technical problem that the existing method cannot realize customized text translation. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the text translation method provided by the above embodiment, which will not be repeated here.
[0145] The present invention discloses A1. a text translation method, the method comprising:
[0146] In response to a text translation request triggered in a browser, obtaining the text to be translated and login information of the browser;
[0147] Determine a corresponding user portrait according to the login information;
[0148] Generate a corresponding text translation strategy based on the user portrait;
[0149] Based on the artificial intelligence translation model integrated in the browser, the text to be translated is translated according to the text translation strategy.
[0150] A2. As described in A1, the step of determining the corresponding user portrait according to the login information comprises:
[0151] Determine the user's identification information according to the login information;
[0152] Based on the artificial intelligence search model integrated in the browser, searching for the user's portrait-related information according to the identification information;
[0153] Determine the corresponding user portrait according to the portrait association information.
[0154] A3. The method as described in A2, wherein the step of determining the user's identification information based on the login information comprises:
[0155] Extracting a login account from the login information, and counting the number of digits of the login account;
[0156] When the number of digits of the login account is a first preset number, querying the real-name authentication name of the user according to the login account;
[0157] The user's identification information is determined based on the login account and the real-name authentication name.
[0158] A4. The method as described in A3, after the step of counting the number of digits of the login account, further comprising:
[0159] When the number of digits of the login account is a second preset number, verifying the login account;
[0160] When the verification passes, the user's identification information is determined based on the login account.
[0161] A5. As described in A2, the step of determining the corresponding user portrait according to the portrait association information comprises:
[0162] Cleaning the image-related information;
[0163] Classify the cleaned image association information to obtain various types of image association information;
[0164] Obtaining a current portrait determination scene, and filtering the various portrait-related information according to the current portrait determination scene;
[0165] Determine the corresponding user portrait based on the filtered portrait association information.
[0166] A6. As described in A5, the step of determining the corresponding user portrait according to the filtered portrait association information includes:
[0167] Synchronize the filtered portrait-related information to the information queue, wherein the information queue is configured with a corresponding message processing object;
[0168] Based on the message processing object, feature extraction is performed on the portrait related information in each of the information queues to obtain portrait related features;
[0169] Normalizing each of the portrait-related features, and combining the normalized portrait-related features;
[0170] Based on the artificial intelligence portrait model integrated in the browser, the corresponding user portrait is determined according to the portrait-related feature group and each of the portrait-related features.
[0171] A7. As described in A1, the step of generating a corresponding text translation strategy based on the user portrait comprises:
[0172] Determine the user's text comprehension level feature value and role based on the user portrait;
[0173] Parse text translation requests;
[0174] When it is determined according to the request parsing result that there is no additional text translation requirement, a corresponding text translation strategy is generated according to the text comprehension level feature value and the role.
[0175] A8. The method as described in A7, after the step of parsing the text translation request, further comprising:
[0176] When it is determined according to the request parsing result that there is an additional text translation requirement, generating an initial text translation strategy according to the text comprehension level feature value and the role;
[0177] Determining translation strategy adjustment suggestions based on the additional text translation requirements;
[0178] The initial text translation strategy is adjusted according to the translation strategy adjustment suggestion to obtain a corresponding text translation strategy.
[0179] A9. The method as described in any one of A1 to A8, after the step of translating the text to be translated according to the text translation strategy, further comprises:
[0180] Obtaining a translation corresponding to the text to be translated, and performing format checking on the translation;
[0181] After the format check is passed, the content check is performed on the translation;
[0182] When content verification fails, obtain the previous text, the next text, and the fragment of the text to be translated at the content error position;
[0183] Predicting the correct text at the error position of the content according to the previous text, the next text and the segment;
[0184] A target translation is generated according to the correct text and the translation, and the target translation is displayed.
[0185] A10. The method as described in A9, after the step of generating a target translation based on the correct text and the translation, further comprises:
[0186] Obtaining a user's operation instruction for the target translation;
[0187] When the operation instruction is a download instruction, displaying an options page;
[0188] Obtain the document format and download path required by the user according to the option page;
[0189] The target translation is packaged based on the document format, and the packaged target translation is pushed to the folder corresponding to the download path.
[0190] The present invention also discloses B11. a text translation device, the device comprising:
[0191] An acquisition module, configured to acquire the text to be translated and the login information of the browser in response to a text translation request triggered in the browser;
[0192] A determination module, used to determine a corresponding user portrait according to the login information;
[0193] A generation module, used to generate a corresponding text translation strategy based on the user portrait;
[0194] A translation module is used to translate the text to be translated based on the artificial intelligence translation model integrated in the browser and according to the text translation strategy.
[0195] B12. In the device as described in B11, the determination module is also used to determine the user's identification information based on the login information; based on the artificial intelligence search model integrated in the browser, search for the user's portrait-related information based on the identification information; and determine the corresponding user portrait based on the portrait-related information.
[0196] B13. In the device as described in B12, the determination module is also used to extract the login account from the login information and count the number of digits of the login account; when the number of digits of the login account is a first preset number, query the real-name authentication name of the user according to the login account; and determine the user's identification information according to the login account and the real-name authentication name.
[0197] B14. In the device as described in B12, the determination module is further used to clean the portrait-related information; classify the cleaned portrait-related information to obtain various types of portrait-related information; obtain the current portrait determination scene, and filter the various types of portrait-related information according to the current portrait determination scene; and determine the corresponding user portrait according to the filtered various types of portrait-related information.
[0198] B15. In the device as described in B14, the determination module is also used to synchronize the various types of filtered portrait-related information to the information queue respectively, wherein the information queue is configured with a corresponding message processing object; based on the message processing object, feature extraction is performed on the portrait-related information in each of the information queues at the same time to obtain portrait-related features; each of the portrait-related features is normalized and the normalized portrait-related features are combined; based on the artificial intelligence portrait model integrated in the browser, the corresponding user portrait is determined according to the portrait-related feature group and each of the portrait-related features.
[0199] B16. In the device as described in B11, the generation module is further used to determine the user's text comprehension level characteristic value and role based on the user portrait; parse the text translation request; and when it is determined according to the request parsing result that there is no additional text translation requirement, generate a corresponding text translation strategy according to the text comprehension level characteristic value and the role.
[0200] B17. In the device as described in B11, the translation module is further used to obtain a translation corresponding to the text to be translated, and perform a format check on the translation; after the format check passes, perform a content check on the translation; when the content check fails, obtain the preceding text, following text and a fragment of the text to be translated at the content error position; predict the correct text at the content error position based on the preceding text, following text and the fragment; generate a target translation based on the correct text and the translation, and display the target translation.
[0201] 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.
Claims
1. A text translation method, characterized in that: The method comprises: In response to a text translation request triggered in a browser, obtaining the text to be translated and login information of the browser; Determine a corresponding user portrait according to the login information; Generate a corresponding text translation strategy based on the user portrait; Based on the artificial intelligence translation model integrated in the browser, the text to be translated is translated according to the text translation strategy.
2. The method according to claim 1, characterized in that The step of determining the corresponding user portrait according to the login information includes: Determine the user's identification information according to the login information; Based on the artificial intelligence search model integrated in the browser, searching for the user's portrait-related information according to the identification information; Determine the corresponding user portrait according to the portrait association information.
3. The method according to claim 2, characterized in that The step of determining the user's identification information according to the login information comprises: Extracting a login account from the login information, and counting the number of digits of the login account; When the number of digits of the login account is a first preset number, querying the real-name authentication name of the user according to the login account; The user's identification information is determined based on the login account and the real-name authentication name.
4. The method according to claim 3, characterized in that After the step of counting the number of digits of the login account, the method further includes: When the number of digits of the login account is a second preset number, verifying the login account; When the verification passes, the user's identification information is determined based on the login account.
5. The method according to claim 2, characterized in that The step of determining the corresponding user portrait according to the portrait association information includes: Cleaning the image-related information; Classify the cleaned image association information to obtain various types of image association information; Obtaining a current portrait determination scene, and filtering the various portrait-related information according to the current portrait determination scene; Determine the corresponding user portrait based on the filtered portrait association information.
6. The method according to claim 1, characterized in that The step of generating a corresponding text translation strategy based on the user portrait includes: Determine the user's text comprehension level feature value and role based on the user portrait; Parse text translation requests; When it is determined according to the request parsing result that there is no additional text translation requirement, a corresponding text translation strategy is generated according to the text comprehension level feature value and the role.
7. A text translation device, characterized in that: The device comprises: An acquisition module, configured to acquire the text to be translated and the login information of the browser in response to a text translation request triggered in the browser; A determination module, used to determine a corresponding user portrait according to the login information; A generation module, used to generate a corresponding text translation strategy based on the user portrait; A translation module is used to translate the text to be translated based on the artificial intelligence translation model integrated in the browser and according to the text translation strategy.
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.
Citation Information
Cited By
Method and system for shooting and translating by applying smart watch, and smart watch
CN120745659A
A method and system for taking a picture by using a smart watch and a smart watch
CN120745659B