CN111258702A - System and method for realizing multi-language text display processing in embedded equipment - Google Patents

System and method for realizing multi-language text display processing in embedded equipment Download PDF

Info

Publication number
CN111258702A
CN111258702A CN202010096006.9A CN202010096006A CN111258702A CN 111258702 A CN111258702 A CN 111258702A CN 202010096006 A CN202010096006 A CN 202010096006A CN 111258702 A CN111258702 A CN 111258702A
Authority
CN
China
Prior art keywords
management module
font
text
language
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010096006.9A
Other languages
Chinese (zh)
Inventor
曹晨光
刘金花
侯斐
朱鸣岐
段利泉
程杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Electronic Technology Co ltd
Original Assignee
Dongfeng Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Electronic Technology Co ltd filed Critical Dongfeng Electronic Technology Co ltd
Priority to CN202010096006.9A priority Critical patent/CN111258702A/en
Publication of CN111258702A publication Critical patent/CN111258702A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Abstract

The invention relates to a system for realizing multi-language text display processing in embedded equipment, which comprises a text management module, a text display module and a text display module, wherein the text management module is used for pre-storing character strings of different languages corresponding to fault codes; the language management module is used for processing the corresponding relation between the language and the font; the font management module is used for prestoring a font list and providing an interface for inquiring the font according to the font identification code; and the display management module is used for sequentially calling the module interfaces and converting the text into the whole image spliced by the character images. The invention also relates to a method for realizing multi-language text display in the embedded equipment. The system and the method for realizing the multilingual text display processing in the embedded equipment have the advantages of space and time consumption, can be convenient for integrating other modules, are fixed in array, can be automatically generated in advance by utilizing PC software, are very convenient for software development and requirement change, and have wider application range.

Description

