A hybrid translation system and method based on embedded systems and edge AI

By using a hybrid translation system combining embedded systems and edge AI, the problem of translating professional terms and abbreviations in the industrial field has been solved. It achieves self-translation capabilities without modifying the system, improves translation accuracy and system stability, and is highly adaptable and widely applicable.

CN122452591APending Publication Date: 2026-07-24德龙软件科技(天津)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
德龙软件科技(天津)有限公司
Filing Date
2026-05-09
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing general-purpose translation engines cannot accurately translate professional terms and production-specific abbreviations in the industrial field. Furthermore, building translation modules for each system individually is time-consuming and difficult, and cannot solve the problem of accurate translation once and for all.

Method used

A hybrid translation system based on embedded systems and edge AI is adopted, including an embedded proxy server module, an edge AI translation server module, a text classification decision module, and a dynamic content monitoring module. The embedded system intercepts web requests and performs local translation, while edge AI is used for long text translation. The IndClassify algorithm is used for text classification, and the Edge-EmbedSched algorithm is used to achieve dynamic load balancing scheduling.

Benefits of technology

It enables self-translation without modifying the original system, is highly adaptable, and balances real-time translation with manual correction. It reduces deployment difficulty, improves convenience and flexibility, has a wide range of applications, and is highly practical and innovative, thus improving the accuracy and stability of industrial terminology translation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122452591A_ABST
    Figure CN122452591A_ABST
Patent Text Reader

Abstract

The application provides a hybrid translation system and method based on an embedded system and edge AI, comprising an embedded proxy server module, an edge AI translation server module, a text classification decision module, a dynamic content monitoring module and a translation closed loop module. The application greatly reduces the deployment difficulty, improves the convenience and flexibility, has a wide range of applications, and has high practicability and innovation by taking the embedded system as a carrier. Through the embedded proxy+edge AI hybrid translation architecture, plug and play, privacy security and offline availability are realized. Through length+term density dual text classification, industrial professional text translation is accurately adapted. Through dynamic load balancing scheduling, low delay, high accuracy and high stability are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, and in particular relates to a hybrid translation system and method based on embedded systems and edge AI. Background Technology

[0002] In the industrial sector, there are numerous technical terms and production-specific abbreviations. These terms and abbreviations are not accurately translated by existing general-purpose translation engines, making it impossible to directly translate specialized production management systems using these commercially available engines. Furthermore, most companies use multiple production management systems simultaneously. If traditional solutions are adopted to create translation modules for each system individually, the process is time-consuming and technically challenging, failing to provide a permanent solution to the problem of accurate translation. Summary of the Invention

[0003] The problem this invention aims to solve is to provide a hybrid translation system and method based on embedded systems and edge AI. This method uses embedded systems as carriers, which greatly reduces the difficulty of deployment, improves convenience and flexibility, has a wide range of applications, and has extremely high practicality and innovation.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a hybrid translation system based on embedded systems and edge AI, comprising, An embedded proxy server module is used to intercept web requests, parse HTML, perform local translation of short texts based on text classification, and rewrite resource paths. The edge AI translation server module is used to receive long text translation requests and return foreign language translations; The text classification decision module is used to determine whether a text is short or long based on a preset length threshold. The dynamic content monitoring module is used to translate newly added content on the page in real time. The translation closed-loop module is used to write the text that was not matched for translation into the translation database and write it back to the local lookup table.

[0005] Furthermore, the embedded proxy server module is based on ESP32 hardware, integrates a network module, and integrates an SQLite database storing translation lookup tables.

[0006] Furthermore, the edge AI translation server module is based on the NVIDIA Orin Nano Super suite, uses the TensorRT engine for inference, includes an AI language translation model, and provides a RESTful API interface for the embedded proxy server module to call.

[0007] Furthermore, the dynamic content monitoring module enables real-time communication between the embedded proxy server module and the browser client via WebSocket.

[0008] Furthermore, the text classification decision module incorporates the IndClassify algorithm, which is based on a dual classification mechanism of "length threshold + semantic features" to achieve accurate classification of text fragments.

[0009] Furthermore, the IndClassify algorithm includes, The semantic feature extraction unit is used to segment the input text fragments into words, match them with an industrial terminology lexicon, count the number of terms and the total vocabulary, and calculate the term density D. The dual-judgment unit is used to execute multiple judgment rules based on text length L and term density D, and output classification results for short text, quasi-long text, long text, or short text requiring manual intervention.

[0010] Furthermore, the judgment rules executed by the dual judgment unit include: Rule 1: If L≤L0 and D≥30%, it is judged as "quasi-long text", where L0 is the basic length threshold; Rule 2: If L > L0 and D < 10%, it is judged as "non-professional long text"; Rule 3: If L≤L0 and there are two or more consecutive unlisted industrial abbreviations, it is judged as "short text requiring manual intervention"; Rule 4: If any of the above rules are not met, the basic classification shall be used: L≤L0 and D<30% is “short text”; L>L0 and D≥10% is “long text”.

