Multilingual braille translation service scheduling method, device and system and storage medium

By dynamically loading translation modules using container classes, memory resource usage is optimized based on frequency and lifespan, solving the problems of high resource consumption and waste in multilingual Braille translation and achieving higher translation efficiency.

CN121234955APending Publication Date: 2025-12-30INFINITE HORIZONS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410649626.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Existing technologies for multilingual Braille translation suffer from high system resource consumption and waste, especially in multilingual translation scenarios where multiple Braille conversion models consume significant system resources, resulting in limited computing power and wasted resources.

Method used

A container-based approach is adopted to dynamically load translation modules. Based on the usage frequency and lifespan of the translation modules, the translation modules are dynamically loaded and unloaded into memory. By configuring parameters and dynamic loading rules, memory resource usage is optimized and unnecessary module usage is reduced.

Benefits of technology

It effectively reduces system resource pressure, improves translation efficiency, and balances memory resources and running speed. Especially in multilingual translation application scenarios, it avoids the problems of insufficient memory resources and low running efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121234955A_ABST
    Figure CN121234955A_ABST
Patent Text Reader

Abstract

The invention relates to a multilingual braille translation service scheduling method, which comprises the following steps of: initializing a system to load a container class, and loading an initial translation function module into a memory by the container class according to a configuration parameter of each translation function module; a to-be-translated text is obtained, the to-be-translated text is preprocessed, a plurality of to-be-translated targets are obtained, and each to-be-translated target comprises to-be-translated content of multiple languages; a corresponding translation function module is matched according to the language type of each to-be-translated content; the container class dynamically loads a corresponding translation function module to the memory according to a preset dynamic loading rule so as to translate each to-be-translated content; and performing post-processing according to the translation result of each translation function module to obtain and output braille alphabets. Correspondingly, the invention further provides a multilingual braille translation service scheduling device and system and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of human-computer interaction for visually impaired people, and in particular to a multi-lingual Braille translation service scheduling method, device, system and computer readable storage medium. BACKGROUND

[0002] Blind education is an important cause related to the future development of the blind population. With the continuous progress of technology and the development of society, blind education is facing new opportunities and challenges. With the continuous improvement and innovation of educational technology, the way of blind education is also evolving. Currently, in schools and society, barrier-free technology for the blind is quietly emerging. This technology aims to break down the virtual and physical limitations in blind education and provide more learning resources and opportunities for the blind. For example, schools can use barrier-free devices and applications, provide Braille e-books and auxiliary learning materials, provide barrier-free Internet resources and learning platforms, and ensure that blind students have the same learning opportunities as other students.

[0003] In the process of popularizing barrier-free technology, Braille, especially multi-lingual Braille translation, is a very important problem. Different countries have different Braille standards, norms, and usage habits. For example, the period in Chinese Braille is composed of two Braille characters (5 and 2, 3), and there is no space before and after the period; while English Braille occupies one cell (2, 5, 6), and one cell is empty after it. As can be seen, each language has its own characteristics, and a unified standard cannot be used for translation, i.e. it is necessary to set up corresponding translation modules for different languages, such as Chinese invention patents with publication numbers CN116681038A, CN111581991A, CN107368474A, CN1896923, and CN105718450A; or even special translation modules for formulas, chemical formulas, etc., such as Chinese invention patents with publication numbers CN111753555A and CN111881696A.

[0004] However, these are all single language translation situations, and in actual situations, there are multiple languages in a file that needs to be translated, so a single language translation module is no longer applicable. Therefore, the prior art proposes a multi-lingual translation method.

[0005] For example, Chinese invention patent CN115713063A provides a document conversion method, which splits a document to be translated into multiple text types, such as at least two of Chinese type, mathematical formula type, English type and symbol type, according to character type, then matches a corresponding Braille conversion model for each text, and finally combines the converted Braille text to obtain a target document.

[0006] However, this way has the following problems: 1) multiple Braille conversion models will inevitably occupy a large proportion of system resources, thereby limiting the device computing power to some extent; 2) the use frequency of each Braille conversion model is different, thereby causing waste of system resources. SUMMARY

[0007] The purpose of the present application is to provide a multilingual Braille translation service scheduling method and device, system and storage medium, which partially solves or alleviates the above-mentioned deficiencies in the prior art, can reduce the system resource pressure and improve the translation efficiency.

[0008] In order to solve the above-mentioned technical problems, the present application specifically adopts the following technical solutions:

[0009] The first aspect of the present application is to provide a multilingual Braille translation service scheduling method, which comprises the steps of:

[0010] S101, the system is initialized to load a container class, and the initial translation function module is loaded into the memory according to the configuration parameters of each translation function module by the container class; the configuration parameters include the survival time of each translation function module running in the memory and its time increment; the initial translation function module is a translation function module with a survival time greater than or equal to a preset survival time threshold;

[0011] S103, obtaining the text to be translated, and preprocessing the text to be translated to obtain a plurality of translation targets, each translation target including a plurality of languages of translation content;

[0012] S105, according to the language category of each translation content, the corresponding translation function module is matched;

[0013] S107, the container class dynamically loads the corresponding translation function module into the memory according to the preset dynamic loading rule to translate each translation content;

[0014] S109, according to the translation results of each translation function module, the Braille is obtained and outputted after processing;

[0015] Wherein, the dynamic loading rule refers to that when any translation function module in the memory is not used in each translation task, the corresponding survival time is reduced by a preset first time increment, and when the survival time is zero, it is removed from the memory; each translation function module in the memory increases the corresponding survival time by a preset second time increment after completing a translation task.

[0016] In some embodiments of the present application, the step of loading the initial translation function module into the memory according to the configuration parameters of each translation function module by the container class specifically comprises the steps of:

[0017] determining whether the current survival time of each of the translation function modules is greater than or equal to a preset minimum survival time threshold, and if yes, triggering the container class to load the corresponding translation function module into the memory as an initial translation function module.

[0018] In some embodiments of the present application, the step of dynamically loading the corresponding translation function module into the memory according to the preset dynamic loading rule specifically comprises the steps of:

[0019] S201, determining whether the currently matched translation function module has been loaded into the memory, and if not, loading the currently matched translation function module into the memory;

[0020] S203, obtaining the working state of each of the translation function modules in the memory; determining whether the working state is executing a translation task, and if yes, executing step S205a, otherwise executing step S205b; the working state comprises: executing a translation task, and not executing a translation task;

[0021] S205a, updating the current survival time of the translation function module according to the second time increment;

[0022] S205b, updating the survival time of the translation function module according to the first time increment.

[0023] In some embodiments of the present application, the step of dynamically loading the corresponding translation function module into the memory according to the preset dynamic loading rule further comprises the step of:

[0024] S207, determining whether the current survival time of each of the translation function modules in the memory is greater than or equal to a preset maximum survival time, and if yes, the survival time of the translation function module will not be updated according to the second time increment in the future.

[0025] The second aspect of the present application provides a scheduling device for multilingual Braille translation service, which comprises:

[0026] An initialization module is configured to load a container class, and load an initial translation function module into a memory according to the configuration parameters of each translation function module by the container class; the configuration parameters comprise the survival time of each translation function module running in the memory and the time increment thereof; the initial translation function module is a translation function module with an initial survival time greater than a first preset time threshold.

[0027] The translation task management module is configured to acquire a text to be translated, and pre-process the text to be translated to obtain a plurality of translation targets, each of which includes content to be translated in multiple languages.

[0028] The language matching module is configured to match each piece of content to be translated to a corresponding translation function module according to the language type of the content to be translated.

[0029] The dynamic loading module is configured to trigger the container to dynamically load a corresponding translation function module into the memory according to a preset dynamic loading rule, so as to translate each piece of content to be translated. The dynamic loading rule refers to that, when any translation function module in the memory is not used in each translation task, the survival time corresponding to the translation function module is reduced by a preset first time increment, and when the survival time is zero, the translation function module is removed from the memory. When any translation function module in the memory completes a translation task, the survival time corresponding to the translation function module is increased by a preset second time increment.

[0030] The Braille output module is configured to post-process the translation results of each translation function module to obtain Braille and output the Braille.

[0031] In some embodiments, the initialization module is specifically configured to determine whether the current survival time of each translation function module is greater than or equal to a preset minimum survival time threshold, and if so, trigger the container to load the corresponding translation function module into the memory as an initial translation function module.

[0032] In some embodiments, the dynamic loading module specifically includes: a judgment unit configured to determine whether the currently matched translation function module has been loaded into the memory, and if not, load the currently matched translation function module into the memory; a working state recognition unit configured to acquire the working state of each translation function module in the memory and recognize the type of the working state; the type of the working state includes: executing a translation task, and not executing a translation task; and a survival time management unit configured to, when the working state recognition unit determines that the working state of the translation function module is executing a translation task, update the survival time of the translation function module according to the second time increment.

[0033] In some embodiments, the survival time management unit is further configured to determine whether the current survival time of the translation function module is greater than or equal to a preset maximum survival time, and if so, no longer update the current survival time of the translation function module according to the second time increment; and if not, update the current survival time of the translation function module according to the second time increment.

[0034] A third aspect of the present invention is to provide a scheduling system for multilingual Braille translation services, comprising:

[0035] Multiple clients are used for human-computer interaction with users and to respond to users' upload operations by sending upload requests; the upload request includes the file to be translated.

[0036] The aforementioned multilingual Braille translation service scheduling device is used to communicate with clients, receive upload requests from each client, preprocess the text to be translated to obtain multiple translation targets, each including content to be translated in multiple languages; and to match the corresponding translation function module according to the language of each content to be translated, and trigger a container class to dynamically load the corresponding translation function module into memory according to a preset dynamic loading rule to translate the file to be translated, and finally perform post-processing based on the translation results of each translation function module to obtain Braille and output it.

[0037] A fourth aspect of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the scheduling method described above.

[0038] Beneficial effects: This invention uses a container class to dynamically load various translation function modules, aiming to balance the relationship between limited memory resources and running speed. When there are many translation function modules (especially in some application scenarios that require multilingual translation, such as online bookstores), loading all modules will inevitably lead to excessive memory consumption, or even insufficient memory resources. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. The elements or parts in the drawings are not necessarily drawn to scale. Obviously, the drawings described below are some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0040] Figure 1 A flowchart illustrating a multilingual Braille translation service scheduling method as an exemplary embodiment of the present invention;

[0041] Figure 2 A flowchart illustrating a multilingual Braille translation service scheduling method, which is yet another exemplary embodiment of the present invention;

[0042] Figure 3A functional block diagram of a multilingual Braille translation service scheduling device according to an exemplary embodiment of the present invention;

[0043] Figure 4 This is a diagram of the translation software architecture constructed based on an exemplary embodiment of the present invention for a multilingual Braille translation service scheduling device. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0045] In this document, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" may be used interchangeably.

[0046] In this document, "and / or" includes any and all combinations of one or more of the listed related items. "Multiple" in this document means two or more, i.e., it includes two, three, four, five, etc.

[0047] In this article, "dynamic loading" refers to proactively loading the corresponding translation function module from the hard drive when needed. This enables on-demand allocation of system resources; that is, modules are loaded into memory when needed to improve running speed and removed from memory when not needed to reduce memory usage. Specifically, dynamic loading only requires knowing the path of the desired translation function module on the hard drive to load the code from the hard drive into memory, allowing multiple translation modules to work collaboratively and run efficiently.

[0048] Example 1: See Figure 1 The flowchart below illustrates a multilingual Braille translation service scheduling method according to an exemplary embodiment of the present invention. Specifically, the scheduling method includes the following steps:

[0049] S101, the system initializes to load the container class, and the container class loads the initial translation function modules into memory according to the configuration parameters of each translation function module.

[0050] In some embodiments, the above configuration parameters include the lifetime of each translation function module running in memory and its time increment; wherein, the initial translation function module is a translation function module whose lifetime is greater than or equal to a preset lifetime threshold.

[0051] In this embodiment, the above-mentioned lifetime is an indicator of the corresponding module's ability to remain in memory and run. The longer the lifetime of the module, the longer it can remain in memory.

[0052] Generally, different languages ​​appear with different frequencies. Taking English and Russian as examples, we encounter and use English more frequently. If, during the translation of a text, English and Russian appear sequentially, we can infer from the language usage frequency that English will appear more frequently than Russian in subsequent text. Therefore, the time increment in this embodiment actually represents the "usage frequency" of a translation module. The higher the usage frequency of a language, the greater the probability that the corresponding translation module will be used again in subsequent translations, and the larger the increase in the module's lifespan (time increment) should be (to further extend the module's lifespan in memory). Therefore, when configuring parameters, the English translation module should have a larger time increment than the Russian translation module.

[0053] In this embodiment, in order to balance efficiency and memory space, not all translation function modules are loaded into memory during initialization. Only some commonly used modules, namely translation function modules with a lifespan greater than or equal to a preset lifespan threshold, are loaded into memory. Most of the less frequently used modules (i.e., translation function modules with a lifespan less than the preset lifespan threshold) are still stored on the disk.

[0054] S103: Obtain the text to be translated and preprocess it to obtain multiple translation targets, each of which includes content to be translated in multiple languages.

[0055] In this embodiment, the text to be translated refers to a text containing multiple languages. Through preprocessing, it is divided into multiple paragraphs, resulting in multiple translation targets. Specifically, each translation target is a part of the text to be translated, such as a paragraph or a sentence, but it includes multiple languages. The preprocessing method or segmentation criteria for the text to be translated adopt existing technologies, which will not be elaborated here.

[0056] S105, match the corresponding translation function module according to the language of each piece of content to be translated.

[0057] In some embodiments, since each piece of content to be translated includes multiple languages, a word segmenter is used in advance to distinguish the content in different languages, and then the corresponding translation function module is matched according to the language of the different content.

[0058] S107, the container class dynamically loads the corresponding translation function modules into the memory according to the preset dynamic loading rules, so as to translate each piece of content to be translated.

[0059] In some embodiments, the above dynamic loading rule means that when any translation function module in memory is not used in each translation task (i.e., translating a target to be translated), its corresponding lifetime is reduced by a preset first time increment (e.g., 1), and when its lifetime reaches zero, it is removed from the memory; each time any translation function module in memory completes a translation task (i.e., translating a corresponding part of a target to be translated), its corresponding lifetime is increased by a preset second time increment (e.g., 5).

[0060] In this embodiment, dynamic loading actually includes three stages: loading during initialization, loading during runtime, and adjustment during runtime; the lifetime is a natural number; the maximum lifetime is also a natural number, which is the upper limit of the lifetime; and the time increment is a positive integer.

[0061] For example, during the initialization phase, if the configuration parameters of module A are (0, 200, 5), the lifetime of module A is 0, the maximum lifetime is 200, and the time increment is 5. Since its current lifetime is less than the preset lifetime threshold, module A is on the disk and has not entered memory to run.

[0062] At a certain moment, module A needs to translate a text (the target text) containing language A1. Since module A is not yet running in memory, it is loaded from disk into memory, and its lifetime is incremented by a time increment. Therefore, after completing this translation, the module's metric becomes (5, 200, 5). If the next text (the target text) is also in language A1, the time increment is increased by 5 again, becoming (10, 200, 5). This process repeats until its maximum lifetime is reached. That is, starting from a lifetime of 0, after 40 translations, its configuration parameter becomes (200, 200, 5). Even if subsequent texts containing language A1 appear, the lifetime will not increase again.

[0063] For another example, let's define the configuration parameters of module B as (10, 200, 20). In this case, module B's lifetime is 10, which is greater than the preset lifetime threshold, and module B is running in memory. At some point, the container class will call the translation module of language C for processing. In this translation, module B's translation function is not used, so module B's lifetime decreases by 1, becoming (9, 200, 20). This process repeats until module B is not used in 9 translations. Then, module B's lifetime will decrease to 0, becoming (0, 200, 20), at which point module B is removed from memory.

[0064] S109: Post-process the translation results from each translation module to obtain Braille and output it.

[0065] Preferably, see Figure 2 The step S107 above, in which the container class dynamically loads the corresponding translation function module into memory according to the preset dynamic loading rules, specifically includes the following steps:

[0066] S201, determine whether the currently matched translation function module has been loaded into memory. If not, load the currently matched translation function module into memory; if it has been loaded, proceed to step S203.

[0067] S203, obtain the working status of each translation function module in memory, and determine whether the working status is executing a translation task. If yes, proceed to step S205a; otherwise, proceed to S205b.