System and method for realizing multi-language text display processing in embedded equipment
Technical Field
The invention relates to the technical field of computers, in particular to the field of embedded images, and specifically relates to a system and a method for realizing multilingual text display processing in embedded equipment.
Background
The embedded devices of the common display screen can display texts besides pictures, and can display texts in different languages according to localization requirements. With the increase of the size of the display screen of the embedded device and the complication of the display content, the method of simply taking the character bitmaps for splicing is low in efficiency and easy to make mistakes.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a system and a method for realizing multilingual text display processing in embedded equipment, which have high efficiency, low error rate and wider application range.
In order to achieve the above object, the system and method for implementing multilingual text display processing in an embedded device of the present invention are as follows:
the system for realizing the multi-language text display processing in the embedded equipment is mainly characterized by comprising the following steps:
the text management module is used for prestoring character strings of different languages corresponding to the fault codes and providing an interface for inquiring the character strings according to the fault codes and the languages;
the language management module is used for processing the corresponding relation between the language and the font and taking out the font from the font management module according to the currently set language;
the font management module is used for prestoring a font list and providing an interface for inquiring the font according to the font identification code;
and the display management module is connected with the text management module, the font management module and the language management module and used for sequentially calling module interfaces, converting the text into a whole image formed by splicing the character images and transmitting the whole image to the display equipment driver.
Preferably, the display management module includes:
the image loading unit is connected with the text management module, the font management module and the language management module and is used for searching character strings corresponding to the text one by one and loading corresponding character images;
and the image splicing unit is connected with the text management module, the font management module and the language management module and is used for splicing images according to the size of the display area.
Preferably, the text management module searches for the corresponding relationship between the language and the font through a binary search algorithm.
Preferably, the font list of the font management module includes character images, and the character images are arranged according to Unicode codes of corresponding characters.
The method for realizing the display processing of the multi-language text in the embedded equipment based on the system is mainly characterized by comprising the following steps:
(1) inquiring the label by utilizing a binary search method according to the label ID;
(2) extracting character strings corresponding to the labels according to the language;
(3) the language management module traverses the characters of the character string list according to requirements, and the font management module inquires character images corresponding to the characters;
(4) copying character image data to a video memory corresponding to the text display area according to the attribute of the character image;
(5) and calling a display driver to display the spliced content on the display screen.
The system and the method for realizing the multilingual text display processing in the embedded equipment have the advantages of space and time consumption, can be convenient for integrating other modules, are fixed in array, can be automatically generated in advance by utilizing PC software, are very convenient for software development and requirement change, and have wider application range.
Drawings
Fig. 1 is a block diagram illustrating a system for implementing a multilingual text display process in an embedded device according to the present invention.
FIG. 2 is a block diagram of a text management module of the system for implementing multilingual text display processing in an embedded device according to the present invention.
FIG. 3 is a diagram illustrating searching of character image data in the method for displaying multilingual text in an embedded device according to the present invention.
Detailed Description
In order to more clearly describe the technical contents of the present invention, the following further description is given in conjunction with specific embodiments.
The system for realizing the display processing of the multi-language text in the embedded equipment comprises the following steps:
the text management module is used for prestoring character strings of different languages corresponding to the fault codes and providing an interface for inquiring the character strings according to the fault codes and the languages;
the language management module is used for processing the corresponding relation between the language and the font and taking out the font from the font management module according to the currently set language;
the font management module is used for prestoring a font list and providing an interface for inquiring the font according to the font identification code;
and the display management module is connected with the text management module, the font management module and the language management module and used for sequentially calling module interfaces, converting the text into a whole image formed by splicing the character images and transmitting the whole image to the display equipment driver.
As a preferred embodiment of the present invention, the display management module includes:
the image loading unit is connected with the text management module, the font management module and the language management module and is used for searching character strings corresponding to the text one by one and loading corresponding character images;
and the image splicing unit is connected with the text management module, the font management module and the language management module and is used for splicing images according to the size of the display area.
As a preferred embodiment of the present invention, the text management module searches for a correspondence between a language and a font through a binary search algorithm.
As a preferred embodiment of the present invention, the font list of the font management module includes character images, and the character images are arranged according to Unicode codes of corresponding characters.
The method for realizing the multi-language text display processing in the embedded equipment based on the system comprises the following steps:
(1) inquiring the label by utilizing a binary search method according to the label ID;
(2) extracting character strings corresponding to the labels according to the language;
(3) the language management module traverses the characters of the character string list according to requirements, and the font management module inquires character images corresponding to the characters;
(4) copying character image data to a video memory corresponding to the text display area according to the attribute of the character image;
(5) and calling a display driver to display the spliced content on the display screen.
In the specific implementation manner of the invention, the invention provides a multilingual text display method in a universal embedded device, which can quickly process text information under the condition of occupying less resources and can be conveniently integrated with the existing embedded software. The structure of the system enables PC software to be used for automatically generating codes for text display, and the development speed of embedded software is accelerated. In the technical scheme, the label refers to a label, the label id index label identifier, the glyph refers to a character image, the glyphData refers to character image data, the glyphList refers to a character image list, and the Label manager is a label manager.
The invention overcomes the defects of the prior art and provides a method for displaying multi-language texts in a universal embedded device, which comprises the following steps:
the text management module prestores character strings corresponding to the text in different languages and provides an interface for inquiring the character strings according to the text and the languages;
the font management module prestores a font list and provides an interface for inquiring the font according to the font identification code;
the language management module is used for processing the corresponding relation between the language and the font and taking out the font from the font management module according to the currently set language;
and the display management module sequentially calls the interfaces of other modules, converts the text into character images and loads the character images, and the spliced whole image is put into a video memory and delivered to the display equipment for display.
The text management module maintains the correspondence between the text and the language. And a binary search algorithm is used when the corresponding relation is searched, so that the searching speed is increased, and the time requirement of the embedded equipment is met.
The font management module only reserves the minimum character set meeting the text display, and the storage space is reduced. And the character images in the font are arranged according to the Unicode code of the corresponding characters, so that the searching can be performed by using a binary algorithm, and the query speed is increased. Thereby meeting the requirements of the embedded device on storage space and time.
The language management module binds the language and the font, so that the localization of the product is very convenient.
And the display management module searches character strings corresponding to the text one by one, loads corresponding character images, and splices the images according to the size of the display area.
In the multilingual text display method in the universal embedded device, a text management module prestores a label list, and a schematic diagram of 1 label is shown in fig. 2 and defined as follows:
label1 ═ label id1, "engine Speed high", "engine Speed over high", … }
label2 ═ label id2, "revolution speed sensor failure", "rotation speed sensorfailure", … }
The number of the character strings in all the Label is the same and depends on the number of languages supported by the display system. The labelIds are arranged in ascending or descending order, and a binary search method can be used to increase the speed when searching for the label.
In the method for displaying the multi-language text in the universal embedded equipment, the font management module counts the minimum character set of each language from a label list of the text management module, and only pre-stores the image data glyhdata of the characters in the minimum character set. The font management module defines a glyph to describe a character:
glyph={glyphUnicode,size,offset,glyphData,…}
and a glyph list glyphsist.
In the multilingual text display method in the universal embedded device, the language management module maintains the corresponding relationship between the language and the glyphs and can return the corresponding glyphs according to the language.
In the method for displaying the multi-language text in the universal embedded equipment, the display management module executes the following steps to complete image splicing:
(1) the label was queried in the labelmmanager using a binary search according to labelId.
(2) And extracting the character string corresponding to the label according to the language.
(3) Find the glyphs list in the language management module, traverse the characters in the character string list according to the display requirements of the client, and find the glyphs corresponding to the characters in the font management module, as shown in fig. 3.
(4) And copying the glyphData into a display memory corresponding to the text display area according to the attribute of the glyph.
(5) And calling a display driver to display the spliced content on a display screen.
In addition, the method has the following characteristics:
(1) the labels in the text management module are arranged in ascending or descending order according to the labelId, so that the time overhead is reduced by applying a quick binary search method.
(2) The font management module prestores a minimum character set, and can play a good filtering role for large character set languages (such as Chinese and Japanese), so that the storage space and the search range are saved.
(3) The glyphs in the font management module are arranged in ascending order or descending order according to the glyphs Unicode, so that the time overhead is reduced by applying a quick binary search method.
(4) In addition to the need to update the Label text list in the display management module, other lists can be generated in advance using PC software.
A specific embodiment of the invention based on the application of displaying fault code text is as follows, this embodiment being implemented using standard C language.
The text management module defines the following data structure:
1. all character strings
uint16 s1 ═ {0x53D1,0x52a8,0x673A,0x8F6C,0x901F,0x9AD8,0x00}// engine speed high
uint16 s2={0x65,0x6E,0x67,0x69,0x65,0x20,0x53,0x70,0x65,0x65,0x64,0x20,0x6F,0x76,0x65,0x72,0x20,0x68,0x69,0x67,0x69,0x00}//engine Speed overhigh…,
Where all strings end at 0x00
2. All label arrays
label1={0x1FBE8,s1,s2};
label2={0x1FBE6,s5,s12}
label3={0x8110F,s13,s18}
…,
Where s1, s5, s13 … represent strings corresponding to language1, s2, s12, s18 … represent strings corresponding to language 2, and so on.
One character of the font management module corresponds to one glyph. The font is in bitmap format with a bit depth of 1. Dividing the font into different compiling units by taking the font as a unit, and defining the following data structure:
3. bitmap data of single character
font1_34[]={0x50,0x50,0x50}
font1_39[]={0x40,0x40,0x40}
The array of all characters under 2font is the font _ t structure:
struct font_t{uint16 unicode,uint16 size,sint16 offsetX,sint16offsetY,font1_34…}
the language management module can use switch-case hard coding to realize the correspondence between languages and fonts, namely finding a pointer to the font _ t structure through languageId.
The display management module is realized by the following scheme:
(1) matching Label;
traversing the Label array by using a binary search method, and searching the Label matched with the Label Id;
(2) matching bitmap corresponding to the Label;
finding out character strings str and font according to the corresponding relation of the language management module;
and for each character in the str, finding a corresponding glyph according to the font management module.
(3) Splicing bitmap;
and copying the bitmap to a corresponding video memory according to the relative position of label in a display interface and the information of size, offset and the like of the glyph.
(4) The merged image is delivered to a display driver.
The system fully considers the storage space, the memory space, the display memory space and the rendering time, can meet the space and time overhead of displaying a large amount of texts by the embedded equipment, can quickly update the text library, greatly reduces the development workload, and can be widely used for text display of the embedded equipment such as instruments, vehicle-mounted terminals, handheld diagnostic instruments and the like.
The system and the method for realizing the multilingual text display processing in the embedded equipment have the advantages of space and time consumption, can be convenient for integrating other modules, are fixed in array, can be automatically generated in advance by utilizing PC software, are very convenient for software development and requirement change, and have wider application range.
In this specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

