Multi-language dynamic switching system and method of embedded device

By extracting characters of HMI programs in embedded devices, generating and using dictionaries for rapid indexing, the problems of long indexing time, repeated resource usage, difficult maintenance and lack of self-healing capabilities in existing multilingual support solutions are solved, and a multilingual dynamic switching system with efficient, low resource usage, easy maintenance and self-healing capabilities are realized.

CN119538943APending Publication Date: 2025-02-28NANJING GUODIAN NANZI WEIMEIDE AUTOMATION CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411374004.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing embedded device multilingual support solutions have problems such as long indexing time, repeated resource usage, difficulty in maintenance, and lack of self-healing capabilities.

Method used

The character extraction module is used to count and eliminate duplicate characters in the source code of the HMI program, generate dictionaries and quickly index them using character numbers. The independent dictionary module is output to the specified position after the device is started, ensuring that it has self-healing ability in extreme cases.

Benefits of technology

It reduces the use of CPU resources of embedded devices, improves program flexibility and robustness, reduces maintenance costs and indexing time, and enhances the system's self-healing ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538943A_ABST
    Figure CN119538943A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-language dynamic switching system and method of embedded equipment, and relates to the technical field of human-machine interfaces and embedded systems.The method comprises the steps that source codes in an HMI program are traversed through a character extraction module to extract all character strings; eliminating repeated items, numbering the character strings, and outputting a database file and a replacement array; substituting the serial number into the source code file again by using the substitution array to replace the character string at the corresponding position; outputting the translated database file as a C language source code, compiling the C language source code into a dictionary generation module project, generating an executable file, and outputting the dictionary file to an HMI running directory after the device is started; after the HMI program is started, the dictionary is read into different dictionary arrays according to blocks, and character strings at corresponding positions in the dictionary arrays are extracted after a page sends a request. The method has the advantages of being lower in maintenance difficulty, more efficient in resource utilization, shorter in indexing time, better in system robustness and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human-machine interface and embedded system, and in particular to a multi-language dynamic switching system and method for embedded equipment. Background Art

[0002] With the expansion of overseas business of domestic power generation enterprises, the overseas sales scope of domestic relay protection devices (hereinafter referred to as equipment) is also expanding year by year; in order to adapt to this trend and also to provide engineers around the world with a good user experience, it is very necessary to provide multi-language support for the human-machine interface (HMI) of the equipment. At present, the solution commonly used by engineers in the industry is external language packs, such as CN102109958, CN101441567, CN103793236, etc. Even the former two use XML as the file format, the difference lies in the index form and storage method of the characters in the language pack.

[0003] CN101441567 uses the method of traversing all child nodes of XML according to the character ID to obtain the currently required character. This solution will occupy too many CPU resources in the actual production process. For example, if the character required by the current page is in the last child node, the index program will traverse all nodes to obtain the desired character. The calculation time generated by this process will be considerable; CN102109958 has made improvements on this basis and stores all characters in modules. This seems to save CPU time and resources when traversing XML nodes, but the actual situation is that the same HMI program will use the same characters on different pages, such as the common "confirm" and "return".

[0004] In addition, the patents found so far all choose to store language packs in folders and files according to language types. This solution not only requires checking the number of languages ​​required by the current device, but also checks whether the number of language pack types in each directory corresponds, increasing the maintenance cost of the equipment. The most critical thing is that in the event that the language pack is damaged, the above patents do not mention the corresponding avoidance solutions.

[0005] Therefore, it is not difficult to find that the embedded multi-language solutions currently on the market have many shortcomings, such as long indexing time, repeated occupation of resources, difficult maintenance, and lack of self-healing capabilities. Summary of the invention

[0006] In view of the above-mentioned problems, the present invention is proposed.

[0007] Therefore, the technical problem solved by the present invention is: to provide a multi-language dynamic switching system with high efficiency, low resource occupation, easy maintenance and self-healing ability, in view of the problems existing in the multi-language support solution of embedded devices, such as long indexing time, repeated resource occupation, great maintenance difficulty and lack of self-healing ability.

[0008] In order to solve the above technical problems, the present invention provides the following technical solutions: a multi-language dynamic switching system for embedded devices, which comprises the following steps:

[0009] Character extraction module, dictionary generation module and character acquisition module.

[0010] The character extraction module is used to statistically extract characters in the HMI program source code and eliminate duplicate items.

[0011] The dictionary generation module runs independently of the HMI program and outputs the dictionary to a specified location after the domestic relay protection device is started.