[0011] Furthermore, the embedded proxy server module and the edge AI translation server module are configured with an Edge-EmbedSched scheduling algorithm. The Edge-EmbedSched scheduling algorithm is used to implement dynamic load balancing translation path scheduling. The input parameters of the Edge-EmbedSched algorithm include: the text classification result output by the text classification decision module, the memory usage rate (Mem_usage) of the embedded proxy server, the TensorRT engine load (AI_load) of the edge AI translation server, the hit rate (Hit_rate) of the local translation lookup table, and the network connection status. The output of the Edge-EmbedSched algorithm includes: the optimal translation path, caching strategy, and exception handling instructions.

[0012] Furthermore, the scheduling rules executed by the Edge-EmbedSched algorithm include: For short texts: if Hit_rate ≥ 80%, return the translation result from the local lookup table directly; if Hit_rate < 80% and AI_load < 50%, prioritize querying the local lookup table and simultaneously initiate AI translation verification to the edge AI translation server; if Hit_rate < 80% and AI_load ≥ 50%, only query the local lookup table and mark the texts that did not match as pending AI verification. For near-long text or long text: Near-long text is directly redirected to the edge AI translation server to enable full inference mode; long text is split into industrial term fragments and ordinary text fragments when AI_load≥70%, and local lookup table lookup and edge AI lightweight inference mode are used respectively. For offline scenarios: short texts are queried normally in the local lookup table; quasi-long and long texts are split into short segments and matched with the local lookup table first. The parts that are not matched are marked as offline to be translated and will be synchronized to the edge AI translation server after the network is restored.

[0013] Furthermore, the present invention also provides a hybrid translation method based on embedded systems and edge AI, utilizing the aforementioned hybrid translation system based on embedded systems and edge AI, including the following steps: S1: The embedded system is powered on and connected to the network, loading the agent service, SQLite, text classification decision module, and short text translation module; S2: The client sends a request to the proxy service address, and the proxy service injects the text classification service into the client's browser; S3: The proxy service forwards requests to the target server and receives the response returned by the target server; S4: The proxy service forwards the response content to the client's text classification service; S5: The text classification service breaks down content into phrases or long texts based on text length; S6: If it is a phrase, send a request to the embedded system's short text translation module to obtain the phrase translation; if no corresponding translation is obtained, request automatic translation from the AI ​​translation server; after obtaining the phrase translation, replace the text content of the short text in the client's browser through the dynamic monitoring module and dynamically refresh the front-end interface. S7: If it is a long text or a text paragraph, a request is sent to the AI ​​translation server to call the AI ​​language translation model to translate the text. The TensorRT engine is used to accelerate inference, and the translation result is returned and cached in the embedded proxy server module. While the model is translating, the latest phrase translation is obtained from SQLite to ensure that the translation effect of long text is as professional, colloquial and abbreviated as that of short text. The dynamic listening module replaces the text content of short text in the client browser and dynamically refreshes the front-end interface.

[0014] The advantages and positive effects of this invention are: 1. This invention features a unique hybrid translation architecture combining "embedded agent + edge AI," enabling self-translation without modifying the original system. It requires no secondary development, boasts strong adaptability, and protects enterprise information security. It supports both real-time translation and manual correction, enabling both rapid phrase translation and real-time AI translation of large blocks of technical terms. Using an embedded system as the carrier significantly reduces deployment difficulty, improves convenience and flexibility, and has a wide range of applications, demonstrating high practicality and innovation. Furthermore, by using a portable ESP32 solution for local management of translation content and complementary AI translation, it can be used offline, greatly enhancing network security and privacy.

[0015] 2. This invention employs the IndClassify algorithm, breaking away from the general classification logic of "single length threshold." Combining the unique terminology features specific to industrial scenarios, it designs a dual judgment mechanism of "length + semantics," adapting to the special distribution characteristics of "short terminology and long ordinary text" in industrial texts. It introduces a terminology density quantification index, accurately calculating text professionalism to achieve a detailed classification of "near-long texts" and "non-professional long texts," solving the problems of inaccurate translation of short industrial terminology texts and low efficiency in translating ordinary long texts. Addressing the special nature of industrial abbreviations, it designs judgment rules for abbreviations not included in the database, triggering a manual intervention mechanism to further improve the professionalism of translation in industrial scenarios.

[0016] 3. This invention differs from existing general-purpose translation scheduling algorithms by combining the hardware performance characteristics of embedded servers (ESP32) and edge AI servers (NVIDIA Orin Nano Super). It incorporates memory usage and TensorRT engine load into scheduling decisions to achieve load balancing, avoid overloading a single server, and improve system stability. Breaking away from the simple "local / edge" scheduling model, it designs multiple scheduling strategies, including splitting translation, AI verification, and offline adaptation, balancing low latency (local translation), high accuracy (AI translation), and offline availability, adapting to the complex network environments of industrial scenarios. By combining the hit rate of the local translation lookup table with AI translation verification, it achieves dual verification of translation results. Simultaneously, through a dynamic caching strategy, it improves subsequent translation efficiency, forming a closed-loop optimization of "scheduling-translation-caching," highlighting the synergistic advantages of the hybrid translation system. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the overall structure of an embodiment of the present invention. Detailed Implementation