Claims (5)

1. A system for implementing multilingual text display processing in an embedded device, said system comprising:
the text management module is used for prestoring character strings of different languages corresponding to the fault codes and providing an interface for inquiring the character strings according to the fault codes and the languages;
the language management module is used for processing the corresponding relation between the language and the font and taking out the font from the font management module according to the currently set language;
the font management module is used for prestoring a font list and providing an interface for inquiring the font according to the font identification code;
and the display management module is connected with the text management module, the font management module and the language management module and used for sequentially calling module interfaces, converting the text into a whole image formed by splicing the character images and transmitting the whole image to the display equipment driver.
2. The system of claim 1, wherein the display management module comprises:
the image loading unit is connected with the text management module, the font management module and the language management module and is used for searching character strings corresponding to the text one by one and loading corresponding character images;
and the image splicing unit is connected with the text management module, the font management module and the language management module and is used for splicing images according to the size of the display area.
3. The system of claim 1, wherein the text management module searches for the correspondence between languages and fonts by a binary search algorithm.
4. The system of claim 1, wherein the font list of the font management module comprises character images arranged in Unicode codes corresponding to the characters.
5. A method for implementing multilingual text-display processing in an embedded device based on the system of claim 1, comprising the steps of:
(1) inquiring the label by utilizing a binary search method according to the label ID;
(2) extracting character strings corresponding to the labels according to the language;
(3) the language management module traverses the characters of the character string list according to requirements, and the font management module inquires character images corresponding to the characters;
(4) copying character image data to a video memory corresponding to the text display area according to the attribute of the character image;
(5) and calling a display driver to display the spliced content on the display screen.
CN202010096006.9A 2020-02-17 2020-02-17 System and method for realizing multi-language text display processing in embedded equipment Pending CN111258702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010096006.9A CN111258702A (en) 2020-02-17 2020-02-17 System and method for realizing multi-language text display processing in embedded equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010096006.9A CN111258702A (en) 2020-02-17 2020-02-17 System and method for realizing multi-language text display processing in embedded equipment