[0068] In some embodiments, the working state of the translation function module includes: performing a translation task and not performing a translation task.

[0069] S205a, Update the current lifespan of the translation function module according to the second time increment, and execute step S207.

[0070] S205b, Update the lifespan of the translation function module incrementally according to the first time, and execute step S207.

[0071] S207, determine whether the current lifespan of each translation function module in memory is greater than or equal to the preset maximum lifespan. If so, the lifespan of the translation function module will not be updated according to the second time increment, and step S109 will be executed; otherwise, step S109 will be executed.

[0072] In this embodiment, dynamic loading aims to balance the relationship between limited memory resources and running speed. When there are many translation modules (especially in applications requiring multilingual translation, such as online bookstores), loading all modules would inevitably lead to excessive memory consumption, or even insufficient memory. However, storing all translation modules on disk, as is done with Libralouis, would slow down runtime efficiency. Therefore, this embodiment chooses to load frequently used translation modules into memory to achieve a balance between resources and running efficiency.

[0073] For example, taking Chinese translation modules, English translation modules, and Russian translation modules as examples, the Chinese and English translation modules are the more commonly used translation modules. Therefore, when the container class is loaded, these two translation modules will be loaded into memory as the initial translation modules to improve translation efficiency. However, the Russian translation module is used less frequently, so it will not be loaded into memory but stored on the disk. It will only be loaded into the container class when it is needed, and its lifespan will be determined later based on its real-time changes.

[0074] Multilingual Recognition and Conversion Experiment

[0075] (I) Recognition Accuracy Experiment

[0076] To test the recognition performance of the method presented in this paper on different languages, a multilingual corpus was constructed, comprising six languages: Chinese, English, French, Russian, Korean, and Japanese. The data was sourced from media publications such as BBC News and Le Monde. The corpus contains a total of 17,500 characters, tagged in sentences, with 226 tags in total. The number of sentences in each language is shown below:

[0077] Table 1 Multilingual Corpus Chinese English French Russian Korean Japanese Total 37 38 34 25 20 72 226

[0078] During testing, Braille translation was performed using both the method described in the above embodiments and the Chinese Braille Digital Platform. The translation result from the Chinese Braille Digital Platform was used as the standard result. The translation result of the method in this embodiment was compared with the standard result, and the accuracy rate was calculated using the formula A = (CL) / (C+R+D)*100%. The results are as follows:

[0079] Table 2 Accuracy Rate of Braille Translation Results Total words Number of marked items Number of incorrect items Accuracy 17473 226 14 93.81%

[0080] The reasons for the recognition errors are as follows: First, the sentences are too short, resulting in unclear language features and making accurate recognition impossible; second, the sentences contain proper nouns or abbreviations, leading to errors in language judgment.

[0081] (II) Chinese-English Bilingual Translation Experiment

[0082] The system's performance was tested using a mixed Chinese-English translation method to more comprehensively measure its capabilities. Chinese and English sentences were extracted from the multilingual corpus constructed in (I) to form a mixed Chinese-English corpus.

[0083] Table 3. English-Chinese Mixed Corpus Chinese characters English characters Chinese and English punctuation Numbers 1275 2993 222 64

[0084] Braille translation was performed using the methods described in the above embodiments and the Chinese Braille Digital Platform. The translation results from the Chinese Braille Digital Platform were used as the standard results and compared and analyzed using Beyond Compare. The comparison results were divided into four parts: identical bytes, bytes unique to the left, bytes unique to the right, and bytes that differed.

[0085] Table 4 Comparison Results

[0086] Set the left file as the translation result and the right file as the standard result. "Identical bytes" refers to bytes that are consistent between the translation and standard results, indicating correct translation. "Unique bytes on the left" refers to bytes that are present in the translation result compared to the standard result (reasons may include overly fine word segmentation, redundant tone marks, or incorrect pinyin conversion). "Unique bytes on the right" refers to bytes that are present in the standard result compared to the translation result (reasons may include overly coarse word segmentation, inappropriate omission rules, etc.). "Different bytes" represents the differences between the translation and standard results for the same content, which may be caused by incorrect pinyin or tone marks.

