A business text real-time translation method and system based on artificial intelligence

By employing a multi-agent collaborative architecture and a Transformer network optimized with an integrated loss function, combined with TF-IDF and BERT models, the problems of scene adaptability and real-time performance in business text translation were solved, achieving efficient and accurate business text translation and improving user experience.

CN120218090BActive Publication Date: 2025-11-07XIAN INST OF INTERPRETATION & TRANSLATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510374657.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-11-07
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

Existing business text translation technologies have significant shortcomings in terms of imbalance between scenario generalization and specialization, insufficient adaptation of static features, high computational complexity, and lack of user feedback mechanisms, making it difficult to meet the needs of high real-time and personalized translation.

Method used

A multi-agent collaborative architecture is adopted, combining the TF-IDF algorithm and the BERT model for text data analysis. The Transformer network is improved by optimizing the integration loss function to achieve a dynamic terminology database and culture-aware attention. The agent is dynamically changed based on user feedback to achieve real-time translation in specific business scenarios.

Benefits of technology

It achieves adaptive translation in specific business scenarios, improves translation accuracy and real-time performance, enhances user experience, and solves the problems of poor translation quality and real-time performance bottlenecks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218090B_ABST
    Figure CN120218090B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of text translation, and provides a business text real-time translation method and system based on artificial intelligence, which comprises the following steps: intelligent agent construction, acquisition of text data to be translated, calculation of scene classification probability data, matching of translation subject model, text data translation, and feedback information processing; through the multi-agent collaborative architecture, the application realizes the translation task in a specific scene and improves the applicability of translation; through the TF-IDF algorithm and the BERT model, the dynamic scheduling and accurate matching of the intelligent agent are realized, and the reliability of the translation model is improved; through the loss function integrating the overall loss, the semantic loss, the style loss and the cultural loss, the sensitivity of the translation model in terms of semantics, style and culture is improved, and the model translation accuracy and parity are improved; through the collection of user feedback and the replacement of intelligent agents, the improvement of user experience and the switching of translation styles are realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of text translation, in particular to a business text real-time translation method and system based on artificial intelligence. BACKGROUND

[0002] NMT is an abbreviation of neural machine translation. The existing business text translation technology is mainly based on the NMT framework, taking the Transformer model as the core, and realizing end-to-end text conversion through large-scale bilingual corpus training. The general NMT model captures the context dependency relationship through the self-attention mechanism, and performs excellently in the translation task of the open field. In the specific implementation, the input text is extracted by the encoder to obtain semantic features, and then the decoder generates the sequence of the target language, and the model parameters are optimized through the loss function. Some improved methods inject a small amount of business field data into the general model through domain adaptation technology to improve the translation accuracy of professional terms.

[0003] However, the above-mentioned technology has significant defects in the actual business scene. Scene generalization and professional imbalance: a single model is difficult to meet the differentiated needs of different scenes, resulting in term misinterpretation and style mismatch; static feature adaptation is insufficient: traditional methods rely on fixed term libraries and weight distribution, and cannot dynamically adjust the translation strategy. Efficiency and real-time bottleneck: the deep Transformer model has high computational complexity, and the average response time is more than 3 seconds, which is difficult to meet the needs of high real-time scenes such as business negotiations; lack of user feedback mechanism: when the translation result is wrong, the model cannot be replaced and regenerated through user feedback. SUMMARY

[0004] In order to overcome the deficiencies of the prior art, the purpose of the present application is to provide a business text real-time translation method and system based on artificial intelligence, which realizes adaptive translation in specific business scenarios.

[0005] To achieve the above-mentioned purpose, the present application provides the following solutions:

[0006] A business text real-time translation method based on artificial intelligence, comprising:

[0007] Collecting business text data translated under different business scenarios, designing a network model for each business scenario, and training the network model with the same business text data as the business scenario based on the loss function integrating the overall loss, semantic loss, style loss and cultural loss, to obtain a plurality of agents;

[0008] Real-time collection of communication text in the communication process of users and customers or business files uploaded by users to obtain text data to be translated;

[0009] The TF-IDF algorithm and the BERT model are used for word frequency statistics, context information extraction and style classification of the to-be-translated text data, to obtain word frequency data, context keywords and text format types, and the word frequency data, the context keywords and the text format types are used for application scenario matching of the to-be-translated text data, to obtain scenario classification probability data;

[0010] According to the scenario classification probability data and the agent, a translation subject model is determined;

[0011] The translation subject model is used for translation of the to-be-translated text data, to obtain real-time translation results;

[0012] Feedback information of a user is collected, if the feedback information is a translation error, the agent is replaced according to the scenario classification probability data, the replaced agent is determined as the translation subject model, and the step of “using the translation subject model to translate the to-be-translated text data to obtain real-time translation results” is returned.

[0013] Preferably, the construction process of the agent comprises:

[0014] A Transformer improved network is constructed, which comprises an input processing layer, an encoder layer, a decoder layer and a linear projection layer connected in sequence; the input processing layer comprises a word embedding module, a position encoding module and a dynamic terminology library interface module connected in sequence; the encoder layer comprises a multi-head self-attention module fusing a cultural perception attention head and a local attention window, an intertextuality enhancement module, a feedforward network module, an encoding residual connection and layer normalization module connected in sequence; the decoder layer comprises an input processing module fusing a template cache area, a masked multi-head self-attention module, a standard cross-sequence attention module, a sequence labeling head module and a decoding residual connection and layer normalization module connected in sequence;

[0015] The word embedding module, the position encoding module and the dynamic terminology library interface module are respectively used for word vector mapping, mixed position encoding and professional term retrieval and word embedding of pre-collected standard translation text data, to obtain an input vector;

[0016] The cultural perception attention head is used to load a pre-injected external knowledge graph, the local attention window is used to limit an attention range, and the multi-head self-attention module is used to perform weighted vector splicing and linear transformation fusion on the input vector according to the external knowledge graph and the attention range, to obtain a fusion result;

[0017] The intertextuality enhancement module is used to extract cross-sentence keywords from the fusion result, to obtain a context enhancement vector;

[0018] performing nonlinear activation processing on the context enhancement vector by using the feedforward network module, and integrating the output of the feedforward network module by using the encoding residual connection and layer normalization module to obtain an encoding output;

[0019] loading a high-frequency term template in the fusion template cache area in the input processing module;

[0020] using the mask multi-head self-attention module for subsequent sequence position shielding on the encoding output to obtain a context representation;

[0021] extracting an alignment relationship from the context representation by using the standard cross-sequence attention module according to the high-frequency term template to obtain a cross-modal representation;

[0022] performing fixed format label prediction on the cross-modal representation by using the sequence labeling head module, and integrating the output of the sequence labeling head module by using the decoding residual connection and layer normalization module to obtain a decoding output;

[0023] mapping the decoding output to a target language space by using the linear projection layer to obtain a model translation output.

[0024] Preferably, the communication text in the communication process of the user and the customer or the business file uploaded by the user is collected in real time to obtain the text data to be translated, including:

[0025] guiding the user to expand the information acquisition plug-in to the communication platform;

[0026] when the user selects single sentence translation, extracting the target sentence selected by the user on the communication platform to obtain the text data to be translated;

[0027] when the user selects real-time translation, extracting all speech texts in the user chat window on the communication platform based on user name label classification to obtain the text data to be translated;

[0028] when the user communicates through the voice communication mode or the video communication mode of the communication platform, the voice information in the communication window created by the user is listened to by using the cloud voice recognition algorithm, speaker separation technology and noise suppression algorithm, and the voice information is converted into text form to obtain the text data to be translated;

[0029] when the business file is a non-text file, the text information of the business file is extracted by using the OCR technology, and the spelling correction and missing filling are performed on the extracted text information by using the BERT-Corrector model to obtain the text data to be translated.

[0030] Preferably, the calculation formula of the scene classification probability data is:

[0031] S q = p1 sim(F0, F) + p2 sim(K0, K) + p3 sim(T0, T); TF 0q KW 0q FMT 0q

[0032] wherein S q is the matching degree of the text data to be translated to the qth business scene; p1, p2 and p3 are respectively the first weight, the second weight and the third weight; sim TF (·), sim KW (·) and sim FMT (·) respectively represent cosine similarity calculation, Jaccard similarity calculation and Boolean matching; F0, K0 and T0 respectively represent the word frequency data, the previous keywords and the text format type; F 0q , K 0q and T 0q respectively represent the reference word frequency, the keyword set and the format type set of the qth business scene.

[0033] Preferably, the business scene includes: advertisement, business letter and business contract.

[0034] Preferably, the expression of the dynamic term library interface module is:

[0035] D = LayerNorm(E + σ(W d ·[E; t])⊙t);

[0036] wherein D is the output of the dynamic term library interface module; LayerNorm(·) represents layer normalization calculation; E is the word embedding vector; σ(·) is the Sigmoid function; W d is the gating weight matrix; t is the term embedding retrieved by the dynamic term library; and ⊙ represents element-wise multiplication.

[0037] The expression of the culture-aware attention head is:

[0038]

[0039] wherein Attention c (Q, K, V) represents the output of the culture-aware attention head; Q, K and V are respectively the query matrix, the key matrix and the value matrix; softmax(·) is the normalization matrix; d k is the attention dimension; K​​​​​​kq is a knowledge graph key matrix; T represents a transpose operation;

[0040] The expression of the input processing module is:

[0041] T = Concat(H, T embed ) · W t ;

[0042] wherein T is the output of the input processing module; Concat(·) represents a concatenation operation; H is an input vector; T embed is a high-frequency term template embedding; W t is a projection matrix.

[0043] Preferably, the text format types include: letters, contracts, reports, technical documents, manuscripts, proposals, statements, and unformatted texts.

[0044] Preferably, the method further comprises:

[0045] According to the model translation output and the standard translation text data, a loss function is calculated to obtain a total loss value; the expression of the loss function is:

[0046] L total = αL gobol + βL semanitc + γL style + δL cutre ;

[0047] wherein L gobol = CrossEntropy(Y pred , Y rtue );

[0048]

[0049] L culture = ∑ c∈C GAT(c, G) · Accuracy(c);

[0050] [α, β, γ, δ] = Softmax(f ω (s));

[0051] L total is the total loss value; α, β, γ, δ are respectively a global translation weight, a professional term translation weight, a style weight, and a cultural adaptation weight; L gobol , L semanitc , L style , L cutre are respectively the overall loss, the semantic loss, the style loss, and the cultural loss; Y pred , Yrtue respectively are the predicted probability distribution and the standard translation distribution; CrossEntropy(·) represents the cross-entropy calculation; T represents the dynamic terminology library; N is the number of terms in the current batch; w i is the ith target language word; I(·) is an indicator function, outputting 1 when the internal condition is met, and 0 otherwise; D KL (·) represents the relative entropy calculation; p θ (w i ), p ref (w i ) respectively represent the predicted probability distribution of w i and the standard distribution of w i in the dynamic terminology library; φ s (·) represents the encoder layer; X src , Y pred respectively represent the source language text and the target language predicted text; C represents the set of culture-loaded words; c is a single element in the set of culture-loaded words; G represents the cultural knowledge graph; GAT(c, G) is the culture-sensitive weight output by the attention network; Accuracy(c) is the culture word translation accuracy; f ω (s) represents the weight distribution network;

[0052] According to the total loss value, the overall loss, the semantic loss, the style loss, and the culture loss, loss gradient calculation and gradient clipping are performed to obtain gradient data. According to the gradient data, the model parameters of the improved Transformer network are iteratively optimized using a gradient backpropagation strategy, and the learning rate of the gradient backpropagation strategy is dynamically adjusted using an Adam optimizer during the iteration process, thereby obtaining the trained intelligent agent.

[0053] Preferably, the non-text type files include pdf files, JPEG pictures, and PNG pictures; the cloud voice recognition algorithm is an ASR model; the speaker separation technology includes a gated convolutional network and a deep clustering algorithm; and the noise suppression algorithm is a DCCRN model.

[0054] Preferably, an artificial intelligence-based business text real-time translation system comprises:

[0055] A model construction subsystem is configured to collect the translated business text data under different business scenarios, design a network model for each business scenario, train the network model using the business text data of the same business scenario based on the loss function, and obtain a plurality of intelligent agents.

[0056] A data acquisition subsystem is configured to collect the communication text in the communication process between the user and the client or the business file uploaded by the user in real time to obtain the to-be-translated text data;

[0057] A scene classification subsystem is configured to use a TF-IDF algorithm and a BERT model to perform word frequency statistics, context information extraction, and style classification on the to-be-translated text data to obtain word frequency data, context keywords, and a text format type, and perform application scenario matching on the to-be-translated text data according to the word frequency data, the context keywords, and the text format type to obtain scene classification probability data;

[0058] A model matching subsystem is configured to match the scene classification probability data with the intelligent agent to determine the translation subject model;

[0059] A text translation subsystem is configured to use the translation subject model to translate the to-be-translated text data to obtain real-time translation results;

[0060] A user feedback subsystem is configured to collect the feedback information of the user, and if the feedback information is a translation error, replace the intelligent agent according to the scene classification probability data, determine the replaced intelligent agent as the translation subject model, and return to the step of using the translation subject model to translate the to-be-translated text data to obtain real-time translation results.

[0061] The present application discloses the following technical effects:

[0062] The present application provides a business text real-time translation method and system based on artificial intelligence, which solves the problem of poor business text translation effect caused by the generalization model of the existing translation system through a multi-agent collaborative architecture, and realizes the translation task in a specific scenario; solves the scheduling problem of different intelligent agents through a TF-IDF algorithm and a BERT model, and realizes the dynamic scheduling and accurate matching of intelligent agents; solves the problem of poor effect of conventional translation models in terms of semantics, style, and culture by integrating the loss function of overall loss, semantic loss, style loss, and cultural loss, and realizes the improvement of model translation accuracy and parity; solves the problem of user dissatisfaction with the translation results of the matched intelligent agent by collecting user feedback and replacing the intelligent agent, and realizes the improvement of user experience and the switching of translation styles. BRIEF DESCRIPTION OF DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0064] Figure 1 A business text real-time translation process based on artificial intelligence provided by the embodiment of the present application is shown in the figure.

[0065] Figure 2 A construction process of an intelligent agent provided by the embodiment of the present application is shown in the figure.

[0066] Figure 3 A text data acquisition process provided by the embodiment of the present application is shown in the figure.

[0067] Figure 4 A model training process provided by the embodiment of the present application is shown in the figure.

[0068] Figure 5 A business text real-time translation system based on artificial intelligence provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0069] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0070] The purpose of the present application is to provide a business text real-time translation method and system based on artificial intelligence, which realizes adaptive translation in specific business scenarios.

[0071] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0072] Figure 1 A business text real-time translation process based on artificial intelligence provided by the embodiment of the present application is shown in the figure. Figure 1 A business text real-time translation method based on artificial intelligence provided by the present application is shown in the figure.

[0073] Step 100: Collect translated business text data under different business scenarios, design a network model for each business scenario, train the network model using the same business text data as the business scenario of the network model based on the loss function integrating overall loss, semantic loss, style loss and cultural loss, and obtain a plurality of agents;

[0074] Step 200: Real-time collection of communication text in the communication process of users and customers or business files uploaded by users to obtain text data to be translated;

[0075] Step 300: Use TF-IDF algorithm and BERT model to count word frequency, extract context information and classify style of the text data to be translated, obtain word frequency data, context keywords and text format type, and match the application scenario of the text data to be translated according to the word frequency data, context keywords and text format type, and obtain scenario classification probability data;

[0076] Step 400: Match the scenario classification probability data and the agent to determine the translation subject model;

[0077] Step 500: Translate the text data to be translated using the translation subject model to obtain real-time translation results;

[0078] Step 600: Collect feedback information of the user, if the feedback information is translation error, replace the agent according to the scenario classification probability data, determine the replaced agent as the translation subject model, and return to the step of "using the translation subject model to translate the text data to be translated to obtain real-time translation results".

[0079] Reference Figure 2 The construction process of the agent includes:

[0080] Step 501: Construct a Transformer improved network; the Transformer improved network includes: an input processing layer, an encoder layer, a decoder layer and a linear projection layer connected in sequence; the input processing layer includes: a word embedding module, a position encoding module and a dynamic terminology library interface module connected in sequence; the encoder layer includes: a multi-head self-attention module integrating a cultural perception attention head and a local attention window, an intertextuality enhancement module, a feedforward network module, an encoding residual connection and layer normalization module connected in sequence; the decoder layer includes: an input processing module integrating a template cache area, a masked multi-head self-attention module, a standard cross-sequence attention module, a sequence labeling head module and a decoding residual connection and layer normalization module connected in sequence;

[0081] Step 502: respectively using the word embedding module, the position coding module, the dynamic terminology library interface module to the pre-collected standard translation text data for word vector mapping, mixed position coding and professional term retrieval and word embedding, get the input vector;

[0082] Step 503: load the pre-injected external knowledge graph using the cultural perception attention head, limit the attention range using the local attention window, and use the multi-head self-attention module to perform weighted vector splicing and linear transformation fusion on the input vector according to the external knowledge graph and the attention range, get the fusion result;

[0083] Step 504: use the intertextuality enhancement module to extract cross-sentence keywords from the fusion result, get the context enhanced vector;

[0084] Step 505: use the feedforward network module to perform nonlinear activation processing on the context enhanced vector, and use the encoding residual connection and layer normalization module to integrate the output of the feedforward network module, get the encoding output;

[0085] Step 506: load the high-frequency term template using the fusion template cache area in the input processing module;

[0086] Step 507: use the mask multi-head self-attention module to shield the subsequent sequence position of the encoding output, get the context representation;

[0087] Step 508: use the standard cross-sequence attention module to extract the alignment relationship of the context representation according to the high-frequency term template, get the cross-modal representation;

[0088] Step 509: use the sequence labeling head module to predict the fixed format label of the cross-modal representation, and use the decoding residual connection and layer normalization module to integrate the output of the sequence labeling head module, get the decoding output;

[0089] Step 510: map the decoding output to the target language space using the linear projection layer, get the model translation output.

[0090] Reference Figure 3 , real-time collection of communication text in user and customer communication process or user uploaded business files, get the text data to be translated, including:

[0091] Step 201: guide the user to extend the information acquisition plug-in to the communication platform;

[0092] Step 202: when the user selects single sentence translation, extract the target sentence selected by the user on the communication platform, get the text data to be translated;

[0093] Step 203: When the user selects real-time translation, all speech text in the user's chat window on the communication platform is extracted based on the user name tag classification to obtain the text data to be translated;

[0094] Step 204: When the user communicates through the voice communication mode or the video communication mode of the communication platform, the voice information in the communication window created by the user is listened to by using the cloud voice recognition algorithm, the speaker separation technology and the noise suppression algorithm, and the voice information is converted into text form to obtain the text data to be translated;

[0095] Step 205: When the business file is a non-text file, the text information of the business file is extracted by using the OCR technology, and the BERT-Corrector model is used to correct the spelling and fill in the missing of the extracted text information to obtain the text data to be translated.

[0096] Specifically, the calculation formula of the scene classification probability data is:

[0097] S q =p1·sim TF F0,F 0q +p2·sim KW K0,K 0q +p3·sim FMT T0,T 0q ;

[0098] Wherein, S q is the matching degree of the text data to be translated to the qth business scene; p1, p2 and p3 are the first weight, the second weight and the third weight respectively; sim TF (·), sim KW (·) and sim FMT (·) represent cosine similarity calculation, Jaccard similarity calculation and Boolean matching respectively; F0, K0 and T0 represent word frequency data, keywords and text format type respectively; F 0q , K 0q , T 0q represent the reference word frequency, the keyword set and the format type set of the qth business scene respectively.

[0099] Optionally, the business scene includes: advertising language, business letter and business contract.

[0100] Specifically, the expression of the dynamic term library interface module is:

[0101] D=LayerNorm(E+σ(W d ·E;t)⊙t);

[0102] Wherein, D is the output of the dynamic terminology library interface module; LayerNorm(·) represents layer normalization calculation; E is a word embedding vector; σ(·) is a Sigmoid function; W d is a gating weight matrix; t is a dynamic terminology library retrieval term embedding; ⊙ represents element-wise multiplication;

[0103] The expression of the culture-aware attention head is:

[0104]

[0105] Wherein, Attention c (Q,K,V) represents the output of the culture-aware attention head; Q, K, and V are query matrix, key matrix, and value matrix, respectively; softmax(·) is a normalization matrix; d k is an attention dimension; K kq is a knowledge graph key matrix; T represents a transpose operation;

[0106] The expression of the input processing module is:

[0107] T=ConcatH,T embed ·W t ;

[0108] Wherein, T is the output of the input processing module; Concat(·) represents a concatenation operation; H is an input vector; T embed is a high-frequency term template embedding; W t is a projection matrix.

[0109] Optionally, the text format type includes: letter, contract, report, technical document, manuscript, proposal, report form, and unformatted text.

[0110] Reference Figure 4 , also includes:

[0111] Step 511: Calculate the loss function according to the model translation output and the standard translation text data to obtain a total loss value; The expression of the loss function is:

[0112] L total =αL gobol +βL semanitc +γL style +δL cutre ;

[0113] Wherein, L gobol =CrossEntropy(Y pred ,Y rtue );

[0114]

[0115] L culture =∑ c∈C GAT(c,G)·Accuracy(c);

[0116] [α,β,γ,δ]=Softmax(f ω (s));

[0117] L total is a total loss value; α, β, γ, δ are global translation weight, professional term translation weight, style weight, and cultural adaptation weight, respectively; L gobol , L semanitc , L style , L cutre are overall loss, semantic loss, style loss, and cultural loss, respectively; Y pred , Y rtue are predicted probability distribution and standard translation distribution, respectively; CrossEntropy(·) represents cross-entropy calculation; T represents dynamic terminology library; N is the number of terms in the current batch; w i is the i-th target language word; I(·) is an indicator function, outputting 1 when the internal condition is met, and 0 otherwise; D KL (·) represents relative entropy calculation; p θ (w i ), p ref (w i ) are the predicted probability distribution of w i and the standard distribution of w i in the dynamic terminology library, respectively; φ s (·) represents an encoder layer; X src , Y pred represent source language text and target language predicted text, respectively; C represents a set of culture-loaded words; c is a single element in the set of culture-loaded words; G represents a cultural knowledge graph; GAT(c,G) is the cultural sensitivity weight output by the attention network; Accuracy(c) is the translation accuracy of the cultural word; f ω (s) represents a weight distribution network.

[0118] Step 512: loss gradient calculation and gradient clipping are performed according to the total loss value, overall loss, semantic loss, style loss, and cultural loss, to obtain gradient data; model parameters of the improved Transformer network are iteratively optimized using a gradient backpropagation strategy according to the gradient data, and the learning rate of the gradient backpropagation strategy is dynamically adjusted using an Adam optimizer during the iteration process, to obtain a trained intelligent agent.

[0119] Preferably, the non-text files include: pdf files, JPEG pictures, and PNG pictures; the cloud voice recognition algorithm is an ASR model; the speaker separation technology includes: a gated convolutional network and a deep clustering analysis algorithm; and the noise suppression algorithm is a DCCRN model.

[0120] Reference Figure 5 An AI-based business text real-time translation system, comprising:

[0121] A model construction subsystem is configured to collect business text data translated in different business scenarios, design a network model for each business scenario, train the network model based on a loss function using business text data of the same business scenario as the network model, and obtain a plurality of agents.

[0122] A data acquisition subsystem is configured to collect communication text in the communication process between a user and a client or a business file uploaded by the user in real time, and obtain text data to be translated.

[0123] A scenario classification subsystem is configured to use a TF-IDF algorithm and a BERT model to count word frequency, extract context information, and classify text styles of the text data to be translated, and obtain word frequency data, context keywords, and text format types, and match the application scenario of the text data to be translated according to the word frequency data, the context keywords, and the text format types, and obtain scenario classification probability data.

[0124] A model matching subsystem is configured to match the scenario classification probability data and the agents to determine a translation subject model.

[0125] A text translation subsystem is configured to translate the text data to be translated using the translation subject model to obtain real-time translation results.

[0126] A user feedback subsystem is configured to collect feedback information of the user, and if the feedback information is a translation error, replace the agents according to the scenario classification probability data, determine the replaced agents as the translation subject model, and return to the step of translating the text data to be translated using the translation subject model to obtain real-time translation results.

[0127] Specifically, the communication platform plug-in extension and text listening:

[0128] 1) Plug-in integration: guiding the user to install an information acquisition plug-in, embedding the plug-in into the interface layer of the target communication platform, and listening to the text input event of the chat window.