Publications (1)

Publication Number Publication Date
CN111258702A true CN111258702A (en) 2020-06-09

Family

ID=70945579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010096006.9A Pending CN111258702A (en) 2020-02-17 2020-02-17 System and method for realizing multi-language text display processing in embedded equipment

Country Status (1)

Country Link
CN (1) CN111258702A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093443A (en) * 2006-06-22 2007-12-26 上海新纳广告传媒有限公司 Dynamic switching method for multilanguage of system based on Flash representation layer
CN101876907A (en) * 2010-05-18 2010-11-03 杭州海康威视数字技术股份有限公司 Multi-language implementation method and device of human-computer interaction interface
CN102289358A (en) * 2010-06-15 2011-12-21 埃森哲环球服务有限公司 A computer-implemented method, a computer program product and an embedded system for displaying data more efficiently
CN102981501A (en) * 2012-11-30 2013-03-20 重庆邮电大学 Automobile ECU (Electronic Control Unit) fault diagnosis information matching method based on XML (Extensive Makeup Language)
CN103914443A (en) * 2013-01-09 2014-07-09 北大方正集团有限公司 Mixed typesetting method and device for plurilingual characters
CN104503954A (en) * 2014-12-11 2015-04-08 康佳集团股份有限公司 Text combination display method and text combination display system
US20170004331A1 (en) * 2015-07-01 2017-01-05 Practice Fusion, Inc. Sanitization of content displayed by web-based applications
CN107220225A (en) * 2016-06-17 2017-09-29 林德(中国)叉车有限公司 Multilingual instrument and the built-in character library generation for multilingual instrument and display mode
CN109194969A (en) * 2018-11-22 2019-01-11 成都驰通数码系统有限公司 A kind of digital television information dissemination method and system
CN109933751A (en) * 2019-03-20 2019-06-25 腾讯科技(深圳)有限公司 Graphic rendering method, apparatus, computer readable storage medium and computer equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093443A (en) * 2006-06-22 2007-12-26 上海新纳广告传媒有限公司 Dynamic switching method for multilanguage of system based on Flash representation layer
CN101876907A (en) * 2010-05-18 2010-11-03 杭州海康威视数字技术股份有限公司 Multi-language implementation method and device of human-computer interaction interface
CN102289358A (en) * 2010-06-15 2011-12-21 埃森哲环球服务有限公司 A computer-implemented method, a computer program product and an embedded system for displaying data more efficiently
CN102981501A (en) * 2012-11-30 2013-03-20 重庆邮电大学 Automobile ECU (Electronic Control Unit) fault diagnosis information matching method based on XML (Extensive Makeup Language)
CN103914443A (en) * 2013-01-09 2014-07-09 北大方正集团有限公司 Mixed typesetting method and device for plurilingual characters
CN104503954A (en) * 2014-12-11 2015-04-08 康佳集团股份有限公司 Text combination display method and text combination display system
US20170004331A1 (en) * 2015-07-01 2017-01-05 Practice Fusion, Inc. Sanitization of content displayed by web-based applications
CN107220225A (en) * 2016-06-17 2017-09-29 林德(中国)叉车有限公司 Multilingual instrument and the built-in character library generation for multilingual instrument and display mode
CN109194969A (en) * 2018-11-22 2019-01-11 成都驰通数码系统有限公司 A kind of digital television information dissemination method and system
CN109933751A (en) * 2019-03-20 2019-06-25 腾讯科技(深圳)有限公司 Graphic rendering method, apparatus, computer readable storage medium and computer equipment