[0087] Based on the accuracy calculation formula and Table 4 above, the translation accuracy of the method in this embodiment for mixed Chinese-English corpora is 96.65%. As can be seen from the above, the method in this embodiment has an accuracy of 93.81% for recognizing six languages ​​and an accuracy of 96.65% for recognizing and translating mixed Chinese-English corpora, which is a relatively high accuracy.

[0088] Example 2: See Figure 3 This is a functional block diagram of a multilingual Braille translation service scheduling device according to an exemplary embodiment of the present invention. Specifically, the scheduling device includes:

[0089] A parameter configuration module is used to configure the configuration parameters of each translation function module; preferably, the configuration parameters include the lifetime of each translation function module running in the memory and its time increment;

[0090] The initialization module is used to load the container class, and the container class loads the initial translation function modules into memory according to the configuration parameters of each translation function module; the initial translation function modules are translation function modules whose initial lifespan is greater than a first preset time threshold.

[0091] The translation task management module is used to acquire text to be translated and preprocess it to obtain multiple translation targets, each of which includes content to be translated in multiple languages.

[0092] The language matching module is used to match the appropriate translation function module according to the language of each piece of content to be translated.

[0093] The dynamic loading module is used to trigger the container class to dynamically load the corresponding translation function modules into memory according to preset dynamic loading rules, so as to translate each piece of content to be translated. The dynamic loading rules are as follows: when any translation function module in memory is not used in each translation task, its corresponding lifetime is reduced by a preset first time increment, and when its lifetime reaches zero, it is removed from the memory; each time any translation function module in memory completes a translation task, its corresponding lifetime is increased by a preset second time increment.

[0094] The Braille output module is used to post-process the translation results from each translation function module to obtain and output Braille.

[0095] In some embodiments, the parameter configuration module specifically includes an XML configuration file, an XML loader, and a parameter table. The XML configuration file is a structured file based on the XML language. The XML file contains multiple `language` root tags, each corresponding to a language that needs to be translated. Each newly created language must be included in this root tag. Under the `language` root tag are three sub-tags: `name`, `container-id`, and `package-route`. `name` is the name of the language obtained in the tokenizer, which is the "tag" mentioned above; `container-id` is the name of the language in the container, which uses this name to find the corresponding translation module; `package-route` is the path to the translation module for that language. The container class loads (i.e., dynamically loads) the translation module using Java's reflection mechanism and manages it under the name `container-id`. Through this configuration information, the various processes of translation can be smoothly linked together. The XML loader is used to load the XML configuration file into memory for further processing. Once this file information is loaded into memory, the program automatically saves it to the parameter table. The parameter table is stored in the form of a hash table. Compared with sequential storage and linked storage, this storage method has a higher search speed and can improve the search performance of the software.

[0096] In this embodiment, the container class serves to manage the various translation function modules uniformly and to call the interfaces of these modules for translation. While the specific translation standards differ for each language, the translation process itself shares similarities. Regardless of the language, the entry and exit points of the translation modules are fixed: input characters, output Braille. Preferably, the container class employs Java interfaces and polymorphism, defining a generic interface and requiring each translation module to implement this interface, thus enabling the container to uniformly call the various modules. Correspondingly, all translation function modules must implement the "LanguageToBraille" interface to be uniformly invoked by the container.

[0097] Of course, in other embodiments, the container class described above, in addition to uniformly calling the translation function module interface for translation, also needs to uniformly manage each translation function module. Preferably, Java reflection technology is used to obtain an instance object of the class by passing in the classpath name of the translation function module. This approach reduces the coupling between translation function modules, and when updating a translation function module, it is not necessary to modify the program's source code; only the configuration file needs to be edited according to the rules, and the program needs to be re-run to update the translation function module. This achieves modularity and standardization, and also makes future updates and maintenance more convenient.

[0098] In some embodiments, the initialization module is specifically used to determine whether the current lifetime of each translation function module is greater than or equal to a preset minimum lifetime threshold. If so, the container class is triggered to load the corresponding translation function module into memory as the initial translation function module.

[0099] In some embodiments, the dynamic loading module specifically includes:

[0100] The judgment unit is used to determine whether the currently matched translation function module has been loaded into memory. If not, the currently matched translation function module is loaded into memory.

[0101] The working status identification unit is used to obtain the working status of each translation function module in memory and identify the type of working status; the types of working status include: executing translation tasks and not executing translation tasks;

[0102] The lifespan management unit is used to update the lifespan of the translation function module according to the second time increment when the working status identification unit determines that the working status of the translation function module is performing a translation task; and to determine whether the current lifespan of the translation function module is greater than or equal to the preset maximum lifespan. If it is greater than or equal to the maximum lifespan, the current lifespan of the translation function module is no longer updated according to the second time increment; if it is less than the maximum lifespan, the current lifespan of the translation function module is updated according to the second time increment.

[0103] For example, see Figure 4 The software framework of the multilingual Braille translation service scheduling device includes: a word segmenter to distinguish different languages, a container class, single-language translation function modules (e.g., English-Braille translation module, Chinese-Braille translation module, legal-Braille translation module, formula translation module, etc.), a word combiner to merge the results of different translation function modules, and a parameter configuration module. The word segmenter, word combiner, and parameter configuration module load their contents into memory during initialization. Specifically, taking the translation of a sentence as an example, the working principle of the device is explained as follows: First, the word segmenter distinguishes different language parts in a sentence. For example, in "He said Hello," "He said" and "Hello" belong to different language parts. The word segmenter marks each part with a "language tag" corresponding to the language and passes the processing result to the container class. Then, the container class, based on the language tag, calls the corresponding single-language translation function module for translation processing. The corresponding language translation function module processes the part according to the standards and usage habits of that language and obtains the translation result. The translation result is then passed to the word combiner, which handles formatting issues between different language segments. After processing by the word combiner, the Braille translation result is obtained, which is output as a string.

[0104] Example 3: The present invention also provides a multilingual Braille translation service scheduling system. Specifically, the scheduling system includes:

[0105] Multiple clients are used for human-computer interaction with users and to respond to users' upload operations by sending upload requests; wherein, the upload request includes the file to be translated.

[0106] On the server side, it communicates with clients, receives upload requests from each client, preprocesses the text to be translated to obtain multiple translation targets, each containing content in multiple languages; it also matches the corresponding translation function module according to the language of each content to be translated, and triggers a container class to dynamically load the corresponding translation function module into memory according to preset dynamic loading rules for translating the file to be translated; finally, it performs post-processing based on the translation results of each translation function module to obtain Braille and output it.

[0107] In other embodiments, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the scheduling method described above.

[0108] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a computer terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0110] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A multilingual Braille translation service scheduling method, characterized by, The method comprises the steps of: S101, system initialization to load container classes, and load initial translation function modules into memory according to configuration parameters of each translation function module by the container classes; the configuration parameters include survival time of each translation function module running in the memory and time increment thereof; The initial translation function module is a translation function module with survival time greater than or equal to a preset survival time threshold; S103, obtaining a text to be translated, and preprocessing the text to be translated to obtain a plurality of translation targets, each of which includes translation content in multiple languages; S105, matching to a corresponding translation function module according to the language category of each translation content; S107, the container classes dynamically load the corresponding translation function module into the memory according to a preset dynamic loading rule to translate each translation content; S109, post-processing according to the translation results of each translation function module to obtain Braille and output; The dynamic loading rule is that the survival time of any translation function module in the memory is reduced by a preset first time increment when it is not used in each translation task, and it is removed from the memory when its survival time is zero; the survival time of any translation function module in the memory is increased by a preset second time increment after each translation task.

2. The multilingual Braille translation service dispatching method of claim 1, wherein, The step of loading initial translation function modules into memory according to the configuration parameters of each translation function module by the container classes specifically comprises the steps of: determining whether the current survival time of each translation function module is greater than or equal to a preset minimum survival time threshold, if yes, triggering the container classes to load the corresponding translation function module into the memory as an initial translation function module.

3. The multilingual Braille translation service dispatching method of claim 2, wherein, The step of dynamically loading the corresponding translation function module into the memory according to the preset dynamic loading rule by the container classes specifically comprises the steps of: S201, determining whether the matched translation function module has been loaded into the memory, if not, loading the matched translation function module into the memory; S203, obtaining the working state of each translation function module in the memory and determining whether the working state is executing a translation task, if yes, executing step S205a; otherwise, executing step S205b; the working state includes executing a translation task and not executing a translation task; S205a, updating the current survival time of the translation function module according to the second time increment; S205b, updating the survival time of the translation function module according to the first time increment.

4. A multilingual Braille translation service dispatching method according to claim 3, characterized in that, The step of dynamically loading the corresponding translation function module into the memory according to the preset dynamic loading rule by the container classes further comprises the step of: S207, determining whether the current survival time of each translation function module in the memory is greater than or equal to a preset maximum survival time, if yes, the survival time of the translation function module will not be updated according to the second time increment in the future.

5. A multilingual Braille translation service dispatching apparatus characterized by comprising: The method comprises the steps of: An initialization module is configured to load a container class, and load initial translation function modules into a memory according to configuration parameters of the respective translation function modules by the container class; The configuration parameters include a survival time of each translation function module running in the memory and a time increment thereof; The initial translation function modules are translation function modules with an initial survival time greater than a first preset time threshold; A translation task management module is configured to obtain a text to be translated, and preprocess the text to be translated to obtain a plurality of translation targets, each of which includes translation content in multiple languages; A language matching module is configured to match each translation content to a corresponding translation function module according to the language type of the translation content; A dynamic loading module is configured to trigger the container class to dynamically load a corresponding translation function module into the memory according to a preset dynamic loading rule, so as to translate each translation content; wherein the dynamic loading rule refers to that when any translation function module in the memory is not used in each translation task, the survival time corresponding to the translation function module is reduced by a preset first time increment, and when the survival time is zero, the translation function module is removed from the memory; and each time any translation function module in the memory completes a translation task, the survival time corresponding to the translation function module is increased by a preset second time increment; A Braille output module is configured to post-process translation results of the respective translation function modules to obtain Braille and output the Braille.

6. A multilingual Braille translation service dispatching apparatus according to claim 5, wherein The initialization module is specifically configured to determine whether the current survival time of each translation function module is greater than or equal to a preset minimum survival time threshold, and if so, trigger the container class to load the corresponding translation function module into the memory as an initial translation function module.

7. A multilingual Braille translation service dispatching apparatus according to claim 6, wherein The dynamic loading module specifically includes: A judgment unit is configured to determine whether the currently matched translation function module has been loaded into the memory, and if not, load the currently matched translation function module into the memory; A working state recognition unit is configured to obtain the working state of each translation function module in the memory, and recognize the type of the working state; the type of the working state includes: executing a translation task, and not executing a translation task; A survival time management unit is configured to update the survival time of the translation function module according to the second time increment when the working state recognition unit determines that the working state of the translation function module is executing a translation task.

8. The multilingual Braille translation service dispatching apparatus according to claim 7, wherein The survival time management unit is further configured to determine whether the current survival time of the translation function module is greater than or equal to a preset maximum survival time, and if so, no longer update the current survival time of the translation function module according to the second time increment; and if not, update the current survival time of the translation function module according to the second time increment.

9. A multi-lingual Braille translation service dispatching system characterized by, The method includes: A plurality of clients are configured to perform human-computer interaction with a user, and send an upload request in response to an upload operation of the user; The upload request includes an uploaded translation file; The multi-language Braille translation service scheduling device according to any one of claims 5 to 8 is configured to communicate with the clients, receive the upload requests sent by the clients, and preprocess the texts to be translated to obtain a plurality of target texts to be translated, each of which includes content to be translated in multiple languages. The device is further configured to match each target text to a corresponding translation function module according to the language category of the content to be translated, trigger the container to dynamically load the corresponding translation function module into the memory according to a preset dynamic loading rule, translate the target file, and finally perform post-processing on the translation results of the translation function modules to obtain and output Braille.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the scheduling method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • English two-level Braille converting method and device

    CN105718450A

  • Automatic and efficient translation conversion method from Chinese to Braille

    CN107368474A

  • Chinese blind translation method and system based on end-to-end neural machine translation

    CN111581991A

  • MathML-based mathematical formula-to-braille translation method and system

    CN111753555A

  • System and method for converting CML into chemical braille

    CN111881696A