[0012] The character acquisition module is built into the HMI program. After the HMI is started, the characters in the dictionary are extracted and written into the memory space. When the page is generated, only the characters at the corresponding position need to be extracted according to the character sequence number without searching.

[0013] Another object of the present invention is to provide a multi-language dynamic switching method for embedded devices, which can extract characters in the HMI program, generate a dictionary and use character numbers for rapid indexing, thereby solving the problems of long indexing time, repeated resource occupation, difficult maintenance and lack of self-healing ability for language package damage in existing multi-language support solutions.

[0014] In order to solve the above technical problems, the present invention provides the following technical solutions: a multi-language dynamic switching method for an embedded device, comprising:

[0015] Through the character extraction module, the source code in the HMI program is traversed to extract all strings.

[0016] Remove duplicates, number the string, and output the database file and replacement array.

[0017] Use the replacement array to substitute the number back into the source code file and replace the string at the corresponding position.

[0018] The translated database file is output as C language source code and compiled into the dictionary generation module project to generate an executable file. After the device is started, the dictionary file is output to the HMI running directory.

[0019] After the HMI program is started, the dictionary is read into different dictionary arrays by block, and the string at the corresponding position in the dictionary array is extracted when the page sends a request.

[0020] As a preferred solution of the multi-language dynamic switching method for an embedded device described in the present invention, the extraction of all strings includes obtaining the file path of the source file in the CMakeLists.txt, vcproj, and pro project files according to the project type, adding the file path to the list of read files, reading the file content line by line in sequence, saving the double quotes, single quotes, and the content in the tr() function according to the length in the format of the string position information and the string itself to the original array, saving according to the length, that is, calculating the string length after obtaining the string, using the binary search method to compare the existing string lengths in the original array, and selecting the correct position to insert into the original array.

[0021] As a preferred solution of the multi-language dynamic switching method for an embedded device described in the present invention, the output database file and the replacement array include a comparison operation on the original array, that is, each string needs to be compared with the previous string to check whether it is contained or equal. If they are equal, they share a sequence number. If they are contained, the string is cut, and the equal strings share the sequence number. The remaining parts continue to be compared until there are no equal strings. The remaining strings obtain new sequence numbers and are saved in the form of sequence number-string to the mdb standard database file, and the strings in the original array are replaced with {sequence number 1, sequence number 2...} and saved to the replacement array for replacing the source code string.

[0022] As a preferred solution of the multi-language dynamic switching method for an embedded device described in the present invention, wherein: replacing the character string at the corresponding position includes traversing the HMI source code and replacing the character string at the corresponding position in the source code with the function char*Getchar.

[0023] As a preferred solution of the multi-language dynamic switching method for an embedded device described in the present invention, wherein: the generating of the executable file includes adding double quotes to each line, copying it into the output function in the dictionary generation program, and compiling the corresponding project to output the executable file.

[0024] As a preferred solution of the multi-language dynamic switching method for an embedded device described in the present invention, wherein: the output to the HMI running directory includes, after the domestic relay protection device is started, the dictionary generation program writes the dictionary into the HMI execution directory through the output function.

[0025] As a preferred solution of the multi-language dynamic switching method for an embedded device described in the present invention, wherein: the extracting of the character string at the corresponding position in the dictionary array includes: the HMI reads the dictionary file into the character array in blocks, and the block standard is 100 string elements as a group. After all the string elements are read, when the HMI program generates a page, the character string of the corresponding language is obtained from the character array through the Getchar function and the global language variable to complete the multi-language dynamic switching.

[0026] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the multi-language dynamic switching method of an embedded device as described above are implemented.

[0027] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the multi-language dynamic switching method for an embedded device as described above.

[0028] The beneficial effects of the present invention are as follows: 1) This patent adopts a method of replacing a string in a source code with a serial number, which solves the problem of needing to search for a language package again when switching languages, reduces the CPU resource occupation of an embedded device, and improves the flexibility of the program;

[0029] 2) The dictionary module of this patent runs independently of the HMI program and outputs the dictionary to a specified location after the device is started, ensuring the self-healing ability in extreme situations and improving the robustness of the program;

[0030] 3) Thanks to 1) it allows developers to count the string contents contained in the entire HMI program, thereby eliminating redundant items, reducing development costs and resource usage;

[0031] 4) The dictionary file of this patent adopts the simplest and clearest file format, and all character information is in one dictionary file, which reduces maintenance costs.

[0032] It can be seen that compared with the existing solutions, the present invention has many characteristics such as lower maintenance difficulty, more efficient resource utilization, less indexing time and better system robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0034] Figure 1This is an overall framework diagram of a multi-language dynamic switching system for an embedded device provided by the first embodiment of the present invention.

[0035] Figure 2 This is an overall flow chart of a multi-language dynamic switching method for an embedded device provided by a second embodiment of the present invention.

[0036] Figure 3 A schematic diagram of a character string extraction process of a multi-language dynamic switching method for an embedded device provided in a second embodiment of the present invention.

[0037] Figure 4 A schematic diagram of a string sorting process of a multi-language dynamic switching method for an embedded device provided in a second embodiment of the present invention.

[0038] Figure 5 A schematic diagram of a dictionary generation process of a multi-language dynamic switching method for an embedded device provided in a second embodiment of the present invention.

[0039] Figure 6 A schematic diagram of the HMI language switching process of a multi-language dynamic switching method for an embedded device provided by a second embodiment of the present invention.

[0040] Figure 7 A schematic structural diagram of an original array, a replacement array, a database / dictionary file, and a character array of a multi-language dynamic switching method for an embedded device provided by a second embodiment of the present invention.

[0041] Figure 8 A schematic diagram of a page of a default language in a multi-language dynamic switching method for an embedded device provided in a third embodiment of the present invention.

[0042] Fig. 9 This is a schematic diagram of a page of language 1 finally generated by a method for dynamically switching multiple languages ​​in an embedded device provided in a third embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0044] Example 1, reference Figure 1 , as an embodiment of the present invention, provides a multi-language dynamic switching system for embedded devices, characterized in that:

[0045] The character extraction module 100 , the dictionary generation module 200 and the character acquisition module 300 .

[0046] The character extraction module 100 is used to extract the characters in the HMI program source code by statistics and remove duplicates, so as to solve the problem of duplicate occupation of resources.

[0047] The dictionary generation module 200 runs independently of the HMI program and outputs the dictionary to a specified location after the domestic relay protection device is started, ensuring the self-healing capability in extreme situations.

[0048] The character acquisition module 300 is built into the HMI program. After the HMI is started, the characters in the dictionary are extracted and written into the memory space. When the page is generated, only the characters at the corresponding position need to be extracted according to the character sequence number without searching.

[0049] Finally, the dictionary file format, all character information is in one dictionary file to reduce maintenance costs.

[0050] Compared with existing solutions, this solution has many features, such as lower maintenance difficulty, more efficient resource utilization, less indexing time, and better system robustness.

[0051] Example 2, reference Figure 2-Figure 7 , as an embodiment of the present invention, provides a method for a multi-language dynamic switching system of an embedded device, characterized in that:

[0052] The present invention proposes a multi-language dynamic switching method for an embedded device. The structure of the method is as follows: Figure 2 As shown, after all the strings are extracted from the HMI program source code, the source code of the dictionary generation program output function is generated through translation. After the device is started, the dictionary file is generated and handed over to the HMI program to read into the array. Finally, in the specific page, multi-language switching is completed by reading the array elements according to different languages.

[0053] S1: Through the character extraction module, traverse the source code in the HMI program to extract all strings.

[0054] like Figure 3 As shown in the figure, the string extraction process is as follows Figure 2 As shown, firstly, the physical path of all cpp / c files is obtained through the engineering project management file, and then the source code is read into the memory line by line, and keywords such as double quotes, single quotes and tr functions are identified, and the content contained in the keyword is copied to a new string. At the same time, the length of the string is brought into the original array for comparison, and inserted into the original array in order from short to long. After the identification is completed, the next source code file is read in, until all the source code files contained in the engineering project management file are completed.

[0055] Extracting all strings includes obtaining the file path of the source file (.c / .cpp) in the CMakeLists.txt (c / c++ under Linux), vcproj (c / c++ under Windows), and pro (Qt) project files according to the project type, adding the file path to the list of read files, reading the file content line by line in sequence, and saving the double quotes, single quotes, and the content in the tr() function to the original array in the format of the string position information and the string itself according to the length, saving by length, that is, calculating the string length after obtaining the string, using binary search to compare the existing string lengths in the original array, and selecting the correct position to insert into the original array.

[0056] The format of the string location information and the string itself is further supplemented as {file path, row number, column number}-string.

[0057] S2: Remove duplicates, number the strings, and output the database file and replacement array;