Similar Documents

Publication Publication Date Title
US6718519B1 (en) System and method for outputting character sets in best available fonts
US7363582B2 (en) System and method of retrieving and presenting partial (skipped) document content
CN109474847B (en) Search method, device and equipment based on video barrage content and storage medium
US9129421B2 (en) System and method for displaying complex scripts with a cloud computing architecture
US7561742B2 (en) Apparatus and methods for converting raster illustrated parts images into intelligent vector-layered files
KR20010040685A (en) Information storage and retrieval system for storing and retrieving the visual form of information from an application in a database
US20040205671A1 (en) Natural-language processing system
US20200011694A1 (en) Navigation method, navigation device, device and medium
EP1665086A1 (en) Improving accuracy in searching digital ink
JPH11328076A (en) Method and system for accessing internet
US20220284218A1 (en) Video classification method, electronic device and storage medium
WO2022105005A1 (en) Smart classroom information exchange method, apparatus, and electronic device
CN111459977B (en) Conversion of natural language queries
CN110377884A (en) Document analytic method, device, computer equipment and storage medium
US7418141B2 (en) Method, apparatus, and computer-readable medium for identifying character coordinates
JP7140913B2 (en) Video distribution statute of limitations determination method and device
US11157730B2 (en) Determining experiments represented by images in documents
CN102567358A (en) Navigation content display method and navigation content display device
CN107526742B (en) Method and apparatus for processing multilingual text
US7031002B1 (en) System and method for using character set matching to enhance print quality
CN111258702A (en) System and method for realizing multi-language text display processing in embedded equipment
CN110765341B (en) Searching method and device
CN102572080A (en) Method for displaying complex characters on terminal
CN114880520B (en) Video title generation method, device, electronic equipment and medium
CN115496057A (en) Product technical data management method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination