Method and system for automatically translating and automatically generating vehicle translation
Through the automatic translation and automatic generation of vehicle-machine translations, the complex flow of translated files and inconvenient data management in the Internet of Vehicles business is solved, and efficient vehicle-machine translation generation and data management is realized, which reduces labor costs and ensures data Persistence and manageability.
Patent Information
- Application Number
- CN202410853427.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-11-08
AI Technical Summary
In the Internet of Vehicles business, the translation files of the vehicle computer system are complicated to flow, data management is inconvenient, labor costs are high, and redundant workloads are large, resulting in the translation data being easily lost and unable to be effectively reused.
The method of automatic translation and automatic generation of vehicle-machine translation is adopted. Through self-construction of the translation platform, Chinese XML file parsing, automatic translation and XML configuration file generation are realized, and manual modification and verification is supported, reducing manual workload and improving data management efficiency.
It realizes efficient vehicle-machine translation generation, reduces manual workload, ensures data persistence and manageability, supports automatic updates and expansion of basic translation libraries, and avoids translation data loss and redundant work.
Smart Images

Figure CN118917326A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and system for automatically translating and automatically generating vehicle computer translations. Background Art
[0002] In the Internet of Vehicles business, when facing overseas projects, the classical Chinese of the vehicle system needs to be translated into the language of the corresponding country for export. The following process is basically required in the process of translating Chinese into foreign languages: 1. HMI personnel summarize the classical Chinese of the vehicle system that needs to be translated, 2. Translators of different languages translate Chinese, 3. Vehicle system developers configure vehicle-side resource files based on the translation results.
[0003] In the above process, the translation method is very difficult and has the following pain points:
[0004] 1. The translation file circulation is complicated: HMI personnel->car computer developers->translators->car computer developers;
[0005] 2. Translation data is difficult to manage, review, verify, and view historical versions, and is easy to lose;
[0006] 3. High labor costs, requiring manual translation and vehicle-side developers need to manually adapt foreign language resource files;
[0007] 4. The redundant workload is large. Different car models have reusable translations but they are not reused, resulting in manpower redundancy.
[0008] Based on this, the present invention proposes a vehicle computer translation method for automatically translating and generating translation codes, which can effectively solve the above problems. Summary of the invention
[0009] The technical problem to be solved by the present invention is to overcome the above-mentioned problems existing in the prior art and provide a method and system for automatic translation and automatic generation of vehicle computer translation.
[0010] This method builds a translation platform by itself, and implements a Chinese XML file parsing algorithm, a translation XML configuration file generation algorithm, and an automatic translation algorithm by itself, realizing a method for parsing the initial file, automatically translating, and automatically generating a vehicle-side configuration file. At the same time, it supports manual modification and verification of the translation.
[0011] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0012] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions:
[0013] A method for automatically translating and automatically generating vehicle computer translations comprises the following steps:
[0014] Step 1. Upload Chinese resource files and submit the code;
[0015] Step 2. Parse the input Chinese configuration file using a file parsing algorithm;
[0016] Step 3. Use the automatic translation algorithm to achieve automatic translation of the text into different languages and iterate the basic classical Chinese database;
[0017] Step 4. Use the translation XML configuration file generation algorithm to generate translation files in different languages.
[0018] Furthermore, the file parsing algorithm flow in step 2 is as follows:
[0019] S1 creates the initial XML object document of the XML parser;
[0020] Document is an object in a Java program.
[0021] S2 Read <string>Tags get all Chinese;
[0022] S3 Read <string-array>Tag gets all Chinese key arrays;
[0023] S4 reads the resource tag and the untranslated key annotation in the XML file.
[0024] Furthermore, the automatic translation algorithm process in step 3 is as follows:
[0025] S1 query files for Chinese characters to be translated;
[0026] S2 query includes Chinese in the Chinese language database;
[0027] S3 translates the Chinese to be translated that is covered by the Chinese language database;
[0028] S4 determines whether the translation is completed;
[0029] If S5 is not translated, the machine translation interface is called to translate the classical Chinese not included in the classical Chinese database;
[0030] S6 New translations are added to the basic classical Chinese database;
[0031] S7 translation completed.
[0032] Furthermore, in step 4, the algorithm for generating the translation XML configuration file has the following process:
[0033] S1 obtains all Chinese and translated values;
[0034] S2 creates a Document object instance;
[0035] S3 reads resource tag information to generate resource tags;
[0036] S4 traverses the Chinese and translated values;
[0037] S5 determines whether it is a Chinese array;
[0038] If it is a Chinese array, create <string-array>Label elements and add translation data;
[0039] If it is not a Chinese array, create <string>Label elements and add translation data;
[0040] S6 adds array tags and Chinese tags to the document object;
[0041] S7 Document is converted into a string in XML file format.
[0042] Furthermore, a method for automatically translating and automatically generating vehicle computer translations also includes:
[0043] Step 5. Manually review the Chinese classical text and the translated classical text, and support modification if needed.
[0044] A system for automatically translating and generating vehicle computer translations, comprising:
[0045] Upload file module, used to upload Chinese resource files and submit code;
[0046] Parsing module, used for file parsing algorithm to parse the input Chinese configuration file;
[0047] Automatic translation module, which is used for automatic translation algorithm to realize automatic translation of different languages and iterate the basic classical Chinese database;
[0048] The generation module is used to generate the translation XML configuration file generation algorithm to generate translation files in different languages.
[0049] An apparatus comprising one or more processors;
[0050] A memory for storing one or more programs;
[0051] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0052] A computer-readable storage medium stores a computer program, which implements the method described above when executed by a processor.
[0053] Compared with the prior art, the present invention has the following beneficial effects:
[0054] 1. High efficiency, input Chinese and output vehicle-machine translation configuration files, reducing manual workload.
[0055] 2. The translation data is easy to manage. You can clearly view the change records, check the translation errors or missing translations, and the data is completely persistent and will not be lost.
[0056] 3. It has the advantage of platformization. Platformization means that we have built a basic translation library, which is automatically updated and expanded. The data source for automatic translation is this library. When this basic translation library encounters classical Chinese that needs to be updated, it is updated. When it encounters uncovered keys, it is automatically added. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The present invention will be further described below in conjunction with the accompanying drawings:
[0058] Figure 1 This is a flow chart of the method for automatic translation and automatic generation of vehicle computer translation according to the present invention;
[0059] Figure 2 It is the flowchart of the file parsing algorithm;
[0060] Figure 3 It is the key code diagram of the file parsing algorithm;
[0061] Figure 4 This is the flow chart of the automatic translation algorithm;
[0062] Figure 5 Key code for automatic translation algorithm process Figure 1 ;
[0063] Figure 6 Key code for automatic translation algorithm process Figure 2 ;
[0064] Figure 7 Generate algorithm flow chart for translation XML configuration file;
[0065] Figure 8 Generate algorithm key code graph for the translated XML configuration file. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical scheme and advantages of the implementation of the present invention clearer, the technical scheme in the embodiment of the present invention will be described in more detail below in conjunction with the drawings in the embodiment of the present invention. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present invention, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limitations on the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. The embodiments of the present invention are described in detail below in conjunction with the drawings.
[0067] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the scope of protection of the present invention.
[0068] The present invention is described in detail below in conjunction with the accompanying drawings:
[0069] The existing technology for realizing multi-language in-vehicle computers is as follows: In-vehicle development requires manual writing of configuration code, the file format is XML, and the file structure is as follows:<key,value> In the form of key-value pairs, the key is the same, the Chinese version of UI, the value is Chinese; the foreign version of UI, the value is foreign. The method of the present invention writes an algorithm to automatically generate the file.
[0070] The machine translation technology is mature in the prior art, but the present invention still establishes a basic classical Chinese database and does not fully adopt machine translation because: first, machine translation consumes computing resources; second, machine translation requires time cost, and the response speed is far less than that of the local self-built translation platform library.
[0071] The present invention provides an embodiment, as Figure 1 As shown, a method for automatically translating and automatically generating vehicle computer translations includes the following steps:
[0072] Step 1. The vehicle computer developer develops Chinese resource files according to the Chinese classical language provided by the HMI personnel and submits the code.
[0073] Step 2. File parsing algorithm, parse the input Chinese configuration file.
[0074] like Figure 2 As shown, the file parsing algorithm process is as follows:
[0075] S1 creates the initial XML object of the XML parser;
[0076] S2 Read <string>Tags get all Chinese;
[0077] S3 Read <string-array>Tag gets all Chinese key arrays;
[0078] S4 reads other notes in the XML file (resource tags and key annotations that are not translated).
[0079] Key codes such as Figure 3 shown.
[0080] Step 3. The automatic translation algorithm realizes the automatic translation of the text into different languages and iterates the basic classical Chinese database, calls the machine translation interface to realize the translation, and iterates these classical Chinese to the local translation database.
[0081] like Figure 4 As shown, the automatic translation algorithm process is as follows:
[0082] S1 query files for Chinese characters to be translated;
[0083] S2 query includes Chinese in the Chinese language database;
[0084] S3 translates the Chinese to be translated that is covered by the Chinese language database;
[0085] S4 determines whether the translation is completed;
[0086] If S5 is not translated, the machine translation interface is called to translate the classical Chinese not included in the classical Chinese database;
[0087] S6 New translations are added to the basic classical Chinese database;
[0088] S7 translation completed.
[0089] Key codes such as Figure 5 ,like Figure 6 shown.
[0090] Step 4: Generate translation XML configuration file algorithm to generate translation files in different languages.
[0091] like Figure 7 As shown in the figure, the algorithm for generating the translation XML configuration file has the following process:
[0092] S1 obtains all Chinese and translated values;
[0093] S2 creates a Document object instance;
[0094] S3 reads resource tag information to generate resource tags;
[0095] S4 traverses the Chinese and translated values;
[0096] S5 determines whether it is a Chinese array;
[0097] If it is a Chinese array, create <string-array>Label elements and add translation data;
[0098] If it is not a Chinese array, create <string>Label elements and add translation data;
[0099] Add array tags and Chinese tags to the S6 Document object;
[0100] S7 Document is converted into a string in XML file format.
[0101] The key code of the algorithm for generating the translation XML configuration file is as follows: Figure 8 Shown
[0102] Step 5. Manual review of the Chinese classical text and translated classical text is available, and modifications can be made if required.
[0103] The present invention provides another embodiment, a system for automatically translating and automatically generating vehicle computer translation, comprising:
[0104] Upload file module, used to upload Chinese resource files and submit code;
[0105] Parsing module, used for file parsing algorithm to parse the input Chinese configuration file;
[0106] The automatic translation module is used for the automatic translation algorithm to realize the automatic translation of the text into different languages and iterate the basic classical Chinese database; it calls the machine translation interface to realize the translation and iterates these classical Chinese to the local translation database.
[0107] The generation module is used to generate the translation XML configuration file generation algorithm to generate translation files in different languages.
[0108] Based on the method of automatic translation and automatic generation of vehicle computer translation, the present invention provides another device, which includes but is not limited to: one or more processors and memories.
[0109] The memory, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions corresponding to the method of automatic translation and automatic generation of vehicle-computer translation in the embodiment of the present invention. The processor executes various functional applications and data processing of the vehicle by running the software programs, instructions and modules stored in the memory, that is, realizing the method of automatic translation and automatic generation of vehicle-computer translation.
[0110] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0111] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, a method for automatically translating and automatically generating a vehicle computer translation is implemented. The method for automatically translating and automatically generating a vehicle computer translation comprises the following steps:
[0112] Step 1. Upload Chinese resource files and submit the code;
[0113] Step 2. Parse the input Chinese configuration file using a file parsing algorithm;
[0114] Step 3. Use the automatic translation algorithm to achieve automatic translation of the text into different languages and iterate the basic classical Chinese database;
[0115] Step 4. Use the translation XML configuration file generation algorithm to generate translation files in different languages.
[0116] The computer-readable storage medium provided by the present invention has computer-executable instructions that are not limited to the method operations described above, but can also execute related operations in the method for automatic translation and automatic generation of vehicle-computer translation provided by any embodiment of the present invention.
[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0118] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (for example, coaxial cable, optical fiber, digital subscriber line DSL) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state hard disk Solid State Disk, SSD), etc.
[0119] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement and improvement made by any person skilled in the art within the technical scope disclosed by the present invention and within the spirit and principle of the present invention shall be covered within the protection scope of the present invention. At the same time, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.< / string> < / string> < / string> < / string>
Claims
1. A method for automatically translating and automatically generating vehicle computer translation, characterized in that: The following steps are involved: Step 1. Upload Chinese resource files and submit the code; Step 2. Parse the input Chinese configuration file using a file parsing algorithm; Step 3. Use the automatic translation algorithm to achieve automatic translation of the target text into different languages and iterate the basic classical Chinese database; Step 4. Generate translation files in different languages using the translation XML configuration file generation algorithm.
2. The method for automatically translating and automatically generating vehicle computer translation according to claim 1, characterized in that: The file parsing algorithm flow in step 2 is as follows: S1 creates the initial XML object document of the XML parser; S2 Read <string> Tags get all Chinese;< / string> S3 Read <string-array> Tag gets all Chinese key arrays;< / string-array> S4 reads the resource tag and the untranslated key annotation in the XML file.
3. The method for automatic translation and automatic generation of vehicle computer translation according to claim 1, characterized in that: The automatic translation algorithm process in step 3 is as follows: S1 query files for Chinese characters to be translated; S2 query library covers Chinese; S3 translates the Chinese to be translated that is covered by the Chinese language library; S4 determines whether the translation is completed; If S5 is not translated, the machine translation interface is called to translate the classical Chinese not included in the classical Chinese database; S6 New translations are added to the basic classical Chinese database; S7 translation completed.
4. The method of automatic translation and automatic generation of vehicle computer translation according to claim 1, characterized in that: In step 4, the algorithm for generating the translated XML configuration file is as follows: S1 obtains all Chinese and translated values; S2 creates a Document object instance; S3 reads resource tag information to generate resource tags; S4 traverses the Chinese and translated values; S5 determines whether it is a Chinese array; If it is a Chinese array, create <string-array> Label elements and add translation data;< / string-array> If it is not a Chinese array, create <string> Label elements and add translation data;< / string> S6 adds array tags and Chinese tags to the document object; S7 Document is converted into a string in XML file format.
5. The method for automatic translation and automatic generation of vehicle computer translation according to claim 1, characterized in that: Also includes: Step 5. Manually review the Chinese classical text and the translated classical text, and support modification if needed.
6. A system for automatically translating and generating vehicle computer translations, characterized in that: include: Upload file module, used to upload Chinese resource files and submit code; Parsing module, used for file parsing algorithm to parse the input Chinese configuration file; Automatic translation module, which is used for automatic translation algorithm to realize automatic translation of different languages and iterate the basic classical Chinese database; The generation module is used to generate the translation XML configuration file generation algorithm to generate translation files in different languages.
7. A device, characterized in that: comprising one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