[0018] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] The embodiments of the present invention will be further described below with reference to the accompanying drawings: A hybrid translation system based on embedded systems and edge AI includes an embedded agent server module, an edge AI translation server module, a text classification decision module, a dynamic content monitoring module, and a translation closed-loop module.

[0020] The embedded proxy server module is used to intercept web requests, parse HTML, perform local translation of short texts based on text classification, and rewrite resource paths. Specifically, the embedded proxy server module is based on ESP32 hardware, integrates a network module, and integrates an SQLite database storing translation lookup tables.

[0021] Preferably, the ESP32-S3 chip is used, which features a dual-core 240MHz processor, 512KB SRAM, and 8MB Flash, meeting the needs of lightweight proxy services and local database operations. For storing large translation comparison tables, an external Micro SD card is used for storage expansion. The software development environment uses PlatformIO combined with the Arduino framework, and the integrated software components include: the SQLite3 embedded database engine for managing local translation comparison tables; the PicoHTML lightweight HTML parser for efficiently parsing web request and response content; and the WebSockets library for enabling real-time bidirectional communication with browser clients.

[0022] The edge AI translation server module receives long text translation requests and returns foreign language translations. Specifically, the edge AI translation server module is based on the NVIDIA Orin Nano Super suite, uses the TensorRT engine for inference, includes an AI language translation model, and provides a RESTful API interface for the embedded proxy server module to call.

[0023] Preferably, this module is built on the NVIDIA Orin Nano Super developer kit, which features 32GBeUFS storage and up to 67 TOPS of AI computing power. The software environment is the NVIDIA JetPack 5.x SDK, including CUDA 11.4 and TensorRT 8.x, running Ubuntu 20.04 with Python 3.8. The deployed AI language translation models include Meta's NLLB-200, mBART-50, and T5-mT5 multilingual translation models. To improve inference speed, the models are quantized using INT8 / FP16, and the TensorRT engine is used for accelerated inference. This module provides a RESTful API interface for the embedded proxy server module to call.

[0024] The text classification decision module is used to determine whether a text is short or long based on a preset length threshold. Preferably, the text classification decision module incorporates the IndClassify algorithm, which is based on a dual classification mechanism of "length threshold + semantic features" to achieve accurate classification of text fragments.

[0025] The IndClassify algorithm includes a semantic feature extraction unit and a dual-judgment unit.

[0026] The semantic feature extraction unit is used to segment the input text fragments into words, match them with an industrial terminology lexicon, count the number of terms and the total vocabulary, and calculate the term density D.

[0027] The dual-judgment unit is used to execute multiple judgment rules based on text length L and term density D, and output classification results for short text, quasi-long text, long text, or short text requiring manual intervention.

[0028] Specifically, the judgment rules executed by the dual-judgment unit include: Rule 1: If L≤L0 and D≥30%, it is judged as "quasi-long text", where L0 is the basic length threshold; Rule 2: If L > L0 and D < 10%, it is judged as "non-professional long text"; Rule 3: If L≤L0 and there are two or more consecutive unlisted industrial abbreviations, it is judged as "short text requiring manual intervention"; Rule 4: If any of the above rules are not met, the basic classification shall be used: L≤L0 and D<30% is “short text”; L>L0 and D≥10% is “long text”.

[0029] The dynamic content monitoring module is used for real-time translation of newly added page content. Specifically, the dynamic content monitoring module uses WebSocket to achieve real-time communication between the embedded proxy server module and the browser client.

[0030] The translation closed-loop module is used to write the text that was not matched for translation into the translation database and write it back to the local lookup table.

[0031] Preferably, the embedded proxy server module and the edge AI translation server module are configured with the Edge-EmbedSched scheduling algorithm, which is used to achieve dynamic load balancing of translation path scheduling.

[0032] The input parameters of the Edge-EmbedSched algorithm include: the text classification result output by the text classification decision module, the memory usage of the embedded agent server (Mem_usage), the TensorRT engine load of the edge AI translation server (AI_load), the hit rate of the local translation lookup table (Hit_rate), and the network connection status.

[0033] The output of the Edge-EmbedSched algorithm includes: the optimal translation path, caching strategy, and exception handling instructions.

[0034] The scheduling rules executed by the Edge-EmbedSched algorithm include: For short texts: if Hit_rate ≥ 80%, return the translation result from the local lookup table directly; if Hit_rate < 80% and AI_load < 50%, prioritize querying the local lookup table and simultaneously initiate AI translation verification to the edge AI translation server; if Hit_rate < 80% and AI_load ≥ 50%, only query the local lookup table and mark the texts that did not match as pending AI verification. For near-long text or long text: Near-long text is directly redirected to the edge AI translation server to enable full inference mode; long text is split into industrial term fragments and ordinary text fragments when AI_load≥70%, and local lookup table lookup and edge AI lightweight inference mode are used respectively. For offline scenarios: short texts are queried normally in the local lookup table; quasi-long and long texts are split into short segments and matched with the local lookup table first. The parts that are not matched are marked as offline to be translated and will be synchronized to the edge AI translation server after the network is restored.