[0058] like Figure 4 As shown, the string sorting process of this method is as follows Figure 3 As shown, since it is an original array saved by string length, the comparison of strings can be carried out by front-to-back comparison, that is, the current string is compared with all the previous strings, which will produce 3 situations: 1) Equality, the position information of the current string is stored in the position information array of the equal string; 2) Contained, the current string is cut, the equal parts are merged, and the remaining parts are compared again until the remaining parts that are not equal to all the previous strings obtain a new serial number; 3) Not equal and not contained, directly obtain a new serial number.

[0059] This process outputs two results. One is to output the .mdb database file in the form of the above-mentioned "serial number" + "string" to facilitate translation by translators; the other is to replace the string part in the original array with the serial number, and output the replacement array used to replace the string in the source code in the form of "serial number array" + "{file path, number of rows, number of columns}". When the replacement array is generated, the replacement array is traversed according to the order of the source code file path in the project management file, the array element corresponding to the file path is searched, and the string at the corresponding row and column position is replaced with char*Getchar (serial number array). After the replacement is completed, the array element is deleted to reduce resource usage, and finally the replacement of all positions is completed.

[0060] The output database file and replacement array include comparison operation on the original array, that is, each string needs to be compared with the previous string to check whether it is contained or equal. If they are equal, they share a sequence number. If they are contained, the string is cut, and the equal strings share the sequence number. The remaining parts continue to be compared until there are no equal strings. The remaining strings obtain new sequence numbers and are saved in the form of sequence number-string to the mdb standard database file, and the strings in the original array are replaced with {sequence number 1, sequence number 2...} and saved in the replacement array used to replace the source code string.

[0061] S3: Use the replacement array to replace the number back into the source code file and replace the string at the corresponding position.

[0062] Replacing the string at the corresponding position includes traversing the HMI source code and replacing the string at the corresponding position in the source code with the function char*Getchar(vector <int>srail), where srail is the sequence number array in the replacement array.

[0063] The process of HMI language switching is as follows Figure 6 As shown, after the HMI program is started, the file content is read into the character array from the dictionary file based on every 100 characters. When the program needs to generate a page, the characters are extracted from the corresponding positions in the character array according to the parameters (serial number array) of Getchar in combination with the current language global variable; when the page needs to switch languages, the global variables are rewritten and the page is regenerated.

[0064] The structures of the original array, replacement array, database / dictionary file, and character array mentioned above are as follows Figure 7 As shown:

[0065] The structure of the original array is: string, location information structure, the location information structure includes the file path, the row and column number where the string is located, and the file path is a relative path.

[0066] The structure of the replacement array is: serial number array, position information structure. The serial number array comes from Figure 3 The string sorting process is a substitute for the string in the original array, and the position information structure is the same as above.

[0067] The file structure of the database / dictionary is: serial number, default string, translated string 1, translated string 2... The serial number and default string are the products of the string sorting process, and the translated string is the result of translating the default string, which can be increased as the number of languages ​​increases.

[0068] The structure of the character array is: string array, string array capacity. The string array contains strings in different languages, and the capacity indicates how many languages ​​the current string can support.

[0069] S4: Output the translated database file as C language source code and compile it into the dictionary generation module project to generate an executable file. After the device is started, output the dictionary file to the HMI running directory.

[0070] The format of the database file is "serial number-language 1-language 2..." Language 1 corresponds to the string in the original array, and the column after language 2 is the corresponding translated string, which can be expanded infinitely. The translated database is exported to text format, and double quotes are added to each line and copied into the output function in the dictionary generation program. The project is compiled to output an executable file. After the domestic relay protection device is started, the dictionary generation program writes the dictionary into the HMI execution directory through the output function.

[0071] S5: After the HMI program is started, the dictionary is read into different dictionary arrays by block, and the string at the corresponding position in the dictionary array is extracted after the page sends a request.

[0072] To improve the fault tolerance of the program, HMI reads the dictionary file into a character array in blocks, with the block standard being 100 string elements as a group. For example, when the dictionary contains 5 languages, serial numbers 1-20 are a block, 21-40 are a block, and so on. After all string elements are read in, when the HMI program generates a page, it uses the Getchar function and the global language variable to obtain the string of the corresponding language from the character array to complete dynamic switching of multiple languages.

[0073] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0074] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, apparatus or device and execute the instructions), or in conjunction with such instruction execution system, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, apparatus or device, or in conjunction with such instruction execution system, apparatus or device.

[0075] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0076] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0077] Example 3, reference Figure 8-Figure 9 In this embodiment, in order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments. This embodiment experiments the existing traditional method and the method of this embodiment respectively.