[0129] 2) Single sentence translation: after the user selects a target sentence, the plug-in extracts the sentence as text to be translated.

[0130] 3) Real-time Translation: Continuously capture all spoken text within the designated chat window based on user name tags, forming a real-time text stream.

[0131] Further, voice-to-text for voice / video communication:

[0132] 1) Noise Suppression: Denoise the original audio to separate pure speech from background noise.

[0133] 2) Speaker Separation: Extract voiceprint features using a gated convolutional network and combine them with a deep clustering algorithm to distinguish different speakers' speech segments.

[0134] 3) Speech Recognition: Convert the denoised speech stream into text through a cloud-based ASR model (end-to-end speech recognition model), supporting multi-language recognition and real-time streaming.

[0135] 4) Text Formatting: Segment the converted text by timestamp and speaker label to generate structured text data for translation.

[0136] Specifically, processing of non-text business documents:

[0137] 1) OCR Text Extraction: Use optical character recognition (OCR) technology to analyze the text content in the file; for complex formats such as tables and handwritten text, perform adaptive layout analysis to preserve the original layout logic.

[0138] 2) Text Correction and Completion: Use the BERT-Corrector model to correct spelling errors in the OCR-extracted text and fix recognition errors; based on context semantics, predict missing characters, such as completing incomplete words due to image blurring.

[0139] Preferably, the ASR model is based on an end-to-end deep learning architecture, combining an acoustic model with a language model. The acoustic model extracts the timing features of the speech signal through a convolutional neural network (CNN) or a Transformer, capturing the acoustic patterns at the phoneme level; the language model is based on a recurrent neural network or a self-attention mechanism, performing semantic correction and context completion on the converted text. The model realizes low-latency inference through cloud distributed computing resources, supports multi-language recognition, and can optimize the recognition accuracy of professional terms for business scenarios. The gated convolutional network dynamically adjusts the activation area of the convolution kernel through a gating mechanism (such as the GLU unit), extracts local features in the speech signal, and distinguishes the timbre and intonation characteristics of different speakers. Deep clustering analysis: map the spectral features of the speech signal to a high-dimensional space, separate the feature distribution of different speakers through clustering algorithms (such as K-means), and generate independent voice segments. DCCRN (Deep Complex Convolutional Recurrent Network) is based on a complex neural network that simultaneously processes amplitude and phase information of the speech signal. Through a complex convolutional layer, time-frequency domain features are extracted, and a recurrent neural network (such as LSTM) is used to model the timing dependency, dynamically separating noise and pure speech. The model uses a mask learning strategy to predict a noise mask and reconstruct the denoised speech signal, which is particularly suitable for conference noise or environmental noise commonly found in business scenarios.

[0140] Further, the dynamic terminology library interface module dynamically fuses general word embeddings and professional term embeddings through a gating mechanism, and combines layer normalization to stabilize the training process. This module flexibly calls the professional terminology library according to the context, solves the problem of misinterpretation of professional vocabulary in business text, and improves the accuracy and consistency of term translation.

[0141] Specifically, the culture-aware attention head introduces an external knowledge graph into the attention mechanism through a double bond matrix weighting, enhancing the sensitivity to culturally loaded words (such as etiquette language and regional expressions).

[0142] Optionally, accuracy and efficiency optimization of scene classification: the combined calculation of TF-IDF and BERT has a large overhead, so DistilBERT or ALBERT models can be used to improve efficiency and reduce costs; in addition, a business terminology graph can be constructed with the help of a graph neural network to improve classification accuracy. The specific implementation idea is: replace the BERT of the scene classification module with DistilBERT and fuse GNN features; collect business corpora for domain adaptation pre-training, construct a term co-occurrence graph, and extract key node embeddings.

[0143] Preferably, a real-time update mechanism for the dynamic terminology library is set up, new terms are extracted from user feedback, the terminology library is automatically updated, or industry terminology databases are periodically crawled, and historical versions are preserved to support error rollback.

[0144] Specifically, in response to mixed scene text (business communication without fixed scene), the multiple agent outputs are weighted and fused according to the scene probability, and the optimal result is selected by a voting mechanism using confidence.

[0145] Preferably, the embodiment is improved on the basis of the traditional Transformer model, which may cause the response speed of the final model to be reduced (the delay can be directly reduced by increasing the computing power), which is not conducive to the function of real-time translation. In order to the response speed of the model, the mature trained model can be knowledge distilled to train a lightweight student model to imitate the original agent; the model parameters are quantized to 8 bits, and redundant layers are pruned to obtain a low-parameter model.

[0146] The beneficial effects of the present application are as follows:

[0147] The present application realizes the translation task of specific scene through the multi-agent collaborative architecture, improves the applicability of translation; through the TF-IDF algorithm and the BERT model, the dynamic scheduling and accurate matching of the agent are realized, the reliability of the translation model is improved; through the loss function of integrating the overall loss, the semantic loss, the style loss and the cultural loss, the sensitivity of the translation model in the aspects of semantics, style and culture is improved, the model translation accuracy and parity are improved; through the collection of user feedback and agent replacement, the improvement of user experience and the switching of translation style are realized.

[0148] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the related parts can be referred to the method part.

[0149] The principles and implementation modes of the present application are described by applying specific examples in this paper, and the above embodiment description is only used to help understand the method and core idea of the present application; at the same time, for the general technical personnel in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In view of the above, the content of the specification should not be understood as a limitation of the present application.

Claims

1. An artificial intelligence-based real-time translation method for business text, characterized by, The method comprises the following steps: Collecting translated business text data in different business scenarios, designing a network model for each business scenario, training the network model using the same business text data as the business scenario based on a loss function integrating overall loss, semantic loss, style loss and cultural loss, and obtaining a plurality of agents; Real-time collection of communication text in the communication process between users and customers or user-uploaded business files to obtain text data to be translated; Using the TF-IDF algorithm and the BERT model to count word frequency, extract context information, and classify text style of the text data to be translated to obtain word frequency data, context keywords, and text format type, and matching the application scenario of the text data to be translated according to the word frequency data, the context keywords and the text format type to obtain scenario classification probability data; Matching the scenario classification probability data with the agents to determine a translation subject model; Using the translation subject model to translate the text data to be translated to obtain real-time translation results; Collecting user feedback information, if the feedback information is a translation error, replacing the agent according to the scenario classification probability data, determining the replaced agent as the translation subject model, and returning to the construction process of the agent in step "using the translation subject model to translate the text data to be translated to obtain real-time translation results", which comprises: Constructing a Transformer improved network; the Transformer improved network comprises an input processing layer, an encoder layer, a decoder layer and a linear projection layer connected in sequence; the input processing layer comprises a word embedding module, a position encoding module and a dynamic terminology library interface module connected in sequence; the encoder layer comprises a multi-head self-attention module integrating a cultural perception attention head and a local attention window, an intertextuality enhancement module, a feedforward network module, an encoding residual connection and layer normalization module connected in sequence; the decoder layer comprises an input processing module integrating a template cache area, a masked multi-head self-attention module, a standard cross-sequence attention module, a sequence labeling head module and a decoding residual connection and layer normalization module connected in sequence; Using the word embedding module, the position encoding module and the dynamic terminology library interface module to perform word vector mapping, hybrid position encoding and professional term retrieval and word embedding on the pre-collected standard translation text data to obtain an input vector; Loading the pre-injected external knowledge graph using the cultural perception attention head, limiting the attention range using the local attention window, and using the multi-head self-attention module to perform weighted vector splicing and linear transformation fusion on the input vector according to the external knowledge graph and the attention range to obtain a fusion result; Using the intertextuality enhancement module to extract cross-sentence keywords from the fusion result to obtain a context-enhanced vector; The context enhancement vector is subjected to nonlinear activation processing by using the feedforward network module, and the output of the feedforward network module is integrated by using the encoding residual connection and layer normalization module to obtain an encoding output; The high-frequency term template is loaded by using the fusion template cache area in the input processing module; The encoding output is subjected to subsequent sequence position shielding by using the mask multi-head self-attention module to obtain a context representation; The context representation is subjected to alignment relationship extraction by using the standard cross-sequence attention module according to the high-frequency term template to obtain a cross-modal representation; The cross-modal representation is subjected to fixed format label prediction by using the sequence labeling head module, and the output of the sequence labeling head module is integrated by using the decoding residual connection and layer normalization module to obtain a decoding output; The decoding output is mapped to a target language space by using the linear projection layer to obtain a model translation output; A loss function is calculated according to the model translation output and the standard translation text data to obtain a total loss value; the expression of the loss function is: L total = aL gobol + bL semanitc + cL style + dL cutre ; where L gobol = CrossEntropy(Y pred , Y rtue ); L culture =∑ c∈C GAT(c,G)·Accuracy(c); [α, β, γ, δ] = Softmax(f ω (s)); L total is the total loss value; a, b, g, d are global translation weight, professional term translation weight, style weight, and cultural adaptation weight, respectively; L gobol , L semanitc , L style , L cutre are the overall loss, semantic loss, style loss, and cultural loss, respectively; Y pred , Y rtue are the predicted probability distribution and the standard translation distribution, respectively; CrossEntropy(·) represents cross-entropy calculation; T represents a dynamic terminology library; N is the number of terms in the current batch; w i is the ith target language word; I(·) is an indicator function that outputs 1 when the internal condition is met, and otherwise outputs 0; D KL (·) represents relative entropy calculation; p θ (w i ), p ref (w i ) represent the predicted probability distribution of w i and the standard distribution of w i in the dynamic terminology library, respectively; φ s (·) represents the encoder layer; X src , Y pred represent the source language text and the target language predicted text, respectively; C represents a set of culture-loaded words; c is a single element in the set of culture-loaded words; G represents a cultural knowledge graph; GAT(c, G) is the cultural sensitivity weight output by the attention network; Accuracy(c) is the cultural word translation accuracy; f ω (s) represents a weight distribution network; Loss gradient calculation and gradient clipping are performed according to the total loss value, the overall loss, the semantic loss, the style loss and the culture loss to obtain gradient data, the model parameters of the improved Transformer network are iteratively optimized by using a gradient back propagation strategy according to the gradient data, and the learning rate of the gradient back propagation strategy is dynamically adjusted by using an Adam optimizer in the iteration process to obtain the trained intelligent agent.