[0035] like Figure 1 As shown, the workflow of the hybrid translation system based on embedded systems and edge AI of this invention is as follows: First, after the system is powered on and connected to the network, the embedded proxy server module starts up, loading the proxy service program, the SQLite database engine, the text classification decision module, and the short text translation module. The client configures the network proxy address to the IP address of the embedded proxy server.

[0036] When a client initiates an HTTP request to an external target server, the request is first intercepted by the embedded proxy server module. The proxy server module then forwards the request to the target server and waits for a response.

[0037] The target server returns a response in HTML format. Upon receiving the response, the proxy server module does not forward it directly to the client; instead, it transmits the response content to the text classification decision module. Simultaneously, the proxy server module injects a script to send the text classification service client code to the browser.

[0038] The text classification decision module uses the PicoHTML parser to parse HTML text and extract plain text fragments. For each text fragment, the module calls the IndClassify algorithm for classification. Suppose a text fragment, "PLC ladderlogic diagram," is extracted, with a length of 24 characters, less than the preset base length threshold L0 (50 characters). The IndClassify algorithm performs word segmentation and matches it against an industrial terminology lexicon in the SQLite database. It finds that "PLC" is a high-frequency industrial abbreviation and "ladder logic" is a technical term. The calculated term density D is 66.7% (3 out of 4 words are terms / abbreviations). Since L≤L0 and D≥30%, this text is classified as "quasi-long text."

[0039] The classification results are sent to the Edge-EmbedSched scheduling algorithm. The algorithm detects in real-time that the translation of "PLC ladder logic diagram" is not matched in the local translation lookup table (Hit_rate=0%), and simultaneously detects that the TensorRT engine load (AI_load) of the edge AI translation server is 45% (below 50%). Based on the quasi-long text scheduling rules, the system decides to directly call the RESTful API of the edge AI translation server, enabling full inference mode. Upon receiving the request, the edge AI server uses the NLLB-200 model and the TensorRT engine to return the translation "PLC ladder logic diagram" within approximately 120 milliseconds. This translation is cached in the embedded agent server's memory and in the SQLite database.

[0040] Subsequently, through the dynamic content listening module established via WebSocket, the embedded proxy server sends the translation to the browser client. The client script dynamically locates the HTML DOM node where the original text is located and replaces its content with "PLC ladder logic", thus realizing the front-end interface update without refreshing.

[0041] This invention achieves the above operations through the IndClassify algorithm. The IndClassify algorithm is a custom algorithm adapted to the text classification decision module of this invention. Addressing the pain point that industrial scenarios contain a large number of technical terms and production-specific abbreviations, and where a general single length threshold classification method cannot meet the accuracy requirements for translation, this invention designs a dual classification mechanism based on "length threshold + semantic features." This achieves accurate classification of parsed text from web pages in industrial scenarios, providing a reliable basis for subsequent translation path scheduling and ensuring the professionalism and accuracy of industrial terminology translation.

[0042] Specifically, the industrial terminology database is a dedicated database embedded in the SQLite database of the embedded agent server module. It contains common professional terms, special abbreviations, and industry-standard expressions used in industrial production management systems, and can be continuously updated through a translation closed-loop module.

[0043] Terminology density is the percentage of words (including abbreviations) belonging to the industrial terminology lexicon in a single text segment, used to characterize the industrial specialization of the text.

[0044] The base length threshold is a preset text length judgment benchmark value (50 characters in this embodiment), which can be flexibly adjusted according to the actual industrial scenario requirements.

[0045] Quasi-long texts are text fragments whose length meets the basic threshold requirements but have a high density of industrial terminology, requiring edge AI translation to ensure accuracy.

[0046] Unlisted industrial abbreviations are those that do not exist in the industrial terminology database and cannot be matched by existing translation lookup tables.

[0047] The input parameters of the IndClassify algorithm of this invention all come from the system's front-end module, requiring no additional hardware or data acquisition unit. Specifically, it includes: Text fragments: After the embedded proxy server module parses the web request response through the HTML parser, it extracts text nodes containing the target language and text fragments to be translated, supporting mixed text input containing industry terms and specialized abbreviations.

[0048] Basic length threshold L0: The preset text length judgment benchmark (L0=50 characters in this embodiment), which can be manually adjusted through the system configuration interface to adapt to the text characteristics of different industrial scenarios.

[0049] Industrial Terminology Database: An industrial-specific thesaurus embedded in an SQLite database, containing terms, abbreviations, and corresponding basic translation information to support semantic feature extraction.

[0050] The IndClassify algorithm of this invention outputs accurate text classification results, divided into four categories, which are directly used by the subsequent Edge-EmbedSched algorithm for translation path scheduling, specifically including: Short text: Ordinary text fragments whose text length is ≤ the basic length threshold L0 and whose term density is <30% can be quickly translated using a local translation lookup table.

[0051] Quasi-long text: Text fragments with a length ≤ basic length threshold L0, but terminology density ≥ 30%, which need to be translated by edge AI translation to ensure the accuracy of industrial terminology translation.

[0052] Long text: Professional text fragments whose text length is greater than the basic length threshold L0 and whose term density is ≥10%, requiring edge AI translation to achieve complete translation.

[0053] Short texts requiring human intervention: Texts with a length ≤ the basic length threshold L0 and containing two or more consecutive unlisted industrial abbreviations, which need to be written into the translation database for human translation.

[0054] The working principle of the IndClassify algorithm of this invention is as follows: The core logic of the IndClassify algorithm is "semantic feature extraction → dual judgment → classification output". The specific implementation steps are as follows, and it can be directly embedded into the software logic of the text classification decision module. The code deployment is based on the PlatformIO + Arduino framework, and specifically includes the following steps: Semantic feature extraction The input text fragment is segmented (using a lightweight segmentation algorithm adapted to ESP32 hardware performance). The segmentation results are traversed and matched against an industrial terminology lexicon in an SQLite database. The number of successfully matched industrial terms and specialized abbreviations (denoted as Nt) is counted, and the total vocabulary size of the text fragment (denoted as Ntotal) is also counted. The terminology density D is calculated using the following formula: If a text fragment contains industrial abbreviations that are not included in the database, the number of unrecorded abbreviations and the number of consecutive occurrences are marked for subsequent judgment.

[0055] Dual judgment mechanism Based on text length (denoted as L) and term density D, a triple-judgment rule is executed to achieve accurate classification: Rule 1: If L≤L0 and D≥30%, it is classified as "quasi-long text". Although such texts are relatively short, they contain a lot of industry terminology that may not be included in the local translation comparison table. They will be directly redirected to edge AI translation to avoid translation errors.

[0056] Rule 2: If L > L0 and D < 10%, it is classified as "non-professional long text". This type of text has a low level of professionalism and does not require enabling the full inference mode of edge AI translation. Instead, enable the lightweight inference mode (reduce the inference load of the TensorRT engine) to improve translation speed.

[0057] Rule 3: If L≤L0 and there are two or more consecutive unlisted industrial abbreviations, it is judged as "short text requiring human intervention". Such text contains unlisted proprietary abbreviations, and AI translation cannot guarantee accuracy. It is directly written into the translation database and awaits human translation before being written back into the comparison table.

[0058] Rule 4: If any of the above rules are not met, the basic classification shall be used: L≤L0 and D<30% is “short text”; L>L0 and D≥10% is “long text”.

[0059] Classification results output The classification results (short text / quasi-long text / long text / short text requiring manual intervention) obtained from the above dual judgment are marked and synchronously output to the Edge-EmbedSched algorithm to provide a clear basis for translation path scheduling. At the same time, the classification results and term density data are cached in the embedded server memory for subsequent translation closed-loop optimization.

[0060] The Edge-EmbedSched algorithm of this invention is a dedicated scheduling algorithm adapted to the collaborative work of the embedded proxy server module and the edge AI translation server module of this invention. It addresses the problems of unbalanced load, inability to meet low latency requirements, and poor adaptability to offline scenarios in the existing simple scheduling method of "short text is retrieved locally and long text is sent to the edge". Combining the hardware characteristics of the embedded server (ESP32) and the edge AI server (NVIDIA Orin Nano Super), a dynamic load balancing scheduling mechanism is designed to achieve adaptive optimization of the translation path, taking into account low latency, high accuracy and high privacy of translation.

[0061] Specifically, the input parameters of the Edge-EmbedSched algorithm come from real-time data from various modules of the system, eliminating the need for additional data acquisition units. These include: Text classification results: Text classification results output by the IndClassify algorithm (short text / near-long text / long text / short text requiring human intervention).

[0062] Memory usage (Mem_usage): Real-time memory usage data collected by the embedded agent server, updated every 100ms.

[0063] AI_load: The TensorRT engine utilization rate, which is fed back in real time by the edge AI translation server through the RESTful API interface, and is updated every 50ms.

[0064] Hit_rate: The short text query matching success rate, which is statistically analyzed in real time by the embedded proxy server and is updated once per query.

[0065] Network connectivity status: The real-time connection status (online / offline) between the embedded agent server and the edge AI translation server is detected in real time by the network module.

[0066] The output of the Edge-EmbedSched algorithm is the optimal translation path and caching strategy, which directly drives the embedded proxy server module to perform translation operations, specifically including: Optimal translation path: Clearly define the translation execution entity (local lookup table / edge AI translation server / segmented translation) and execution mode (full inference / lightweight inference).

[0067] Caching strategy: Clearly define the cache location of translation results (embedded server memory / SQLite database), cache duration, and cache update mechanism to improve subsequent query efficiency.

[0068] Exception handling instructions: For exception scenarios such as offline, high load, and inconsistent translation results, output corresponding handling instructions (such as marking offline for translation or triggering manual review).

[0069] The core logic of the Edge-EmbedSched algorithm in this embodiment is "load detection → path decision → translation execution → cache optimization". The specific implementation steps are as follows. The code can be deployed based on the PlatformIO + Arduino framework (embedded end) and Python 3.8 (edge ​​AI end), and the data interaction between the two ends can be realized through the RESTful API interface: Real-time load and status detection The embedded proxy server module collects its own memory usage (Mem_usage) and local translation lookup table hit rate (Hit_rate) in real time. It receives the TensorRT engine load (AI_load) from the edge AI translation server via the WebSocket communication protocol, and simultaneously detects the network connection status at both ends. All parameters are then aggregated to the scheduling decision unit for subsequent path determination.

[0070] Dynamic scheduling decision based on classification results Based on the text classification results output by the IndClassify algorithm, and combined with real-time load parameters, targeted scheduling rules are executed to achieve load balancing and translation efficiency optimization. Short text scheduling rules For text fragments classified as "short text", the local translation lookup table is used first, while verification and optimization are performed by combining hit rate and edge AI load: If Hit_rate≥80%: Directly return the translation result of the local lookup table, and cache the result in the embedded server memory (caching time is 1 hour) to improve the speed of subsequent queries.

[0071] If Hit_rate < 80% and AI_load < 50%: First, query the local lookup table, and simultaneously initiate AI translation verification to the edge AI translation server. If the translation results are consistent, cache the results in the SQLite database; if the results are inconsistent, trigger a manual review instruction, mark the text as "pending review", and write it to the translation database.

[0072] If Hit_rate < 80% and AI_load ≥ 50%: only query the local lookup table, mark the text that did not match as "awaiting AI verification", and initiate AI translation verification again after the edge AI load drops below 50%.

[0073] Scheduling rules for quasi-long texts and long texts For text segments classified as "quasi-long text" or "long text", they are prioritized for routing to the edge AI translation server, while path optimization is performed based on the edge AI load. For near-long texts: directly jump to the edge AI translation server, enable full inference mode to ensure the accuracy of industrial terminology translation, and synchronously cache the translation results to the embedded server memory and SQLite database.

[0074] For long texts: If AI_load < 70%, enable the edge AI full inference mode, directly return the translation result and cache it; if AI_load ≥ 70%, split the long text into "industrial terminology fragments + ordinary text fragments" using a word segmentation algorithm. The terminology fragments are queried from a local lookup table, and the ordinary text fragments are in edge AI lightweight inference mode. After translation, the results are merged to reduce the edge AI load and improve translation speed.

[0075] Offline scene scheduling rules When the embedded server detects a disconnection from the edge AI translation server (offline state), it automatically performs offline adaptation scheduling: Short text: Normally query the local lookup table; texts that do not match are marked as "offline translation pending".

[0076] For near-long and long texts: The text is automatically split into short segments, and the local translation table is matched first. The parts that do not match are marked as "offline to be translated" and stored to the SD card (external storage). When the network connection is restored, the "offline to be translated" text is synchronized to the edge AI translation server first. After the translation is completed, the local SQLite translation translation table is written back and the cache is updated.

[0077] Text scheduling rules requiring manual intervention For short texts classified as "requiring human intervention", they are directly written into the translation database without initiating local or AI translation. At the same time, a human review notification is sent to the system management. After the human translation is completed, the local comparison table is written back and synchronized to the edge AI translation server for model fine-tuning.

[0078] Translation execution and caching optimization Based on the scheduling decision, the embedded proxy server module is driven to perform translation operations, while the caching strategy is optimized: Local translation results: Translation results of short texts from high-frequency queries are cached in the embedded server's memory, while results from low-frequency queries are cached in an SQLite database. The caching duration is dynamically adjusted based on the query frequency (24 hours for high-frequency texts and 1 hour for low-frequency texts).

[0079] AI translation results: All AI translation results are synchronously cached in the embedded server's memory and SQLite database, while also recording translation time and load data for subsequent load balancing strategy optimization. Cache cleanup: When the embedded server's memory usage (Mem_usage) is ≥ 80%, the cache data of low-frequency queries is automatically cleaned up, and high-frequency, high-accuracy translation results are retained first to ensure stable server operation.

[0080] This invention also provides a hybrid translation method based on embedded systems and edge AI, utilizing the aforementioned hybrid translation system based on embedded systems and edge AI, including the following steps: S1: The embedded system is powered on and connected to the network, loading the agent service, SQLite, text classification decision module, and short text translation module. Specifically, the embedded agent server module is initialized, connects to the network module, loads the translation lookup table from the SQLite database into memory, starts the HTTP agent server, and establishes a network connection with the NVIDIA OrinNano Super kit in the edge AI translation server module.

[0081] S2: The client sends a request to the proxy service address, and the proxy service injects the text classification service into the client's browser. Specifically, when the browser initiates an HTTP request, the embedded proxy server module intercepts the HTTP request, parses the response using an HTML parser, extracts text nodes containing the target language, and marks the text segments that need to be translated.

[0082] S3: The proxy service forwards requests to the target server and receives the response returned by the target server.

[0083] Specifically, the text classification decision module determines whether a text is short or long based on a preset length threshold: when the text length meets the threshold, it is determined to be short text, and the text is matched and queried in the translation lookup table. If the match is successful, the translation result is returned and cached in the embedded proxy server module. If the match is not successful, the embedded proxy server module encapsulates the HTTP request and sends it to the edge AI translation server module or writes the text into the translation library.