[0078] Take the platen ejection page as an example. The default language page is as follows: Figure 8 As shown, the original array obtained by S1 is shown in Table 1, the database sorted by S2 is shown in Table 2, the replacement array is shown in Table 3, the final dictionary file is shown in Table 4, and the final generated page of language 1 is shown in Fig. 9 Comparing Table 4 with Table 1, it is not difficult to find that Table 1 contains 90 characters and Table 4 contains 53 characters. The number of characters that need to be stored is reduced by 41%, which is only the amount of one page reduction.

[0079] Table 1

[0080]

[0081]

[0082]

[0083] Table 2

[0084]

[0085]

[0086] Table 3

[0087]

[0088]

[0089] Table 4

[0090]

[0091] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.< / int>

Claims

1. A multi-language dynamic switching system for embedded devices, characterized in that: include: A character extraction module (100), a dictionary generation module (200) and a character acquisition module (300); The character extraction module (100) is used to statistically extract characters in the HMI program source code and remove duplicate items; The dictionary generation module (200) runs independently of the HMI program and outputs the dictionary to a designated location after the domestic relay protection device is started; The character acquisition module (300) is built into the HMI program, and after the HMI is started, characters in the dictionary are extracted and written into the memory space. When a page is generated, only characters at corresponding positions need to be extracted according to character serial numbers, without the need for retrieval.

2. A multi-language dynamic switching method for an embedded device as claimed in claim 1, characterized in that: include: Through the character extraction module, traverse the source code in the HMI program to extract all strings; Eliminate duplicates, number the strings, and output the database file and replacement array; Use the replacement array to replace the number back into the source code file and replace the string at the corresponding position; Output the translated database file as C language source code and compile it into the dictionary generation module project to generate an executable file. After the device is started, output the dictionary file to the HMI running directory; After the HMI program is started, the dictionary is read into different dictionary arrays by block, and the string at the corresponding position in the dictionary array is extracted when the page sends a request.

3. A multi-language dynamic switching method for an embedded device as claimed in claim 2, characterized in that: The extraction of all strings includes obtaining the file path of the source file in the CMakeLists.txt, vcproj, and pro project files according to the project type, adding the file path to the list of read files, reading the file content line by line in sequence, and saving the double quotes, single quotes, and the content in the tr() function to the original array in the format of the string position information and the string itself according to the length, saving by length, that is, calculating the string length after obtaining the string, using the binary search method to compare the existing string lengths in the original array, and selecting the correct position to insert into the original array.

4. A multi-language dynamic switching method for an embedded device as claimed in claim 3, characterized in that: The output database file and replacement array include, The original array is compared, that is, each string needs to be compared with the previous string to check whether it is contained or equal. If they are equal, they share a sequence number. If they are contained, the strings are cut and the equal strings share the sequence number. The remaining parts continue to be compared until there are no equal strings. The remaining strings obtain new sequence numbers and are saved in the form of sequence number-string to the mdb standard database file. The strings in the original array are replaced with {sequence number 1, sequence number 2...} and saved in the replacement array used to replace the source code string.

5. A multi-language dynamic switching method for an embedded device as claimed in claim 4, characterized in that: The replacing of the character string at the corresponding position includes traversing the HMI source code and replacing the character string at the corresponding position in the source code with the function char*Getchar.

6. A multi-language dynamic switching method for an embedded device as claimed in claim 5, characterized in that: The generating of the executable file includes adding double quotes to each line, copying it into the output function in the dictionary generating program, and compiling the corresponding project to output the executable file.

7. A method for dynamically switching multiple languages ​​in an embedded device as claimed in claim 6, characterized in that: The output to the HMI running directory includes that after the domestic relay protection device is started, the dictionary generation program writes the dictionary into the HMI execution directory through the output function.

8. A method for dynamically switching multiple languages ​​in an embedded device as claimed in claim 7, characterized in that: The extracting of the character string at the corresponding position in the dictionary array includes: the HMI reads the dictionary file into the character array in blocks, the block standard is 100 string elements as a group, after all the string elements are read, the HMI program obtains the corresponding language string from the character array through the Getchar function and the global language variable when generating the page to complete the dynamic switching of multiple languages.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the multi-language dynamic switching method for an embedded device according to any one of claims 2 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for dynamic multi-language switching of an embedded device as described in any one of claims 2 to 8 are implemented.

Citation Information

Cited By

  • Multi-language package automatic generation method and system and computing equipment

    CN120523542A

  • Embedded device multi-language configuration method and system based on database

    CN120687176A

  • Database-based embedded device multilingual configuration method and system

    CN120687176B