Ai-based method and system for automatically and synchronously translating an instant messaging message
By employing AI-powered automatic synchronous translation methods and generative artificial intelligence models, the problem of low efficiency in multilingual translation in instant messaging has been solved, enabling automatic translation and multilingual support of instant messaging messages and improving user experience.
Patent Information
- Application Number
- PCT/CN2024/091634
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-22
- Filing Date
- 2024-05-08
- Publication Date
- 2025-10-30
AI Technical Summary
Existing instant messaging methods suffer from low translation efficiency in multilingual communication, requiring users to spend a lot of time and effort on manual translation. Furthermore, the display of multiple languages in group chats leads to complex interfaces, which affects communication efficiency.
The system employs an AI-powered automatic synchronous translation method, which uses an AI translation processing server to automatically translate instant messaging messages into the target language and send them to the target client in real time. It supports multi-target language translation, dynamically adjusts the number of server instances to optimize resource utilization, and utilizes a generative artificial intelligence (AIGC) model for efficient translation.
It enables automatic and synchronized translation of instant messaging messages without the need for manual translation, improving translation efficiency, simplifying the multilingual communication interface, and enhancing the user experience.
Smart Images

Figure CN2024091634_30102025_PF_FP_ABST
Abstract
Description
Methods and systems for AI-automated synchronous translation of instant messaging messages Technical Field
[0001] This application relates to the field of information technology, specifically to a method, system, computer device, storage medium, and program product for AI-automatic synchronous translation of instant messaging messages. Background Technology
[0002] With the development of computer and internet technologies, communication methods have evolved from traditional methods like telephone, SMS, and email to the most important current method: instant messaging. Instant messaging enables the real-time sending and receiving of internet information. Today, instant messaging has developed into a comprehensive information exchange platform integrating communication, collaborative work, and enterprise customer service. Furthermore, in the context of globalization and the development of communication methods, people need to communicate and collaborate with people who speak different languages. To alleviate communication barriers between different languages, the function of automatically translating instant messaging text into the target language has emerged, aiming to automatically translate the text content in instant messaging software into the target language.
[0003] When communicating with people abroad, communication barriers can arise when the other party sends messages in a different language, requiring users to spend a significant amount of time and effort on translation. Similarly, when communicating with numerous international friends in a group chat, where multiple languages are involved, the chat interface displays messages in several different languages, necessitating even greater time and effort. Furthermore, the receiving device may not be able to recognize the user's own text messages, creating further communication obstacles.
[0004] Summary of the Invention
[0005] In view of this, this application provides a method, system, computer device, storage medium, and program product for automatic synchronous translation of instant messaging messages using AI. In an instant messaging system, the original text message is automatically translated into the target language and synchronously sent to the target client, eliminating the need for manual translation by the user and solving the problem of low translation efficiency in the prior art.
[0006] This application provides a method for AI-automated synchronous translation of instant messaging messages, applied to an instant messaging system. The method includes:
[0007] Get the first message text;
[0008] Upload the first message text to the AI translation processing server;
[0009] The AI translation processing server translates the first message text into text in a preset target language, and obtains the second message text based on the text in the preset target language. The preset target language is a preset by the sending end and / or the target receiving end.
[0010] Send the second message text to the target receiver.
[0011] Optionally, if both the sending end and the target receiving end have preset target languages, then the AI translation processing server translates the first message text into text in the preset target language, including: the AI translation processing server translating the first message text into text in the target language preset by the sending end.
[0012] Optionally, obtaining the first message text includes: obtaining the first message text input by the sender;
[0013] The preset target language is the display language type pre-configured by the sending end;
[0014] Sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the sending end; the sending end sending the second message text to the instant messaging server, and the instant messaging server forwarding the second message text to the target receiving end.
[0015] Optionally, the AI translation processing server translates the first message text into text in a preset target language, which is then used as the second message text. The method further includes: when the display language type pre-configured on the target receiving end is consistent with or inconsistent with the second message text, the target receiving end directly displays the second message text.
[0016] Optionally, obtaining the first message text includes: the sending end sending the input first message text to the instant messaging server, and the target receiving end receiving the first message text forwarded by the instant messaging server;
[0017] The preset target language is the display language type pre-configured on the target receiving end;
[0018] Sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the target receiving end.
[0019] Optionally, obtaining the first message text includes: the sending end sending the input first message text to the instant messaging server, and the AI translation processing server receiving the first message text forwarded by the instant messaging server;
[0020] The preset target language is the display language type pre-configured on the target receiving end;
[0021] Sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the target receiving end.
[0022] Optionally, the preset target language includes multiple target languages, and the target receiving end includes multiple clients; the method further includes: determining whether the first message text originates from a group chat of an instant messaging system; if so, the AI translation processing server translates the first message text into text in multiple preset target languages according to the display language types pre-configured by each client in the group chat;
[0023] The step of obtaining the second message text based on the text in the preset target language includes: integrating the text in the multiple preset target languages and the first message text into the second message text.
[0024] Optionally, the method further includes: each client displaying part or all of the content in the second message text according to its own pre-configured display language.
[0025] Optionally, the AI translation processing server translates the first message text into text in a preset target language, including:
[0026] The translation task is broken down into multiple subtasks, and the multiple subtasks are sent to the corresponding translation instances in the AI translation processing server for parallel processing;
[0027] The number of AI translation processing server instances is dynamically adjusted based on the number of translation tasks, so as to automatically expand or shrink the number of instances.
[0028] Optionally, dynamically adjusting the number of AI translation processing server instances based on the number of translation tasks includes:
[0029] Obtain monitoring metrics;
[0030] Set a corresponding scaling threshold for each of the monitoring indicators;
[0031] Based on the monitoring indicators and the corresponding scaling thresholds, a scaling strategy is set, which includes timed scaling, threshold scaling, or predictive scaling.
[0032] Based on the aforementioned scaling strategy, scaling operations are executed automatically;
[0033] The automatic execution of scaling operations based on the scaling strategy includes:
[0034] Create an instance and add it to the backend service list, or delete one or more instances from the backend service list and destroy the one or more instances to release resources.
[0035] Optionally, the method further includes:
[0036] The AI translation processing server splits and caches the first message text and the corresponding translation result so that in the next translation task, it can directly return the corresponding cached translation result for the text to be translated that is completely the same as the first message text, and perform incremental translation for the text to be translated that is partially the same as the first message text.
[0037] Optionally, incremental translation is performed on the text to be translated that overlaps with a portion of the first message text, including:
[0038] The text to be translated that is repeated in the first message text will be segmented;
[0039] The segmented text to be translated is compared with the content of the cached first message text to obtain newly added text segments, repeated text segments, and translation segments corresponding to the repeated text segments.
[0040] The newly added text paragraphs are translated, and the translated fragments are spliced together to determine the complete translation result.
[0041] Optionally, before the AI translation processing server translates the first message text into text in a preset target language, the method further includes:
[0042] The translation interface of the AI translation processing server can be invoked using either batch or asynchronous calls.
[0043] Optionally, the AI translation processing server translates the first message text into text in a preset target language, including:
[0044] The AI translation processing server uses a generative artificial intelligence AIGC model to translate the first message text into text in a pre-set target language.
[0045] Optionally, before the AI translation processing server translates the first message text into text in a pre-set target language using a generative artificial intelligence AIGC model, the method further includes:
[0046] Obtain the training dataset;
[0047] Build an AIGC model;
[0048] The AIGC model is pre-trained using the training dataset.
[0049] Fine-tuning of the pre-trained AIGC model;
[0050] The finely tuned AIGC model is then optimized for inference.
[0051] Optionally, using a generative artificial intelligence (AIGC) model, the first message text is translated into text in a pre-defined target language, including:
[0052] Construct a professional domain dictionary database, which contains professional terms, phrases and sentence structures from different fields;
[0053] Based on the aforementioned professional domain dictionary database, the AIGC model is fine-tuned for specific domains;
[0054] The first message text is obtained, and based on a professional domain dictionary database, the first message text is aligned with domain terms, and the technical terms appearing in the first message text are marked as specific identifiers.
[0055] The first message text is translated using the fine-tuned AIGC model, and the content corresponding to the specific identifier is adjusted in the translation result.
[0056] Optionally, the method further includes:
[0057] The AIGC model is incrementally learned and iteratively optimized to dynamically adjust the translation results.
[0058] This application also provides an AI-powered automatic synchronous translation system for instant messaging messages, applied in the field of instant messaging, including:
[0059] The acquisition module is used to acquire the text of the first message;
[0060] The translation module is used to upload the first message text to the AI translation processing server, so that the AI translation processing server translates the first message text into text in a preset target language, and obtains the second message text based on the text in the preset target language. The preset target language is a preset by the sending end and / or the target receiving end.
[0061] The sending module is used to send the second message text to the target receiving end.
[0062] This application embodiment also provides a computer device, the computer device comprising:
[0063] At least one processor; and,
[0064] A memory communicatively connected to the at least one processor; wherein,
[0065] The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform the above-described method for automatic synchronous translation of instant messaging messages using AI.
[0066] This application also provides a computer-readable storage medium storing computer instructions for causing a computer to execute the above-described method for automatic synchronous translation of instant messaging messages using AI.
[0067] This application also provides a computer program product, including computer instructions, characterized in that, when the computer instructions are executed by a processor, they implement the steps of the above-described method for automatic synchronous translation of instant messaging messages using AI.
[0068] This application provides a method and system for AI-automated synchronous translation of instant messaging messages. The AI translation processing server automatically translates the first text message into the target language and sends it to the target client in real time. In addition, for multiple target languages, it can translate into multiple different target languages in real time and send the multiple target languages to multiple target clients. This allows users of different language families to see the same sentence in different target languages in the same group chat interface in real time, thus eliminating the need for manual translation for different users and language families, improving translation efficiency and enhancing user experience. Attached Figure Description
[0069] To more clearly illustrate the disclosed embodiments in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0070] Figure 1 is a flowchart illustrating the method for automatic synchronous translation of instant messaging messages using AI, as provided in an embodiment of this application.
[0071] Figure 2a is a schematic diagram of an AI translation interactive interface provided in one embodiment;
[0072] Figure 2b is a schematic diagram of the AI translation settings interface provided in one embodiment;
[0073] Figure 2c is a schematic diagram of the language setting interface of the AI translation receiver provided in one embodiment;
[0074] Figure 3 is a schematic diagram of the process of AI translation at the sending end in one embodiment;
[0075] Figure 4 is a schematic diagram of the process of AI translation at the receiving end provided in one embodiment;
[0076] Figure 5 is a schematic diagram of the architecture of an AI-automated synchronous translation system for instant messaging messages provided in an embodiment;
[0077] Figure 6 is a schematic diagram of the architecture of a computer device provided in one embodiment. Detailed Implementation
[0078] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0079] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0080] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0081] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0082] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0083] In this embodiment of the invention, an application scenario for an AI-automated synchronous translation method for instant messaging messages (hereinafter referred to as the AI translation method) is adopted. The system mainly consists of the following hardware and software modules:
[0084] hardware module
[0085] Communication devices, such as smartphones, tablets, and laptops, have navigation and image acquisition functions and are used for user interaction with instant messaging systems.
[0086] Communication module: Includes wireless communication modules such as Wi-Fi, Bluetooth, NFC, etc., and mobile communication modules such as 3G, 4G, 5G, etc., for data transmission between devices.
[0087] Server: Equipped with processor, memory, network interface, etc., it runs AI translation processing instances and performs translation tasks.
[0088] Sensor modules, such as ambient light sensors, are used to collect information about the environment around the device in order to optimize display parameters.
[0089] Software Module
[0090] Operating system: such as Android, provides a multi-layered architecture to support application execution and underlying hardware management.
[0091] AI Translation Processing Server: A software instance that integrates the AIGC model to perform text translation.
[0092] Domain Dictionary Database: Collects specialized terms from different fields to provide domain knowledge for AIGC models and support domain-specific translation.
[0093] Applications: such as instant messaging client programs, which provide user interfaces and interactive functions.
[0094] Example 1
[0095] As shown in Figure 1, this application provides an AI translation method applied to an instant messaging system, comprising the following steps:
[0096] S1. Retrieve the first message text;
[0097] The first message text is the raw text entered by the user, which can be in Chinese, English, or other languages.
[0098] S2. Upload the first message text to the AI translation processing server;
[0099] S3. The AI translation processing server translates the first message text into text in a preset target language, and obtains the second message text based on the text in the preset target language. The preset target language is a preset by the sending end and / or the target receiving end.
[0100] The preset target language may include one or more target languages, such as English and Japanese. The target language of the sending end or the target receiving end can be preset through user settings, detection of user input language, detection of the user's surrounding environment, detection of the user's IP address, or acquisition of user historical messages.
[0101] S4. Send the second message text to the target receiving end.
[0102] The target receiving end may include one or more clients.
[0103] Optionally, if both the sending end and the target receiving end have preset target languages, the AI translation processing server translates the first message text into text in the preset target language, including: the AI translation processing server translating the first message text into text in the target language preset by the sending end. That is, during the translation process, the target language preset by the sending end has higher priority than the target language preset by the target receiving end, and the sending end can force the target receiving end to display the second message text in its specified target language. Of course, in practical applications, the sending end may not force the target receiving end to display the target language; an on / off button can be set to control the execution of the above functions.
[0104] The above steps can be further divided into two different scenarios: the sending end and the receiving end, as detailed below:
[0105] In one example, if the sending end has enabled automatic AI translation, it directly acquires the first message text input by the sending end, uploads it to the AI translation processing server, and then translates it into text corresponding to the display language type pre-configured by the sending end. The AI translation processing server then sends the second message text to the sending end. The sending end then sends the second message text to the instant messaging server, which forwards it to the target receiving end. Optionally, the instant messaging server can also simultaneously forward the first message text and the corresponding second message text to the target receiving end for display. Further, if the AI translation processing server translates the first message text into text in a target language pre-set by the sending end, and uses this as the second message text, the method further includes: whether the display language type pre-configured by the target receiving end is the same as or different from the second message text, the target receiving end directly displays the second message text.
[0106] In another example, if the target receiving end has enabled the automatic AI translation function, then after the sending end sends the input first message text to the instant messaging server, the instant messaging server can forward the first message text to the target receiving end, and then the AI translation processing server can translate it, so that the sending end does not need to translate it. That is, the target receiving end uploads the first message text to the AI translation processing server, so that the AI translation processing server translates the first message text into text in the target language preset by the target receiving end, so that the AI translation processing server can send the second message text to the target receiving end.
[0107] In another example, if the target receiving end has enabled the automatic AI translation function, then after the sending end sends the input first message text to the instant messaging server, the instant messaging server can directly forward the first message text to the AI translation processing server. After receiving the first message text forwarded by the instant messaging server, the AI translation processing server translates it according to the display language type pre-configured by the target receiving end to obtain the second message text, and the AI translation processing server sends the second message text to the target receiving end.
[0108] It should be noted that there are many ways to transmit the first or second message text between the sending end, the instant messaging server, the AI translation processing server, and the target receiving end. Any method that satisfies the translation function and ensures normal message sending and receiving is acceptable; these will not be elaborated upon here. Taking message A as an example, the sending end sends it to the AI translation processing server, which translates it and sends it to the instant messaging server, which then sends it to the target receiving end. Alternatively, the sending end sends it to the instant messaging server, which then sends it to the AI translation processing server, which translates it and sends it to the target receiving end. Or, the sending end sends it to the instant messaging server, which then sends it to the AI translation processing server, which translates it and sends it to the instant messaging server, which then sends it to the target receiving end. Or, the sending end sends it to the instant messaging server, which then sends it to the target receiving end, which then sends it to the AI translation processing server, which translates it and sends it to the target receiving end, and so on. Of course, integrating the AI translation processing server and the instant messaging server in the future to achieve the above functions also falls within the scope of this application.
[0109] In S3, either machine translation or generative artificial intelligence (AIGC) models can be used to translate the first message text. These will be described separately below:
[0110] Example 1: Translate the first message text into a pre-set target language using machine translation, including steps A1-A5:
[0111] A1. Using machine translation, the first message text is translated into text in a preset target language;
[0112] Specifically, users enter the text message they want to send in the instant messaging system. The text can be in any supported language, such as Chinese or English. The AI translation server then collects the user's input and performs necessary preprocessing operations. Preprocessing may include removing extra spaces, handling special characters, and language detection.
[0113] If a user can preset one or more target languages, or if the system sets the target language according to the target receiver's language preferences, then the AI translation server uses its built-in machine translation service or a third-party translation API to translate the collected raw text into a second message text in the target language.
[0114] A2. The translation task is divided into multiple sub-tasks, and the multiple sub-tasks are sent to the corresponding translation instances in the AI translation processing server for parallel processing;
[0115] Specifically, it includes:
[0116] A21. Translation Task Breakdown: First, the system breaks down the received initial message text into several smaller text blocks to improve processing efficiency. The breakdown strategy can be based on the natural boundaries of sentences or paragraphs, ensuring that the broken text remains comprehensible.
[0117] A22. Subtask Assignment: The split text blocks are treated as independent sub-translation tasks. The system assigns these subtasks to different AI translation processing server instances based on the current service load. The purpose of this step is to leverage parallel processing to accelerate the entire translation process.
[0118] A23. Parallel Processing: Each AI translation processing server instance begins processing the subtasks assigned to it simultaneously. These instances may run on different physical or virtual servers and can work independently of each other, thus achieving parallel processing of tasks.
[0119] A24. Result Merging: Once all subtasks have been translated, the system reassembles these independent translation results into a complete translated text. This involves restoring the text order and checking the contextual coherence.
[0120] For example, in a multilingual group chat, different users might send multiple messages almost simultaneously. The system creates a translation subtask for each message. For instance, user A sends an English message, and user B sends a Spanish message almost simultaneously. The instant messaging AI-powered automatic synchronous translation system will assign these two messages as two subtasks to different server instances for parallel translation. After the translation is complete, the translation results are sorted by time and sent to all members of the group chat.
[0121] A25. Context Consistency Check: Because parallel processing may lead to context loss, the system will perform a context consistency check to ensure the fluency and consistency of the translated text. Fine-tuning or post-processing can be performed if necessary to improve translation quality.
[0122] A26. Optimization and Adjustment: Based on translation quality feedback, the system continuously optimizes the splitting strategy and parallel processing algorithm. This includes adjusting the size of text blocks and improving the method of contextual consistency checking.
[0123] A3. The number of AI translation processing server instances is dynamically adjusted based on the number of translation tasks, so as to automatically expand or shrink the number of instances.
[0124] In A3, based on monitoring data, the system analyzes whether scaling up (adding instances) or scaling down (reducing instances) is necessary using preset algorithms or rules. When an increase in the number of translation tasks is detected, causing excessive load on existing server instances, the system automatically starts more translation instances to handle the increased workload and avoid processing delays. Conversely, when the system detects a decrease in the number of translation tasks and insufficient load on existing server instances, it automatically reduces the number of unnecessary translation instances to conserve resources.
[0125] A3 employs dynamic scaling technology, which dynamically adjusts the number of AI translation processing server instances based on real-time load to optimize resource utilization and response time.
[0126] In A3, the number of AI translation processing server instances is dynamically adjusted based on the number of translation tasks, including the following steps:
[0127] A31. Obtain monitoring metrics;
[0128] It's necessary to identify the monitoring metrics that trigger dynamic scaling, such as CPU utilization, memory usage, request response time, and request concurrency. By collecting real-time data on these metrics, the current system load can be assessed. Common monitoring tools include Prometheus, Zabbix, and AWS CloudWatch.
[0129] A32. Set corresponding scaling thresholds for each of the monitoring indicators;
[0130] Set reasonable scaling thresholds for each monitoring metric. Trigger scaling up when the metric value exceeds the upper threshold and trigger scaling down when it falls below the lower threshold. The threshold settings need to be balanced based on business characteristics and resource costs, avoiding overly sensitive scaling that leads to frequent expansions and contractions, while also ensuring timely responses to load changes.
[0131] A33. Based on the monitoring indicators and the corresponding scaling thresholds, set a scaling strategy, which includes timed scaling, threshold scaling, or predictive scaling;
[0132] Scheduled scaling: Based on pre-set time rules, it performs expansion or contraction at fixed time points.
[0133] Threshold scaling: Scaling is triggered based on the threshold of the monitored metrics, such as expanding capacity when CPU utilization exceeds 80%.
[0134] Predictive scaling: Using machine learning algorithms to predict future load trends based on historical data and scale in advance.
[0135] Predictive scaling, for example, includes the following steps:
[0136] 1. Data Collection: First, the system collects and records the historical load data of the AI translation processing server, including the number of tasks per day, processing time, server running status, etc.
[0137] 2. Data Analysis: Then, use this historical data to analyze the patterns and trends in translation workload.
[0138] 3. Model Training: Using machine learning algorithms such as time series analysis and regression models, a predictive model is trained. This model can learn the characteristics of historical workload data and predict the translation task workload trend in the future within a certain period of time.
[0139] 4. Prediction Implementation: Using the trained model, the system can predict changes in the translation workload when events such as holidays, special events, or predetermined events occur.
[0140] 5. Automatic Adjustment: Based on predictions, the scaling manager automatically adjusts the number of server instances in advance according to predicted load peaks or troughs, ensuring the system always maintains optimal load. Suppose an AI translation service provider has a large number of retail customers and observes a surge in service usage on Black Friday each year. To cope with this anticipated peak, they would train a predictive model using historical load data and other factors that might affect load (such as promotions, advertising, etc.). As Black Friday approaches, the model predicts the increase in translation service load and instructs the system to automatically add server instances before the peak. As the peak subsides, the system gradually reduces instances that are no longer needed. In this way, the AI translation service provider can ensure users enjoy fast, continuous translation services even during peak times, while also optimizing resource utilization and avoiding unnecessary costs.
[0141] A34. Based on the scaling strategy, automatically execute scaling operations.
[0142] This may include creating instances and adding them to the backend service list, or deleting one or more instances from the backend service list and destroying the one or more instances to release resources.
[0143] Specifically, scaling operations are performed automatically when the scaling conditions are met. For scaling up, this typically involves creating new translation processor instances and adding them to the load balancer's backend service list. For scaling down, this involves removing some instances from the load balancer and destroying these instances to free up resources.
[0144] Newly created translation processor instances require initialization configuration, such as loading necessary dependency libraries, obtaining configuration parameters, and establishing database connections. This initialization can be automated using custom startup scripts or configuration management tools such as Ansible or Chef.
[0145] After dynamic scaling, the load balancer configuration needs to be adjusted accordingly to distribute traffic to the new instances. Common load balancers such as Nginx, HAProxy, and AWS ELB support dynamically updating the list of backend services.
[0146] In addition, newly created instances may require some time to complete initialization and warm-up, during which response time may be long. To mitigate the cold start problem, a warm-up mechanism can be adopted, such as periodically creating instances and maintaining a certain number of spare instances, or initializing instances in advance before scaling up.
[0147] State Management: If the translation processor needs to maintain state data, such as user session information and caches, special attention needs to be paid to state synchronization and consistency during dynamic scaling. State data can be stored in an external distributed cache or database to ensure that new instances can quickly retrieve the latest state data.
[0148] Monitoring and Alerts: Monitor the process and results of dynamic scaling, including the execution status of scaling operations, instance health status, and system performance metrics. When anomalies occur, such as scaling failures or instance malfunctions, alerts should be triggered promptly to notify relevant personnel for handling.
[0149] Furthermore, in one embodiment, to improve translation efficiency, for repeated or partially repeated first message text, only the original translation result needs to be fed back, or only the updated portion needs to be translated. Specifically:
[0150] A4. The AI translation processing server splits and caches the first message text and the corresponding translation result so that in the next translation task, it can directly return the corresponding cached translation result for the text to be translated that is completely the same as the first message text, and perform incremental translation for the text to be translated that is partially the same as the first message text.
[0151] Specifically, in A4, the translation results for repeated text are cached. The next time the same text is encountered, the cached result is returned directly, avoiding repeated translation and wasting resources.
[0152] Furthermore, in A4, incremental translation is performed on the text to be translated that overlaps with a portion of the first message text, including steps A41-A43:
[0153] A41. The text to be translated that overlaps with the first message text is segmented;
[0154] Segmentation can be performed according to sentence or paragraph boundaries. Sentence segmentation algorithms in natural language processing techniques, such as rule-based segmentation based on punctuation marks and conditional random field (CRF) models, can be used to divide the message into multiple independent sentences or paragraphs.
[0155] A42. Compare the segmented text to be translated with the content of the cached first message text to obtain the newly added text segments, the repeated text segments, and the translation segments corresponding to the repeated text segments;
[0156] The process involves comparing the current input message segment with the previously translated message segment to identify newly added sentences or paragraphs. String comparison algorithms, such as the Longest Common Subsequence (LCS) algorithm, can be used to identify the new parts of the message compared to the previous translation.
[0157] A43. Translate the newly added text paragraph and splice the translated fragments to determine the complete translation result.
[0158] In A43, newly added sentences or paragraphs identified in the difference comparison step are extracted as the incremental part to be translated. Then, the extracted new segments are passed to the translation processing server, which calls the machine translation engine's API interface for translation. Finally, the translation results of the new segments are merged with the previously translated message segments to obtain the complete translated message. Efficient string merging operations can be performed using string concatenation or string builder methods (such as Java's StringBuilder).
[0159] Optionally, the merged, complete translation result can be cached as the basis for the next incremental update. The translation result can then be returned to the user.
[0160] For example, the original message is: The weather is so nice today. I want to go for a walk and enjoy the beautiful scenery.
[0161] Last translation: Today's weather is really nice. This input: The weather is really nice today. I want to go for a walk and enjoy the beautiful scenery. Let's go have hot pot tonight. Difference comparison: Added sentence "Let's go have hot pot tonight."
[0162] Translation: Let's go for a hotpot tonight.
[0163] Combined results: Today's weather is really nice. I want to go out for a walk and enjoy the beautiful scenery. Let's go for a hotpot tonight.
[0164] In addition, before the AI translation processing server translates the first message text into text in a preset target language, it also includes:
[0165] A5. Use batch or asynchronous calls to invoke the translation interface of the AI translation processing server.
[0166] Batch translation is defined as packaging multiple texts to be translated into a single batch and sending them to the translation engine for translation at once. Compared to single-text translation, batch translation significantly reduces the number of network transmissions and latency overhead. Many translation engines provide batch translation interfaces, supporting the input of multiple texts in a single request.
[0167] Asynchronous calls are defined as follows: after sending a translation request, the system returns immediately without waiting for the translation result, and continues executing subsequent tasks. When the translation result returns, it is then processed through a callback function or event notification. Asynchronous calls avoid blocking and waiting, improving the system's concurrency capabilities.
[0168] In A5, connection pooling can also be used to reduce call overhead. Network connections established with the translation engine are a valuable resource. Frequently establishing and closing connections incurs unnecessary performance overhead. Using connection pooling, a certain number of connections are pre-created and cached for reuse. When the translation interface needs to be called, an idle connection is retrieved from the pool, used, and then returned to the pool, instead of recreating and destroying connections each time.
[0169] In addition, if the text to be translated is long, consider compressing it before sending the request to reduce the amount of data transmitted over the network. Common compression algorithms include gzip and deflate. Be sure to set the appropriate Content-Encoding field in the request header to inform the server that compression was used.
[0170] Example 2: Accurate translation using AIGC technology:
[0171] That is, the AI translation processing server uses the generative artificial intelligence AIGC model to translate the first message text into text in a pre-set target language.
[0172] AIGC (Artificial Intelligence Generated Content) translation is based on large neural network models, particularly the recent Transformer architecture. These models use self-attention mechanisms to capture the spatial dependencies within the input text sequence. AIGC models typically translate using the following steps:
[0173] Pre-training: The AIGC model is pre-trained on large-scale multilingual texts containing diverse linguistic expressions and rich contextual information, enabling the model to learn the grammatical structures and word meanings of different languages.
[0174] Self-attention mechanism: The model uses self-attention to weight the importance of each part in the input sequence, which can capture long-distance language dependencies, also known as contextual associations, which is crucial for accurate translation.
[0175] Decoder generates text: Utilizing pre-trained knowledge, the decoder generates text in the target language. During generation, an attention mechanism is again used to ensure the contextual relevance of the translation.
[0176] Word-by-word generation: Unlike traditional machine translation which converts text sentence by sentence according to rules, the AIGC model generates continuous text at the word level, thereby achieving a more fluent and natural translation.
[0177] Dynamic learning capability: The AIGC model can learn and improve itself through continuous use and training, constantly calibrating its vocabulary expression and contextual understanding.
[0178] Meanwhile, traditional machine translation generally refers to rule-based translation or statistical-based translation. This method relies on grammatical and lexical rules established by linguists to translate language. Statistical methods, such as statistical machine translation (SMT), rely on large corpora of bilingual texts to find the most likely correspondences between words and phrases.
[0179] AIGC translation uses neural network models, which typically have stronger learning capabilities and adaptability. They do not rely on fixed rules or are limited by statistical data corresponding to phrases. Instead, their comprehensive understanding of context allows AIGC models to exhibit a higher level of flexibility and accuracy in understanding the intent of the source text and generating the target text.
[0180] Therefore, AIGC translation technology, through the advantages of deep learning and contextual understanding, provides more natural and human-like translation output, breaking through the limitations of traditional machine translation in terms of fixed rules and data-driven approaches.
[0181] Furthermore, in order to more accurately use the AIGC model for translation, it is also necessary to pre-train and optimize the generative artificial intelligence AIGC model, specifically including steps B1-B5:
[0182] B1. Obtain the training dataset;
[0183] Collect and organize a large amount of training datasets (bilingual or multilingual corpora), including general corpora and domain-specific corpora. The corpora undergo preprocessing steps such as cleaning, alignment, and deduplication to ensure data quality.
[0184] B2. Construct the AIGC model;
[0185] Choose a suitable AIGC model architecture, such as Transformer, GPT, or BERT. Determine the model's parameter size and structure based on the corpus size, language characteristics, and computational resources.
[0186] B3. Pre-train the AIGC model using the training dataset;
[0187] The AIGC model is pre-trained on a large-scale general corpus. Through self-supervised learning, the model learns the basic features and rules of language. Common pre-training tasks include language modeling and denoising autoencoders.
[0188] B4. Fine-tune the pre-trained AIGC model;
[0189] Fine-tuning refers to further training a pre-trained AIGC model for a specific task to improve its translation performance in a particular scenario.
[0190] Building upon pre-training, the model is fine-tuned using domain-specific bilingual corpora. Supervised learning allows the model to adapt to the language style and translation patterns of that domain. Fine-tuning can utilize techniques such as teacher-student models and knowledge distillation to improve the model's professionalism and efficiency.
[0191] B5. Perform inference optimization on the finely tuned AIGC model.
[0192] Optimize the fine-tuned model for inference to improve translation speed and quality. Techniques such as model quantization, pruning, and knowledge distillation can be used to reduce model size and computational cost while maintaining quality.
[0193] Specifically, B5 utilizes a fine-tuned AIGC translation model for inference optimization to improve the model's execution efficiency and output quality in real-world translation tasks. Inference optimization primarily focuses on reducing the model's response time and improving translation accuracy. This may include the following steps:
[0194] B51 model simplification: The model is trimmed and simplified by removing neural network layers or nodes that do not affect performance, thereby reducing the model size to improve inference speed.
[0195] B52 quantization: Converts floating-point parameters in the model to a low-precision format, such as converting from floating-point (float32) to integer (int8), to reduce the computational resources required by the model during inference.
[0196] B53 Parallel Processing: Implements parallel computation of model parameters on supported hardware, such as using multithreading or GPUs to accelerate matrix operations.
[0197] B54 compilation optimization: Utilize specific machine learning compilers, such as TensorRT or OpenVINO, to transform models to adapt to different hardware and optimize execution paths.
[0198] B55 Caching Mechanism: A caching mechanism is designed for frequent translations or repetitive queries to speed up response without sacrificing translation quality.
[0199] B56 Dynamic Batch Processing: Adjusts the batch size of input data to balance server load and response time.
[0200] B57 Model Service-Oriented: By providing models as services, such as through containerization technologies (like Docker), the model...
[0201] Deployment becomes flexible and efficient, supporting rapid expansion and maintenance.
[0202] Through inference optimization, the fine-tuned AIGC model can achieve faster response speed and higher output quality in real-time translation scenarios, thereby providing users with a better user experience.
[0203] Furthermore, if technical terms (such as those from medicine, mathematics, computer science, law, etc.) or phrases from unfamiliar fields appear during the chat, AIGC can be used to learn and fine-tune specialized domain dictionaries to achieve accurate translations across different fields. This involves the following steps:
[0204] C1. Construct a professional domain dictionary database, which contains professional terms, phrases and sentence structures from different fields;
[0205] We construct high-quality specialized dictionaries for specific fields such as medicine and law. These dictionaries include commonly used professional terms, phrases, and sentence structures, along with accurate translations. The construction of these specialized dictionaries can be done through manual compilation and web scraping of professional literature.
[0206] C2. Based on the aforementioned professional domain dictionary database, the AIGC model is fine-tuned for specific domains;
[0207] Building upon the AIGC model, the model is fine-tuned using domain-specific corpora. High-quality bilingual corpora from this domain, such as professional literature and glossaries, are selected to further train the pre-trained language model, enabling it to better adapt to the linguistic characteristics and expressions of this domain.
[0208] C3. Obtain the first message text, and based on a professional domain dictionary database, align the first message text with domain terms, and mark the technical terms appearing in the first message text as specific identifiers;
[0209] In the preprocessing stage of AI translation, the source text undergoes domain terminology alignment. Using a constructed specialized dictionary, domain terms appearing in the source text are identified and marked or replaced with specific identifiers. This ensures that these terms are accurately translated in the subsequent translation process.
[0210] C4. Translate the first message text using the fine-tuned AIGC model, and adjust the content corresponding to the specific identifier in the translation result.
[0211] When generating translation results, for domain terms marked in the preprocessing stage, the translations provided in specialized dictionaries are mandatory. This ensures the accuracy of key terminology translations and avoids translation errors caused by model generation.
[0212] In step C4, the fine-tuned AIGC model will be used to translate the first message text. This step focuses on how to handle specific identifiers to ensure the quality of the translated text. The detailed technical implementation steps are as follows:
[0213] C41. Handling of specific identifiers: For the input text, the preprocessing will first identify and mark the content that needs special processing, such as technical terms, brand names, abbreviations, etc., and assign a unique identifier to each identified specific content.
[0214] C42. Translation Process: The fine-tuned AIGC model receives the first message text, which has been preprocessed and tagged with specific identifiers, and translates it based on the model's understanding. Because the model has undergone domain-specific fine-tuning, it will be able to understand and translate this specialized content more accurately.
[0215] C43. Preserve key information: During the inference process, for those parts marked by specific identifiers, the AIGC model will retrieve the accurate translation from a professional dictionary database or leave it unchanged (such as brand names) to ensure that this key information is not lost or mistranslated during the translation process.
[0216] C44. Adjust Translation Output: After translation is complete, the system will re-examine the output text. For content with specific identifiers, it will make necessary adjustments based on the context of the source and target texts to ensure the correctness and naturalness of the terminology.
[0217] C45. Post-processing: Post-process the adjusted translation results to ensure that the sentences are fluent, the logic is consistent, and the overall text style is consistent.
[0218] In this way, the AIGC translation system can leverage AIGC's powerful contextual understanding capabilities while maintaining the accuracy of key information when translating texts involving technical terms or other important fixed expressions, thereby improving the overall quality and reliability of the translation.
[0219] For example, a medical research text contains the specific term "atrial fibrillation." During the translation process, this term is marked with a specific identifier, such as... <med001>The fine-tuned AIGC model receives text containing this specific identifier and translates it. Because the model has been fine-tuned for the medical field, it correctly understands the term "atrial fibrillation" and finds its accurate equivalent in the target language (e.g., English), "Atrial Fibrillation". After translation, the system will... <med001>Replace it with "Atrial Fibrillation" to ensure the entire sentence remains semantically accurate and fluent.
[0220] For example, a legal contract needs to be translated, which contains references to multiple legal provisions, such as "Article 123 of the Civil Code." In this case, "Article 123 of the Civil Code" might be marked as... <law123>The fine-tuned AIGC model will recognize and retain these identifiers during translation. After translating each section, the system will check and ensure the accuracy of each legal clause against a specialized dictionary before finalizing the translation. <law123>Replace the correct clause citation in the translation.
[0221] C5. Incremental learning and iterative optimization are performed on the AIGC model to dynamically adjust the translation results.
[0222] After obtaining the initial translation results, a post-editing and verification process is introduced. Professionals in the field review and correct the translations, focusing on the accuracy of terminology and specialized expressions. These professionals can fine-tune and optimize the translation based on the actual meaning of the terms in the context.
[0223] Furthermore, the results of manual post-editing are fed back into the AIGC model for incremental learning and iterative optimization. Through continuous fine-tuning, the model can gradually adapt to the language style of the domain and continuously improve translation quality. Simultaneously, the specialized dictionary must be continuously improved and expanded to address newly emerging terms and expressions.
[0224] Optionally, a translation quality assessment mechanism can be established to evaluate the translation results automatically and manually. Automated evaluation can use metrics such as BLEU and METEOR to assess the fluency and adequacy of the translation. Manual evaluation focuses on the accuracy of specialized terminology and domain knowledge. The evaluation results are fed back to the model and dictionary to continuously improve translation quality.
[0225] In response to these application scenarios, Example 2 uses AIGC technology as its core to optimize the limitations of traditional machine translation and makes fine adjustments by combining it with domain-specific dictionaries, which can significantly improve the accuracy of translation in professional terminology, especially in the field of non-standard terms.
[0226] Optionally, in this application, for a scenario where multiple users from different countries and language families are in the same group, the preset target language includes multiple target languages, the target client includes multiple clients, and the method further includes: determining whether the first message text originates from a group chat of an instant messaging system; if so, then according to the display language types pre-configured by each client in the group chat, the AI translation processing server translates the first message text into text in multiple preset target languages.
[0227] The step of obtaining the second message text based on the text in the preset target language includes: integrating the text in the multiple preset target languages and the first message text into the second message text.
[0228] Furthermore, the method also includes: each client displaying part or all of the content in the second message text according to its own pre-configured display language.
[0229] For example, in a group chat with three clients, the first client is the sender, and the other two clients are the target receivers. The second client is pre-configured to display Chinese and English, and the third client is pre-configured to display Chinese and Japanese. After the sender sends the first message text in French in the group chat, the AI translation server translates the first message text into Chinese, English, and Japanese. The first message text, the translated Chinese, English, and Japanese are then combined into the second message text. At this point, when the second client receives the second message text, it only displays Chinese and English, and when the third client receives the second message text, it only displays Chinese and Japanese.
[0230] Of course, the above-mentioned pre-configured display languages and other settings can be adjusted according to the actual application.
[0231] Additionally, Figures 2a-2c are exemplary illustrations of embodiments of this application. As shown in Figures 2a-2c, when a user enables the AI translation function (the button at the bottom of the interface), the content received from the other party will be automatically translated into multiple target languages (English and Japanese). Figure 2b shows the AI translation settings interface, as shown, where settings can be made such as whether to automatically translate, whether to include the original text, and to set the target languages (English and Japanese), and whether to enable the automatic translation function for received messages. Figure 2c shows the language seen by the target receiver. Typically, the target receiver selects their native language, such as Simplified Chinese. After selecting this option, the target receiver can automatically and in real-time translate any text sent by other parties within the chat interface into Chinese for the target receiver to view.
[0232] For example, within the chat system, clicking the "+" to expand functionality will lead to the "AI Translation" entry. Once enabled, this feature will be on by default every time a conversation begins, but users can manually disable it.
[0233] The message sending settings allow you to toggle real-time translation on / off, toggle the original text sent with translated messages, and set the language displayed to the recipient. Specifically, in one-on-one chats, only one language can be selected, while in group chats, multiple languages can be selected for simultaneous translation and sending.
[0234] The message receiving settings allow you to toggle real-time translation on or off when receiving messages, and also allow you to set the language you see in the received messages.
[0235] Furthermore, in the AI translation settings, if real-time translation of received messages is enabled, received messages in languages other than the set language will be automatically translated into the set language. Messages containing @mentions or emojis will not be translated. In the AI translation settings, if real-time translation of sent messages is enabled, edited messages will be automatically sent in the set translation language after clicking send. Messages containing the original text or multiple languages, or those separated by separators, will also be translated. Messages containing @mentions or emojis will not be translated.
[0236] The AI translation method in this application can effectively solve the following technical problems:
[0237] Communication barriers: Real-time, automatic translation reduces communication barriers between users of different languages, making language no longer a limitation on communication.
[0238] Translation efficiency: Incremental translation and caching mechanisms significantly improve the processing speed of repetitive and partially repetitive text, thereby improving the overall translation efficiency.
[0239] Dynamic resource management: Server instances are dynamically adjusted based on the number of translation tasks, which ensures both rapid response to translation tasks and reduces resource consumption.
[0240] Translation accuracy: The pre-training and domain-specific fine-tuning of the AIGC model significantly improves the translation accuracy of general and specialized terms.
[0241] Therefore, the application of this technical solution not only solves the language barrier in real-time communication, but also brings significant technical benefits in terms of user experience, resource allocation, and operational efficiency. Users can communicate seamlessly in their native language environment without the need for additional language learning or translation tools.
[0242] Furthermore, the technical concept of this application can be extended to: the sender does not simply mean the sender of a message text, and the receiver does not simply mean the receiver of a message text. In some special cases, the sender and receiver may be the same entity, or, for a period of time, one end may be designated as the sender and the other as the receiver. Based on this, the AI translation method in this application can also be used to achieve good technical results.
[0243] Furthermore, the technical concept of this application can be extended to: the pre-set target language does not necessarily have to be a type of natural language, such as English, Japanese, or Simplified Chinese, but may also include specific forms of textual expression (such as shorthand symbols), or text processed by specific methods (encryption, decryption, anonymization, etc.), or computer language.
[0244] Furthermore, the AI translation technology provided in this application can not only be applied in instant messaging, but can also be widely extended to the following scenarios:
[0245] Mobile applications:
[0246] It can be integrated into various social applications, allowing users to communicate across languages directly in the chat interface.
[0247] This technology integrates with news apps and social media platforms, automatically translating content from around the world. For example, tourist attractions offer information services, displaying various notices and guides to visitors from different countries. With this solution, users only need to input text in one language on their mobile phones to automatically generate corresponding information in multiple languages. Tourists can easily select and understand their preferred language version, enhancing their travel experience.
[0248] Computer translation software:
[0249] This technology is applied to international conferences, enabling real-time multilingual translation of instant communication content. For example, in a multilingual online academic seminar, scholars from various countries share research findings. Utilizing the technical solution provided in this application, presentations can be instantly translated into multiple languages and distributed to participants from diverse backgrounds, significantly enhancing the efficiency and engagement of international academic exchanges.
[0250] By integrating with email clients, this solution enables real-time translation and response to multilingual emails. For example, within a multinational corporation, if Chinese and English-speaking employees need to discuss project details, reports written by the Chinese employee can be instantly translated into English using the AI-powered instant messaging translation system within this solution. The English employee can then immediately understand and provide feedback. Similarly, English emails replied to by the English employee can be instantly converted into Chinese, ensuring seamless communication.
[0251] Automotive systems:
[0252] It can be integrated into the intelligent vehicle information system to provide multilingual interaction and navigation prompts.
[0253] Automatic translation and transmission of cross-language emergency help requests.
[0254] Mixed Reality (MR) Environment:
[0255] It is used in MR educational applications to provide real-time language translation, making learning more accessible.
[0256] Enable multilingual interaction in MR entertainment experiences to enhance user engagement.
[0257] Foreign language teaching:
[0258] Teachers do not need to know the students' native language. In normal communication, taking the teacher as the sender and the student as the receiver, the language displayed on the student's end is usually based on the student's preset settings. Students can understand what the teacher is saying, allowing the teacher's teaching process to proceed smoothly. Of course, in special circumstances, the teacher can automatically or manually switch the preset display language at any time according to different teaching examples, communication statements, and other content. However, when conducting necessary activities such as tests, again taking the teacher as the sender and the student as the receiver, the teacher can preset the actual language on their end. This forces the student's end to display the language corresponding to the teacher's preset settings, requiring students to read and practice in a foreign language.
[0259] Software interface:
[0260] When a piece of software (in the form of an application, mobile APP, or webpage) receives a message from a server, the message can be displayed in either the server's preset language or the user's preset language. Different users can display different languages.
[0261] Example 2
[0262] Example 2 describes the specific steps of AI translation at the sending end, as shown in Figure 3. In this example, the sending end inputs the original message text (first message text), and then activates the AI automatic translation function. The first message text is automatically uploaded to the AI translation processing server. The AI translation processing server performs multilingual translation of the original message text and sends it to the instant messaging server through the instant messaging sending unit. The server then forwards it to the target receiving end. The target receiving end receives the original text and the translated text through the instant messaging sending and receiving unit and parses them through the chat message parsing and display unit. The translation steps of the AI translation processing server can be referred to Examples 1 and 2 of Example 1, and will not be repeated here.
[0263] Example 3
[0264] Example 3 describes the specific steps for AI translation at the receiving end, as shown in Figure 4. The sending end does not enable AI translation, while the receiving end does. The sending end sends the original message text (first message text) to the instant messaging server via the instant messaging unit, which then forwards it to the receiving end. At this point, the receiving end receives the original message text through the instant messaging unit. However, this original message text does not match the receiving end's default language, so AI automatic translation needs to be enabled. Therefore, the receiving end automatically uploads the original message text to the AI translation processing server. After translation by the AI translation processing server, the translated message is parsed and displayed. The translation steps of the AI translation processing server can be referred to Examples 1 and 2 of Example 1, and will not be repeated here.
[0265] Example 4
[0266] Figure 5 is a schematic diagram of the structure of an AI-automated synchronous translation system for instant messaging messages (hereinafter referred to as the AI translation system) provided in an embodiment of this disclosure. The AI translation system 500 includes:
[0267] Module 51 is used to obtain the first message text;
[0268] Translation module 52 is used to upload the first message text to the AI translation processing server, so that the AI translation processing server translates the first message text into text in a preset target language, and obtains the second message text based on the text in the preset target language. The preset target language is a preset by the sending end and / or the target receiving end.
[0269] The sending module 53 is used to send the second message text to the target receiving end.
[0270] In one embodiment, if both the sending end and the target receiving end have preset target languages, the AI translation processing server translates the first message text into text in the preset target language, including: the AI translation processing server translating the first message text into text in the target language preset by the sending end.
[0271] In one embodiment, obtaining the first message text includes: obtaining the first message text input by the sending end; the preset target language is the display language type pre-configured by the sending end; sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the sending end; the sending end sending the second message text to the instant messaging server, and forwarding the second message text to the target receiving end through the instant messaging server.
[0272] In one embodiment, the AI translation processing server translates the first message text into text in a preset target language, which is then used as the second message text. The system further includes a forced display module, which is used to directly display the second message text on the target receiving end when the display language preset on the target receiving end is consistent with or inconsistent with the second message text.
[0273] In another embodiment, obtaining the first message text includes: the target receiving end receiving the first message text forwarded by the instant messaging server; the preset target language is the display language type pre-configured by the target receiving end; then, sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the target receiving end.
[0274] In another embodiment, obtaining the first message text includes: the AI translation processing server receiving the first message text forwarded by the instant messaging server; the preset target language is the display language type pre-configured by the target receiving end; and sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the target receiving end.
[0275] Optionally, the translation module 52 is used to enable the AI translation processing server to translate the first message text into text in a preset target language, including:
[0276] The translation task is broken down into multiple subtasks, and the multiple subtasks are sent to the corresponding translation instances in the AI translation processing server for parallel processing;
[0277] The number of AI translation processing server instances is dynamically adjusted based on the number of translation tasks, so as to automatically expand or shrink the number of instances.
[0278] The step of dynamically adjusting the number of AI translation processing server instances based on the number of translation tasks includes:
[0279] Obtain monitoring metrics;
[0280] Set a corresponding scaling threshold for each of the monitoring indicators;
[0281] Based on the monitoring indicators and the corresponding scaling thresholds, a scaling strategy is set, which includes timed scaling, threshold scaling, or predictive scaling.
[0282] Based on the aforementioned scaling strategy, scaling operations are executed automatically;
[0283] The automatic execution of scaling operations based on the scaling strategy includes:
[0284] Create an instance and add it to the backend service list, or delete one or more instances from the backend service list and destroy the one or more instances to release resources.
[0285] The system further includes a splitting and caching module 54 (not shown in the figure), which enables the AI translation processing server to split and cache the first message text and the corresponding translation result, so that in the next translation task, the corresponding cached translation result is directly returned for the text to be translated that is completely the same as the first message text, and incremental translation is performed for the text to be translated that is partially the same as the first message text.
[0286] Incremental translation is performed on the text to be translated that partially overlaps with the first message text, including:
[0287] The text to be translated that is repeated in the first message text will be segmented;
[0288] The segmented text to be translated is compared with the content of the cached first message text to obtain newly added text segments, repeated text segments, and translation segments corresponding to the repeated text segments.
[0289] The newly added text paragraphs are translated, and the translated fragments are spliced together to determine the complete translation result.
[0290] Optionally, the system further includes:
[0291] Module 55 (not shown in the figure) is used to call the translation interface of the AI translation processing server in a batch or asynchronous manner.
[0292] In another embodiment, the translation module 52 is used to enable the AI translation processing server to translate the first message text into text in a preset target language, including:
[0293] The AI translation processing server uses a generative artificial intelligence AIGC model to translate the first message text into text in a pre-set target language.
[0294] In addition, the translation module is also used for:
[0295] Obtain the training dataset;
[0296] Build an AIGC model;
[0297] The AIGC model is pre-trained using the training dataset.
[0298] Fine-tuning of the pre-trained AIGC model;
[0299] The finely tuned AIGC model is then optimized for inference.
[0300] The process of translating the first message text into text in a pre-defined target language using a generative artificial intelligence (AIGC) model includes:
[0301] Construct a professional domain dictionary database, which contains professional terms, phrases and sentence structures from different fields;
[0302] Based on the aforementioned professional domain dictionary database, the AIGC model is fine-tuned for specific domains;
[0303] The first message text is obtained, and based on a professional domain dictionary database, the first message text is aligned with domain terms, and the technical terms appearing in the first message text are marked as specific identifiers.
[0304] The first message text is translated using the fine-tuned AIGC model, and the content corresponding to the specific identifier is adjusted in the translation result.
[0305] The AIGC model is incrementally learned and iteratively optimized to dynamically adjust the translation results.
[0306] Optionally, the preset target language includes multiple target languages, and the target receiving end includes multiple clients; the system further includes a judgment module for judging whether the first message text originates from a group chat of an instant messaging system; if so, the translation module specifically translates the first message text into text in multiple preset target languages according to the display language types pre-configured for each client in the group chat; obtaining the second message text based on the text in the preset target languages specifically includes: integrating the text in the multiple preset target languages and the first message text into the second message text.
[0307] Optionally, the system further includes a display management module, which enables each client to display part or all of the content in the second message text according to its own pre-configured display language.
[0308] This application provides an AI translation system that automatically translates a first text message into a target language and sends it to the target client in real time. In addition, for multiple target languages, it can translate into multiple different target languages in real time and send the multiple target languages to multiple target clients, so that users of different language families can see the same sentence in different target languages in the same group chat interface in real time. This eliminates the need for manual translation for different users of different language families, improves translation efficiency, and enhances user experience.
[0309] Example 5
[0310] This application embodiment also provides a computer device, the computer device comprising:
[0311] At least one processor; and,
[0312] A memory communicatively connected to the at least one processor; wherein,
[0313] The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform the AI translation method described above.
[0314] This application also provides a computer-readable storage medium that stores computer instructions for causing a computer to perform the AI translation method described above.
[0315] This application also provides a computer program product, including computer instructions, characterized in that the computer instructions, when executed by a processor, implement the steps of the above-described AI translation method.
[0316] The modules in the aforementioned AI translation system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0317] In one embodiment, a computer device is also provided, which is the AI translation system mentioned in the above method embodiments. Its internal structure diagram is shown in Figure 6. The computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces.
[0318] The processor in this computer device provides computing and control capabilities and can be a general-purpose processor, central processing unit, graphics processing unit, digital signal processor, programmable logic device, quantum computing-based data processing logic device, etc., but is not limited to these. The processor may include one or more processors, such as one or more central processing units (CPUs). If the processor is a CPU, it can be a single-core CPU or a multi-core CPU. The processor may also include one or more dedicated processors, such as GPUs and FPGAs, for accelerated processing. The processor is used to call program code and data in the memory to execute the steps in the above method embodiments. For details, please refer to the description in the method embodiments, which will not be repeated here.
[0319] The memory of this computer device includes, but is not limited to, non-volatile storage media and internal memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media.
[0320] The computer device's input / output interface is used for exchanging information between the processor and external devices. The computer device's communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an AI translation method.
[0321] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be read-only memory (ROM), random access memory (RAM), or magnetic media, such as floppy disks, hard disks, magnetic tapes, magnetic disks, or optical media, such as digital versatile discs (DVDs), or semiconductor media, such as solid-state disks (SSDs).
[0322] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A method for AI-automated synchronous translation of instant messaging messages, characterized in that, Applied to instant messaging systems, the method includes: Get the first message text; Upload the first message text to the AI translation processing server; The AI translation processing server translates the first message text into text in a preset target language, and obtains the second message text based on the text in the preset target language. The preset target language is a preset by the sending end and / or the target receiving end. Send the second message text to the target receiver.
2. The method according to claim 1, characterized in that, If both the sending end and the target receiving end have preset target languages, then the AI translation processing server translates the first message text into text in the preset target language, including: the AI translation processing server translating the first message text into text in the target language preset by the sending end.
3. The method according to claim 1, characterized in that, The step of obtaining the first message text includes: obtaining the first message text input by the sending end; The preset target language is the display language type pre-configured by the sending end; Sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the sending end; the sending end sending the second message text to the instant messaging server, and the instant messaging server forwarding the second message text to the target receiving end.
4. The method according to claim 3, characterized in that, The AI translation processing server translates the first message text into text in a preset target language, which is then used as the second message text. The method further includes: when the display language type pre-configured on the target receiving end is the same as or different from the second message text, the target receiving end directly displays the second message text.
5. The method according to claim 1, characterized in that, The step of obtaining the first message text includes: the sending end sending the input first message text to the instant messaging server, and the target receiving end receiving the forwarded message text from the instant messaging server. The first message text; The preset target language is the display language type pre-configured on the target receiving end; Sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the target receiving end.
6. The method according to claim 1, characterized in that, The process of obtaining the first message text includes: the sending end sending the input first message text to the instant messaging server, and the AI translation processing server receiving the first message text forwarded by the instant messaging server; The preset target language is the display language type pre-configured on the target receiving end; Sending the second message text to the target receiving end includes: the AI translation processing server sending the second message text to the target receiving end.
7. The method according to claim 1, characterized in that, The preset target language includes multiple target languages, and the target receiving end includes multiple clients; the method further includes: determining whether the first message text originates from a group chat of an instant messaging system; if so, the AI translation processing server translates the first message text into text in multiple preset target languages according to the display language types pre-configured by each client in the group chat; The step of obtaining the second message text based on the text in the preset target language includes: integrating the text in the multiple preset target languages and the first message text into the second message text.
8. The method according to claim 7, characterized in that, The method further includes: each client displaying part or all of the content in the second message text according to its own pre-configured display language.
9. The method according to claim 1, characterized in that, The AI translation processing server translates the first message text into text in a preset target language, including: The translation task is broken down into multiple subtasks, and the multiple subtasks are sent to the corresponding translation instances in the AI translation processing server for parallel processing; The number of AI translation processing server instances is dynamically adjusted based on the number of translation tasks, so as to automatically expand or shrink the number of instances.
10. The method according to claim 9, characterized in that, The method of dynamically adjusting the number of AI translation processing server instances based on the number of translation tasks includes: Obtain monitoring metrics; Set a corresponding scaling threshold for each of the monitoring indicators; Based on the monitoring indicators and the corresponding scaling thresholds, a scaling strategy is set, which includes timed scaling, threshold scaling, or predictive scaling. Based on the aforementioned scaling strategy, scaling operations are executed automatically; The automatic execution of scaling operations based on the scaling strategy includes: Create an instance and add it to the backend service list, or delete one or more instances from the backend service list and destroy the one or more instances to release resources.
11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: The AI translation processing server splits and caches the first message text and the corresponding translation result so that in the next translation task, it can directly return the corresponding cached translation result for the text to be translated that is completely the same as the first message text, and perform incremental translation for the text to be translated that is partially the same as the first message text.
12. The method according to claim 11, characterized in that, Incremental translation is performed on the text to be translated that overlaps with a portion of the first message text, including: The text to be translated that is repeated in the first message text will be segmented; The segmented text to be translated is compared with the content of the cached first message text to obtain newly added text segments, repeated text segments, and translation segments corresponding to the repeated text segments. The newly added text paragraphs are translated, and the translated fragments are spliced together to determine the complete translation result.
13. The method according to any one of claims 1 to 10, characterized in that, Before the AI translation processing server translates the first message text into text in a preset target language, the method further includes: The translation interface of the AI translation processing server can be invoked using either batch or asynchronous calls.
14. The method according to claim 1, characterized in that, The AI translation processing server translates the first message text into text in a preset target language, including: The AI translation processing server uses a generative artificial intelligence AIGC model to translate the first message text into text in a pre-set target language.
15. The method according to claim 14, characterized in that, Before the AI translation processing server uses a generative artificial intelligence AIGC model to translate the first message text into text in a preset target language, the method further includes: Obtain the training dataset; Build an AIGC model; The AIGC model is pre-trained using the training dataset. Fine-tuning of the pre-trained AIGC model; The finely tuned AIGC model is then optimized for inference.
16. The method according to claim 14 or 15, characterized in that, Using a generative artificial intelligence (AIGC) model, the first message text is translated into text in a pre-defined target language, including: Construct a professional domain dictionary database, which contains professional terms, phrases and sentence structures from different fields; Based on the aforementioned professional domain dictionary database, the AIGC model is fine-tuned for specific domains; The first message text is obtained, and based on a professional domain dictionary database, the first message text is aligned with domain terms, and the technical terms appearing in the first message text are marked as specific identifiers. The first message text is translated using the fine-tuned AIGC model, and the content corresponding to the specific identifier is adjusted in the translation result.
17. The method according to claim 16, characterized in that, The method further includes: The AIGC model is incrementally learned and iteratively optimized to dynamically adjust the translation results.
18. A system for AI-automated synchronous translation of instant messaging messages, characterized in that, Applications in the field of instant messaging include: The acquisition module is used to acquire the text of the first message; The translation module is used to upload the first message text to the AI translation processing platform. The server enables the AI translation processing server to translate the first message text into text in a preset target language, and obtain the second message text based on the text in the preset target language. The preset target language is a preset by the sending end and / or the target receiving end. The sending module is used to send the second message text to the target receiving end.
19. A computer device, characterized in that, The computer device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the instant messaging message AI automatic synchronous translation method according to any one of claims 1-17.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of AI-automated synchronous translation of instant messaging messages as described in any one of claims 1-17.
21. A computer program product comprising computer instructions, characterized in that, When executed by a processor, the computer instructions implement the steps of the method for automatic synchronous translation of instant messaging messages using AI as described in any one of claims 1 to 17.
Citation Information
Patent Citations
Method, apparatus and system for automatically translating text message in instant communication software
CN105335355A
A multi-language chat mobile application
CN109921983A
Translation method and device, electronic equipment and storage medium
CN113935339A
Method for translating an instant message into multiple languages in real-time
KR102525697B1