[0084] When the text length exceeds the length threshold, it is determined to be long text. The embedded proxy server module encapsulates the HTTP request and sends it to the edge AI translation server module.

[0085] After receiving a request, the edge AI translation server module calls the AI ​​language translation model to translate the text, uses the TensorRT engine to accelerate inference, returns the translation result, and caches it in the embedded proxy server module.

[0086] S4: The proxy service forwards the response content to the client-side text classification service. Specifically, the embedded proxy server module replaces the text in the original HTML with the translated content, maintaining the page structure and style unchanged.

[0087] S5: The text classification service breaks down content into phrases or long texts based on text length.

[0088] S6: If it is a phrase, send a request to the embedded system's short text translation module to obtain the phrase translation; if no corresponding translation is obtained, request automatic translation from the AI ​​translation server. After obtaining the phrase translation, use the dynamic monitoring module to replace the text content of the short text in the client's browser and dynamically refresh the front-end interface.

[0089] S7: For long texts or paragraphs, a request is sent to the AI ​​translation server to call the AI ​​language translation model to translate the text. The TensorRT engine is used to accelerate inference, and the translation result is returned and cached in the embedded proxy server module. While the model is translating, the latest phrase translations are retrieved from SQLite to ensure that the translation of long texts maintains the professionalism, colloquialism, and abbreviation of short texts. Through a dynamic monitoring module, the text content of short texts in the client's browser is replaced, and the front-end interface is dynamically refreshed.

[0090] Preferably, JavaScript is injected to enable dynamic content monitoring on the client side; MutationObserver is used to monitor DOM changes on the page with injected JavaScript, and when a new node is detected, steps S2 to S4 above are repeated; after the text in the translation library is manually translated by the translation closed-loop module, it is written back to the translation comparison table in the SQLite database of the embedded proxy server to increase the content of the translation comparison table.

[0091] In summary, the innovation of this invention lies in: 1. A hybrid translation architecture combining embedded agents and edge AI is proposed. Web request interception, local fast translation and caching are achieved through embedded devices, while high-precision translation of long and professional texts is achieved through edge AI. It can be deployed without modifying the target system and takes into account low latency, high privacy and offline availability.

[0092] 2. Design the IndClassify industrial text classification algorithm, employing a dual judgment mechanism of text length and terminology density to address the problem that traditional single-length classification cannot adapt to industrial terms and abbreviations, significantly improving the accuracy of professional text classification and translation. An "industrial terminology weight allocation" mechanism is added (e.g., a 30% increase in weight for high-frequency industrial abbreviations) to solve the problem of inaccurate recognition of industrial abbreviations by ordinary word segmentation algorithms; "terminology correlation verification" is added to the dual judgment unit (e.g., treating consecutive industrial terms as a single unit for length calculation) to further improve classification accuracy. The terminology weight allocation mechanism uses a preset weight table to assign a weight of 0.8-1.0 to high-frequency industrial abbreviations (e.g., top-loading coke, tamping coke) and a weight of 0.3-0.5 to ordinary words, improving the matching priority of industrial terms.

[0093] 3. The EdgeEmbedSched dynamic scheduling algorithm is proposed, which adaptively selects the translation path based on system load, local translation hit rate and network status, thereby achieving load balancing and adaptation to abnormal scenarios and significantly improving stability in multi-concurrency scenarios.

[0094] 4. Construct a closed-loop update mechanism for translation, supporting the collection of untranslated text, manual correction, and terminology database iteration, enabling the system to continuously adapt to professional expressions in industrial scenarios and continuously optimize translation accuracy.

[0095] 5. This invention differs from existing general translation scheduling algorithms by combining the hardware performance characteristics of embedded servers (ESP32) and edge AI servers (NVIDIA Orin Nano Super). It incorporates memory usage and TensorRT engine load into scheduling decisions to achieve load balancing, avoid overloading a single server, and improve system stability. Breaking away from the simple "local / edge" scheduling model, it designs multiple scheduling strategies, including splitting translation, AI verification, and offline adaptation, balancing low latency (local translation), high accuracy (AI translation), and offline availability, adapting to the complex network environments of industrial scenarios. By combining the hit rate of the local translation lookup table with AI translation verification, it achieves dual verification of translation results. Simultaneously, through a dynamic caching strategy, it improves subsequent translation efficiency, forming a closed-loop optimization of "scheduling-translation-caching," highlighting the synergistic advantages of the hybrid translation system. See Table 1 for details.

[0096] Table 1 The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A hybrid translation system based on embedded systems and edge AI, characterized in that: include, An embedded proxy server module is used to intercept web requests, parse HTML, perform local translation of short texts based on text classification, and rewrite resource paths. The edge AI translation server module is used to receive long text translation requests and return foreign language translations; The text classification decision module is used to determine whether a text is short or long based on a preset length threshold. The dynamic content monitoring module is used to translate newly added content on the page in real time. The translation closed-loop module is used to write the text that was not matched for translation into the translation database and write it back to the local lookup table.

2. The hybrid translation system based on embedded systems and edge AI according to claim 1, characterized in that: The embedded proxy server module is based on ESP32 hardware, integrates a network module, and integrates an SQLite database storing translation comparison tables.

3. A hybrid translation system based on embedded systems and edge AI according to claim 1 or 2, characterized in that: The edge AI translation server module is based on the NVIDIA Orin Nano Super suite, uses the TensorRT engine for inference, includes an AI language translation model, and provides a RESTful API interface for the embedded proxy server module to call.

4. A hybrid translation system based on embedded systems and edge AI according to claim 1 or 2, characterized in that: The dynamic content monitoring module uses WebSocket to enable real-time communication between the embedded proxy server module and the browser client.

5. A hybrid translation system based on embedded systems and edge AI according to claim 1 or 2, characterized in that: The text classification decision module incorporates the IndClassify algorithm, which is based on a dual classification mechanism of "length threshold + semantic features" to achieve accurate classification of text fragments.

6. The hybrid translation system based on embedded systems and edge AI according to claim 5, characterized in that: The IndClassify algorithm includes, The semantic feature extraction unit is used to segment the input text fragments into words, match them with an industrial terminology lexicon, count the number of terms and the total vocabulary, and calculate the term density D. The dual-judgment unit is used to execute multiple judgment rules based on text length L and term density D, and output classification results for short text, quasi-long text, long text, or short text requiring manual intervention.

7. A hybrid translation system based on embedded systems and edge AI according to claim 6, characterized in that: The judgment rules executed by the dual judgment unit include: Rule 1: If L≤L0 and D≥30%, it is judged as "quasi-long text", where L0 is the basic length threshold; Rule 2: If L > L0 and D < 10%, it is judged as "non-professional long text"; Rule 3: If L≤L0 and there are two or more consecutive unlisted industrial abbreviations, it is judged as "short text requiring manual intervention"; Rule 4: If any of the above rules are not met, the basic classification shall be used: L≤L0 and D<30% is "short text"; L>L0 and D≥10% is "long text".

8. A hybrid translation system based on embedded systems and edge AI according to claim 1 or 2, characterized in that: The embedded proxy server module and the edge AI translation server module are configured with an Edge-EmbedSched scheduling algorithm. The Edge-EmbedSched scheduling algorithm is used to implement dynamic load balancing translation path scheduling. The input parameters of the Edge-EmbedSched algorithm include: the text classification result output by the text classification decision module, the memory usage of the embedded proxy server (Mem_usage), the TensorRT engine load of the edge AI translation server (AI_load), the local translation lookup table hit rate (Hit_rate), and the network connection status. The output of the Edge-EmbedSched algorithm includes: the optimal translation path, caching strategy, and exception handling instructions.

9. A hybrid translation system based on embedded systems and edge AI according to claim 8, characterized in that: The scheduling rules executed by the Edge-EmbedSched algorithm include: For short texts: if Hit_rate ≥ 80%, return the translation result from the local lookup table directly; if Hit_rate < 80% and AI_load < 50%, prioritize querying the local lookup table and simultaneously initiate AI translation verification to the edge AI translation server; if Hit_rate < 80% and AI_load ≥ 50%, only query the local lookup table and mark the texts that did not match as pending AI verification. For near-long text or long text: Near-long text is directly redirected to the edge AI translation server to enable full inference mode; long text is split into industrial term fragments and ordinary text fragments when AI_load≥70%, and local lookup table lookup and edge AI lightweight inference mode are used respectively. For offline scenarios: short texts are queried normally in the local lookup table; quasi-long and long texts are split into short segments and matched with the local lookup table first. The parts that are not matched are marked as offline to be translated and will be synchronized to the edge AI translation server after the network is restored.

10. A hybrid translation method based on embedded systems and edge AI, characterized in that: The hybrid translation system based on embedded systems and edge AI, as described in any one of claims 1 to 9, includes the following steps: S1: The embedded system is powered on and connected to the network, loading the agent service, SQLite, text classification decision module, and short text translation module; S2: The client sends a request to the proxy service address, and the proxy service injects the text classification service into the client's browser; S3: The proxy service forwards requests to the target server and receives the response returned by the target server; S4: The proxy service forwards the response content to the client's text classification service; S5: The text classification service breaks down content into phrases or long texts based on text length; S6: If it is a phrase, send a request to the embedded system's short text translation module to obtain the phrase translation; if no corresponding translation is obtained, request automatic translation from the AI ​​translation server; after obtaining the phrase translation, replace the text content of the short text in the client's browser through the dynamic monitoring module and dynamically refresh the front-end interface. S7: If it is a long text or a text paragraph, a request is sent to the AI ​​translation server to call the AI ​​language translation model to translate the text, use the TensorRT engine to accelerate inference, return the translation result and cache it to the embedded proxy server module; while the model is translating, the latest phrase translation is obtained from SQLite to ensure that the translation effect of long text is as professional, colloquial and abbreviated as that of short text. The dynamic monitoring module replaces the text content of short texts in the client's browser, dynamically refreshing the front-end interface.