2. The business text real-time translation method based on artificial intelligence according to claim 1, characterized in that, Real-time collection of communication texts in user and customer communication processes or user uploaded business files to obtain to-be-translated text data, including: Guiding the user to expand the information acquisition plug-in to the communication platform; When the user selects single sentence translation, the target sentence selected by the user on the communication platform is extracted to obtain the to-be-translated text data; When the user selects real-time translation, all speech texts in the user chat window on the communication platform are extracted based on user name tag classification to obtain the to-be-translated text data; When the user communicates through the voice communication mode or the video communication mode of the communication platform, the voice information in the communication window created by the user is listened to by using a cloud voice recognition algorithm, a speaker separation technology and a noise suppression algorithm, and the voice information is converted into a text form to obtain the to-be-translated text data; When the business file is a non-text file, the text information of the business file is extracted by using an OCR technology, and the extracted text information is subjected to spelling correction and missing filling by using a BERT-Corrector model to obtain the to-be-translated text data. 3.The business text real-time translation method based on artificial intelligence according to claim 1, characterized in that, The calculation formula of the scene classification probability data is: S q = p1 · sim TF (F0, F 0q ) + p2 · sim KW (K0, K 0q ) + p3 · sim FMT (T0, T 0q ) ; wherein, S q is the matching degree of the text data to be translated to the qth type of the business scenario; p1, p2, and p3 are respectively a first weight, a second weight, and a third weight; sim TF (·), sim KW (·), and sim FMT (·) respectively represent cosine similarity calculation, Jaccard similarity calculation, and Boolean matching; F0, K0, and T0 respectively represent the word frequency data, the previous keyword, and the text format type; F 0q , K 0q , and T 0q respectively represent the reference word frequency, the keyword set, and the format type set of the qth type of the business scenario.

4. The real-time business text translation method based on artificial intelligence according to claim 1, characterized in that, The business scenes include advertisement language, business letters and business contracts.

5. The real-time business text translation method based on artificial intelligence according to claim 1, characterized in that, The expression of the dynamic term library interface module is: D = LayerNorm(E + σ(W d • [E; t] ) 0 t); wherein D is the output of the dynamic terminology library interface module; LayerNorm(·) represents layer normalization calculation; E is a word embedding vector; σ(·) is a Sigmoid function; W d is a gating weight matrix; t is a term embedding of dynamic terminology library retrieval; and represents element-wise multiplication; The expression of the culture perception attention head is: wherein Attention c (Q,K,V) represents the output of the cultural-aware attention head; Q, K, and V are the query matrix, the key matrix, and the value matrix, respectively; softmax(·) is a normalization matrix; d k is the attention dimension; K kq is the knowledge graph key matrix; T represents the transpose operation; The expression of the input processing module is: T = Concat(H, T embed ) · W t ; wherein T is the output of the input processing module; Concat(·) represents a concatenation operation; H is an input vector; T embed is a high frequency term template embedding; W t is a projection matrix.

6. The real-time business text translation method based on artificial intelligence according to claim 1, characterized in that, The text format types include letters, contracts, reports, technical documents, manuscripts, proposals, reports and unformatted texts.

7. The real-time business text translation method based on artificial intelligence according to claim 2, characterized in that, The non-text files include: pdf files, JPEG pictures and PNG pictures; the cloud voice recognition algorithm is an ASR model; the speaker separation technology includes: a gated convolutional network and a deep clustering analysis algorithm; and the noise suppression algorithm is a DCCRN model.

8. An artificial intelligence-based business text real-time translation system applied to the artificial intelligence-based business text real-time translation method of claim 1, the system comprising: a model construction subsystem for collecting the business text data translated under different business scenarios, designing a network model for each business scenario, training the network model based on the loss function using the business text data of the same business scenario as the network model, and obtaining a plurality of agents; a data acquisition subsystem for collecting the communication text in the communication process between the user and the customer or the business file uploaded by the user in real time to obtain the text data to be translated; a scenario classification subsystem for using a TF-IDF algorithm and a BERT model to count word frequency, extract context information, and classify text styles of the text data to be translated to obtain word frequency data, context keywords, and text format types, and match the application scenario of the text data to be translated according to the word frequency data, the context keywords, and the text format types to obtain scenario classification probability data; a model matching subsystem for matching the scenario classification probability data and the agents to determine the translation subject model; a text translation subsystem for translating the text data to be translated using the translation subject model to obtain real-time translation results; a user feedback subsystem for collecting the feedback information of the user, and if the feedback information is a translation error, replacing the agent according to the scenario classification probability data, determining the replaced agent as the translation subject model, and returning to the step of "translating the text data to be translated using the translation subject model to obtain real-time translation results".

Citation Information

Patent Citations

  • Language model and agent combined translation method

    CN118643845A