A display frame and a method for supporting Chinese character input of the display frame

By adding Chinese character input function under the LVGL framework, using the detection module and Chinese character processing module to find Chinese characters corresponding to pinyin characters from the Json object link list, the problem that the LVGL framework only supports English character input is solved, and the operation of Chinese users has been improved Experience.

CN115373526BActive Publication Date: 2024-12-31BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211061057.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2024-12-31
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

The existing LVGL framework only supports English character input, which leads to Chinese users encountering difficulties in information reading, information search and information interaction, and reduces the operation experience.

Method used

Add Chinese character input function under the LVGL framework, obtain key input characters through the detection module, and use the Chinese character processing module to find matching Json objects from the preset Json object link list, and realize Chinese characters based on the correspondence between pinyin characters and Chinese characters. Input and output.

Benefits of technology

It greatly facilitates Chinese users' operations in information reading, information search and information interaction, and improves Chinese users' operating experience with smart devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115373526B_ABST
    Figure CN115373526B_ABST
Patent Text Reader

Abstract

The present application discloses a display framework and a method for supporting Chinese character input in the display framework, which relates to the technical field of embedded intelligent devices, meets the needs of Chinese character input under the LVGL framework, and improves the operation experience of Chinese users on intelligent devices. The display framework provided by the present application includes: a detection module for detecting key events to obtain key input characters; a Chinese character processing module for searching a Json object matching the key input character from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object; a Chinese character output module for determining the corresponding output target Chinese character from at least one Chinese character corresponding to the key input character in response to a click selection operation. The present application is used to implement output display of Chinese characters under the LVGL framework.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of embedded intelligent devices, and in particular to a display framework and a method for supporting Chinese character input by the display framework. Background Art

[0002] Embedded smart devices such as smartphones, smart wearable devices, smart home devices, etc., which are used by people in daily life, often have Chinese character input and display requirements. When developing the graphical user interface (GUI) of embedded smart devices, the GUI development solutions currently used are mainly divided into the following two types:

[0003] One is that for high-end smart devices, the Android system is usually used to support the GUI interface to input Chinese characters; the other is that for some low-end smart devices, such as smart watches, smart bracelets, smart glasses and other micro embedded devices, the MiniGUI system is generally used to support the GUI interface to input Chinese characters. Although the MiniGUI system occupies a small space and has low energy consumption, its functions are outdated and the picture quality is not very good.

[0004] At present, in order to deal with the above defects in the GUI development solutions used on low-end smart devices, the Light and Versatile Graphics Library (LVGL) can be used as an alternative solution. As an open source lightweight display framework, LVGL not only has the characteristics of low memory usage and low energy consumption, but also has rich graphic elements, which can achieve more exquisite visual effects.

[0005] However, since the current LVGL framework still only supports the input of English characters and implements the corresponding display of English characters, it will increase the difficulty for Chinese users in many operations such as information reading, information search and information interaction, which greatly reduces the operating experience of Chinese users. Summary of the invention

[0006] In view of this, the present application provides a display framework and a method for supporting Chinese character input in the display framework. The main purpose is to meet the input needs of Chinese characters under the LVGL framework by adding the function of inputting Chinese characters in pinyin mode under the LVGL framework, thereby greatly facilitating Chinese users in information reading, information search, information interaction and other operations, and improving the operating experience of Chinese users on smart devices.

[0007] The entire implementation process of outputting Chinese character display results is simplified accordingly, greatly improving the user operation experience.

[0008] In order to achieve the above objectives, this application mainly provides the following technical solutions:

[0009] In a first aspect, the present application provides a display framework, the display framework comprising: a detection module, a Chinese character processing module and a Chinese character output module, the Chinese character processing module is connected to the detection module, the Chinese character output module is connected to the Chinese character processing module;

[0010] The detection module is used to detect key events to obtain key input characters;

[0011] The Chinese character processing module is used to search for a Json object matching the key input character from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object;

[0012] The Chinese character output module is used to determine a corresponding output target Chinese character from at least one Chinese character corresponding to the key input character in response to a click selection operation.

[0013] In some modified implementations of the first aspect of the present application, the display framework further includes: a Json file configuration module, a Json object construction module and a Json object linked list construction module, the Json file configuration module is connected to the Json object construction module, and the Json object construction module is connected to the Json object linked list construction module;

[0014] The Json file configuration module is used to pre-configure a file containing a Json string array, wherein the Json string array is composed of multiple Json strings, each of which contains a correspondence between a preset pinyin character and a preset Chinese character;

[0015] The Json object construction module is used to construct a corresponding Json object based on the Json string, and the object information corresponding to the Json object includes the preset pinyin character and the preset Chinese character corresponding to the preset pinyin character;

[0016] The Json object linked list construction module constructs a corresponding preset Json object linked list based on a plurality of the Json objects.

[0017] In some modified implementations of the first aspect of the present application, the Json file configuration module includes: a first configuration submodule, a second configuration submodule and a composition submodule, and the composition submodule is connected to the first configuration submodule and the second configuration submodule respectively;

[0018] The first configuration submodule is used to configure a first preset Chinese character corresponding to a single preset pinyin character, and obtain a first Json string containing a correspondence between the single preset pinyin character and the first preset Chinese character;

[0019] The second configuration submodule is used to configure a second preset Chinese character corresponding to a pinyin string composed of a plurality of the preset pinyin characters, and obtain a second Json string containing a correspondence between the pinyin string and the second preset Chinese character;

[0020] The composition submodule is used to compose a corresponding Json string array based on the first Json string and / or the second Json string, and obtain a file containing the Json string array.

[0021] In some modified implementations of the first aspect of the present application, the Chinese character processing module includes: a character conversion submodule, a search submodule and a determination submodule, the character conversion submodule is connected to the search submodule, and the search submodule is connected to the determination submodule;

[0022] The character conversion submodule is used to obtain at least one target pinyin character corresponding to the key input character by performing pinyin character conversion processing on the key input character;

[0023] The search submodule is used to traverse the preset pinyin characters and preset Chinese characters stored in each of the Json objects in the preset Json object linked list, find out whether there is a target preset pinyin character matching the target pinyin character, and obtain the target preset Chinese character corresponding to the target preset pinyin character;

[0024] The determination submodule uses the target preset Chinese character as the Chinese character corresponding to the key input character.

[0025] In some modified implementations of the first aspect of the present application, the display framework further includes: a keyboard object configuration module, a panel object configuration module and an event configuration module, and the event configuration module is connected to the keyboard object configuration module and the panel object configuration module respectively;

[0026] The keyboard object configuration module is used to create a keyboard object and configure a corresponding text display area;

[0027] The panel object configuration module is used to create a panel object and configure the corresponding panel display area;

[0028] The event configuration module is used to add a callback event to the keyboard object, and the callback event is used to obtain object information corresponding to the keyboard object and transmit it to the text display area and the panel display area.

[0029] In some modified implementations of the first aspect of the present application,

[0030] The detection module is also specifically used to: detect a key event to capture a key input character corresponding to the key event based on the keyboard object;

[0031] The display framework also includes: an event calling module, which is connected to the event configuration module and is used to transfer the key input characters corresponding to the key event to the text display area and the panel display area by triggering the callback event corresponding to the keyboard object after capturing the key input characters corresponding to the key event.

[0032] In some modified implementations of the first aspect of the present application, the Chinese character output module includes: a text display submodule, a panel display submodule, a determination submodule, a replacement submodule and an output submodule, the determination submodule is connected to the panel display submodule, the replacement submodule is respectively connected to the text display submodule and the panel display submodule, and the output submodule is connected to the text display submodule;

[0033] The text display submodule is used to display the key input characters in the text display area;

[0034] The panel display submodule is used for displaying at least one Chinese character corresponding to the key input character in the panel display area based on the key input character received in the panel display area, wherein the attribute of the Chinese character is set to be clickable in the panel object;

[0035] The determination submodule is used to determine the corresponding selected Chinese character in the at least one Chinese character displayed in the panel display area in response to the click operation;

[0036] The replacement submodule is used to delete the key input characters in the text display area and replace them with the selected Chinese characters;

[0037] The output submodule is used to output the target Chinese character corresponding to the key input character according to the selected Chinese character filled in by the replacement.

[0038] A second aspect of the present application provides a method for supporting Chinese character input in a display frame, the method comprising:

[0039] Detect key events to get key input characters;

[0040] Searching a Json object matching the key input character from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object;

[0041] In response to the click selection operation, a corresponding output target Chinese character is determined from at least one Chinese character corresponding to the key input character.

[0042] In some modified implementations of the second aspect of the present application, the method further includes:

[0043] Pre-configure a file containing a Json string array, wherein the Json string array is composed of multiple Json strings, and each Json string contains a correspondence between a preset pinyin character and a preset Chinese character;

[0044] Based on the Json string, a corresponding Json object is constructed, wherein the object information corresponding to the Json object includes the preset pinyin character and the preset Chinese character corresponding to the preset pinyin character;

[0045] A corresponding preset Json object linked list is constructed based on the multiple Json objects.

[0046] In some modified implementations of the second aspect of the present application, the pre-configured file containing the Json string array includes:

[0047] Configure a first preset Chinese character corresponding to a single preset pinyin character, and obtain a first JSON string containing a correspondence between the single preset pinyin character and the first preset Chinese character; and / or

[0048] Configure a second preset Chinese character corresponding to a pinyin string composed of a plurality of the preset pinyin characters, and obtain a second JSON string containing a correspondence between the pinyin string and the second preset Chinese character;

[0049] Based on the first Json string and / or the second Json string forming a corresponding Json string array, a file including the Json string array is obtained.

[0050] In some modified implementations of the second aspect of the present application, searching a Json object matching the key input character from a preset Json object linked list to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object includes:

[0051] By performing pinyin character conversion processing on the key input character, at least one target pinyin character corresponding to the key input character is obtained;

[0052] Traversing the preset pinyin characters and preset Chinese characters stored in each of the Json objects in the preset Json object linked list, searching whether there is a target preset pinyin character matching the target pinyin character, and obtaining the target preset Chinese character corresponding to the target preset pinyin character;

[0053] The target preset Chinese character is used as the Chinese character corresponding to the key input character.

[0054] In some modified implementations of the second aspect of the present application, the method further includes:

[0055] Create a keyboard object and configure the corresponding text display area;

[0056] Create a panel object and configure the corresponding panel display area;

[0057] A callback event is added to the keyboard object, where the callback event is used to obtain object information corresponding to the keyboard object and transmit the object information to the text display area and the panel display area.

[0058] In some modified implementations of the second aspect of the present application,

[0059] The detecting key events to obtain key input characters includes: detecting key events to capture key input characters corresponding to the key events based on the keyboard object;

[0060] After acquiring key input characters according to detecting key events, the method further comprises: transmitting the key input characters to the text display area and the panel display area by triggering a callback event corresponding to the keyboard object.

[0061] In some modified implementations of the second aspect of the present application, in response to the click selection operation, determining a corresponding output target Chinese character from at least one Chinese character corresponding to the key input character includes:

[0062] Determining the key input characters displayed in the text display area;

[0063] Determine at least one Chinese character corresponding to the key input character displayed in the panel display area, wherein the attribute of the Chinese character is set to be clickable in the panel object;

[0064] In response to the click operation, determining a corresponding selected Chinese character in at least one Chinese character displayed in the panel display area;

[0065] Deleting the key input characters in the text display area and replacing them with the selected Chinese characters;

[0066] According to the selected Chinese character filled in by the replacement, the target Chinese character corresponding to the key input character is output.

[0067] According to a third aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for supporting Chinese character input in the display framework as described above is implemented.

[0068] In a fourth aspect, the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for supporting Chinese character input in the display framework as described above is implemented.

[0069] A fifth aspect of the present application provides a computer program product, including: computer program instructions, which, when executed, implement the method for supporting Chinese character input in the display framework as described above.

[0070] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0071] The present application provides a display framework and a method for supporting Chinese character input in the display framework. The display framework of the present application includes: a detection module, a Chinese character processing module and a Chinese character output module. The present application first uses the detection module to detect key events to obtain key input characters, and then uses the Chinese character processing module to search for a Json object that matches the key input character from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object, and finally uses the Chinese character output module to respond to a click selection operation, and determines the corresponding output target Chinese character from the at least one Chinese character corresponding to the key input character, thereby realizing the operation of inputting Chinese characters in pinyin mode based on the three newly added modules under the LVGL framework.

[0072] Compared with the existing technology, the technical problem of increasing the operating difficulty for Chinese users due to the fact that the LVGL framework only supports English character input and display is solved. This application adds the function of inputting Chinese characters in pinyin mode under the LVGL framework to meet the input needs of Chinese characters under the LVGL framework, thereby greatly facilitating Chinese users' operations in information reading, information search, information interaction and other aspects, and improving the operating experience of Chinese users on smart devices.

[0073] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0075] Figure 1 A block diagram of a display framework provided in an embodiment of the present application;

[0076] Figure 2 A block diagram of another display framework provided in an embodiment of the present application;

[0077] Figure 3 A flow chart of a method for supporting Chinese character input in a display framework provided in an embodiment of the present application;

[0078] Figure 4 A flow chart of a method for supporting Chinese character input in another display framework provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0080] The present application embodiment provides a display framework, such as Figure 1 As shown, the display framework includes: a detection module 1, a Chinese character processing module 2 and a Chinese character output module 3; the Chinese character processing module 2 is connected to the detection module 1, and the Chinese character output module 3 is connected to the Chinese character processing module 2. In the following, the working principles of these three modules in the display framework are explained as follows:

[0081] The detection module 1 is used to detect key events to obtain key input characters.

[0082] Among them, the key event is actually an event for obtaining the input keyboard characters, and the specific implementation form of this event can be but is not limited to: various forms such as a finger tapping a character on the keyboard, manipulating a mouse to click a character on a virtual keyboard, using voice control to click a character on a virtual keyboard, etc.

[0083] The embodiment of this application is an improvement under the LVGL framework to obtain a display framework capable of outputting Chinese characters. Under this display framework, when it is detected that a key event occurs, the key input character corresponding to the key event actually obtained is an English character, and the English character can be one or more. For example, the English characters "a" or "ni".

[0084] The Chinese character processing module 2 is used to find a Json object that matches the key input character from the pre-set linked list of Json objects, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the pre-stored preset pinyin characters and preset Chinese characters in the Json object.

[0085] In the embodiment of this application, a linked list of Json objects is pre-configured. This linked list of Json objects contains multiple preset Json objects, and each preset Json object stores a preset pinyin character and at least one preset Chinese character corresponding to it.

[0086] Example 1: Configure a Json object to store the preset pinyin character "a" and its corresponding Chinese characters such as "啊、阿".

[0087] Example 2: Configure a Json object to store the preset pinyin character "xianshi" and its corresponding preset Chinese characters, such as "显示、现实、限时", etc.

[0088] It should be noted that the key input character is an English character, and there are 26 letter characters in English characters. In fact, pinyin characters are also composed of these letter characters in writing. Therefore, according to the Chinese pinyin rules, there can be a conversion relationship between English characters and pinyin characters.

[0089] Example 3: Take the English character "xianshi" as an example. According to the Chinese pinyin rules, its corresponding pinyin character is also "xianshi".

[0090] Example 4: Take the English characters "xs" as an example. According to the Chinese pinyin rules, it can be converted into corresponding pinyin characters, but not limited to: "xianshi", "xiangshu" and other diverse pinyin characters. For this example, the way of converting into pinyin characters is an efficient way to obtain diverse pinyin characters based on fewer English characters, and can also be used as a fault tolerance mechanism for key input characters. For example, due to typing errors, only two English characters are input, and the display framework will automatically push pinyin characters composed of similar characters based on the Chinese pinyin rules.

[0091] In the embodiments of the present application, a conversion mechanism between English characters and pinyin characters can be pre-constructed, so that based on the English characters included in the key input characters, the corresponding pinyin characters can be obtained, which is convenient for further using the pinyin characters obtained by corresponding conversion of the key input characters to search for each preset Json object in the preset Json object linked list. The purpose is to obtain at least one Chinese character corresponding to the key input characters based on the corresponding relationship between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object.

[0092] Example 5: Take the key input character "a" as an example. Its converted pinyin character is also "a". Then search for the preset Json object in the preset Json object linked list that contains "a", and obtain the preset pinyin character "a" and its corresponding Chinese characters such as "啊、阿" etc. stored in the preset Json object, and then obtain multiple Chinese characters corresponding to the key input character "a".

[0093] Example 6: Take the key input character "xs" as an example. Different from Example 5 above, its converted pinyin characters are diverse. Then search for each preset Json object in the preset Json object linked list based on each converted pinyin character, obtain the preset Json object corresponding to each converted pinyin character, and based on each matched preset Json object, more Chinese characters can be obtained therefrom.

[0094] It should be noted that in order for the user to obtain the real Chinese characters they want, when configuring each preset Json object in the preset Json linked list, the corresponding relationship between all pinyin character representations and Chinese characters should be configured as much as possible.

[0095] And the preferred implementation mode, for the conversion process between English characters and pinyin characters, the conversion rules between English characters and pinyin characters can also be enriched, so that the English character conversion can obtain more comprehensive and diverse pinyin characters. For example, for a pinyin character conversion result, the corresponding English characters are such as "xs", "xians", etc., so the conversion amount of supported English characters is also very large. Thereby, the display framework provided in the embodiment of the present application can support more diverse key input characters to obtain corresponding Chinese character display results.

[0096] The Chinese character output module 3 is used to determine a corresponding output target Chinese character from at least one Chinese character corresponding to the key input character in response to a click selection operation.

[0097] In an embodiment of the present application, based on searching the preset Json object linked list, the Chinese characters corresponding to the key input characters finally obtained are diverse and huge in number. The embodiment of the present application will display these Chinese characters through a graphical user interface (such as a panel display area). There is no limitation on how to effectively display these Chinese characters.

[0098] Based on the user's selection from these Chinese characters, the Chinese character actually desired by the user is obtained, thereby determining the Chinese character input corresponding to the key event, which is actually the Chinese character display result obtained in response to the key event.

[0099] As mentioned above, the embodiment of the present application provides a display framework, including: a detection module, a Chinese character processing module and a Chinese character output module. Based on these three newly added modules under the LVGL framework, the operation of inputting Chinese characters in pinyin is realized. Compared with the prior art, the technical problem of increasing the difficulty of operation for Chinese users due to the LVGL framework only supporting English character input and display is solved. The present application adds the function of inputting Chinese characters in pinyin under the LVGL framework to meet the input requirements of Chinese characters under the LVGL framework, thereby greatly facilitating Chinese users' operations in information reading, information search, information interaction and other aspects, and improving the operation experience of Chinese users on smart devices.

[0100] In some modified embodiments, the present application also provides another display framework, such as Figure 2 As shown, the display framework includes, in addition to the detection module 1, the Chinese character processing module 2 and the Chinese character output module 3, further includes other modules and submodules. Specifically, the detailed explanation is as follows:

[0101] like Figure 2As shown in the figure, the display framework provided by the embodiment of the present application further includes: a Json file configuration module 4, a Json object construction module 5, and a Json object linked list construction module 6. The Json file configuration module 4 is connected to the Json object construction module 5, and the Json object construction module 5 is connected to the Json object linked list construction module 6. In the embodiment of the present application, these three modules are used to construct a corresponding preset Json object linked list for subsequent use of the preset Json object linked list to assist in obtaining at least one Chinese character corresponding to the key input character. The working principles of these three modules in the embodiment of the present application are explained as follows:

[0102] The Json file configuration module 4 is used to pre-configure a file containing a Json string array. The Json string array is composed of multiple Json strings, and each Json string contains the correspondence between a preset pinyin character and a preset Chinese character.

[0103] Further, as Figure 2 shown in the figure, the Json file configuration module 4 can be further divided into: a first configuration sub-module 41, a second configuration sub-module 42, and a composition sub-module 43. The composition sub-module 43 is respectively connected to the first configuration sub-module 41 and the second configuration sub-module 42; the first configuration sub-module 41 is used to configure a first preset Chinese character corresponding to a single preset pinyin character to obtain a first Json string containing the correspondence between the single preset pinyin character and the first preset Chinese character; the second configuration sub-module 42 is used to configure a second preset Chinese character corresponding to a pinyin string composed of multiple preset pinyin characters to obtain a second Json string containing the correspondence between the pinyin string and the second preset Chinese character; the composition sub-module 43 is used to form a corresponding Json string array based on the first Json string and / or the second Json string to obtain a file containing the Json string array.

[0104] In the embodiment of the present application, the configured Json strings can be divided into two styles, including: one style is to configure a first preset Chinese character corresponding to a single preset pinyin character to obtain a first Json string containing the correspondence between the single preset pinyin character and the first preset Chinese character, such as "a": ["啊", "阿"]; the other style is to configure a second preset Chinese character corresponding to a pinyin string composed of multiple preset pinyin characters to obtain a second Json string containing the correspondence between the pinyin string and the second preset Chinese character. Here, in order to distinguish the Json strings obtained in different styles, the embodiment of the present application uses "first" and "second" for reference.

[0105] For this other style, according to the Chinese pinyin rules, multiple preset pinyin characters can form compound vowels, such as "ai", "ou", etc. In this case, the preset Chinese characters corresponding to the compound vowels are actually single characters, such as "ai": ["埃", "挨"]; but if multiple preset pinyin characters are composed of multiple initials, or an initial plus a final, or multiple finals (i.e., non-compound vowels), then the pinyin string composed of such multiple preset characters is actually used to express a phrase. Therefore, the preset Chinese characters corresponding to the configuration should be composed of multiple characters, such as "xianshi": ["显示", "形式"].

[0106] Moreover, it should be noted that the above are only exemplary examples of the embodiments of the present application. In order to facilitate obtaining the Chinese characters that the user actually wants based on the preset Json object linked list, the embodiments of the present application should construct more preset pinyin characters, and when configuring the preset Chinese characters corresponding to the preset pinyin characters, as diverse and comprehensive Chinese characters as possible should be configured.

[0107] After obtaining the first Json string and / or the second Json string, sort them according to the preset rules to form a corresponding Json string array, and obtain a file containing the Json string array. In a preferred embodiment, the preset rule can be, but is not limited to, sorting the Json strings constructed based on the preset pinyin characters according to the sorting of the first character in the preset pinyin characters in the Chinese pinyin alphabet to obtain the corresponding array, and thus a file containing the Json string array is formed based on such an array.

[0108] The Json object construction module 5 is used to construct a corresponding Json object based on the Json string. The object information corresponding to the Json object includes the preset pinyin characters and the preset Chinese characters corresponding to the preset pinyin characters.

[0109] The preset Json object linked list construction module 6 constructs a corresponding preset Json object linked list based on multiple Json objects.

[0110] In the embodiments of the present application, the object information corresponding to the Json object includes the preset pinyin characters and the preset Chinese characters corresponding to the preset pinyin characters. Accordingly, in fact, each Json object actually corresponds to a Json string.

[0111] As Figure 2 shown, in the display framework provided by the embodiments of the present application, the Chinese character processing module 2 can be further divided into: a character conversion sub-module 21, a search sub-module 22, and a determination sub-module 23. The character conversion sub-module 21 is connected to the search sub-module 22, and the search sub-module 22 is connected to the determination sub-module 23. Specifically, the working principles of these three sub-modules are explained as follows:

[0112] The character conversion submodule 121 is used to obtain at least one target pinyin character corresponding to the key input character by performing pinyin character conversion processing on the key input character.

[0113] In the embodiment of the present application, for the key input character corresponding to the key event, it is necessary to first perform a conversion operation from English characters to Pinyin characters based on the Chinese Pinyin rules. For example, if the key input character is "xs", a variety of target Pinyin characters are obtained through Pinyin character conversion processing, such as "xianshi", "xiangshu", "xingshi", etc.

[0114] The search submodule 22 is used to traverse the preset pinyin characters and preset Chinese characters stored in each Json object in the preset Json object list, find out whether there is a target preset pinyin character matching the target pinyin character, and obtain the target preset Chinese character corresponding to the target preset pinyin character.

[0115] For example, for the target pinyin characters "xianshi", "xiangshu" and "xingshi", the preset Json object containing "xianshi", the preset Json object containing "xiangshu" and the preset Json object containing "xingshi" are found from the preset Json object list accordingly.

[0116] The determination submodule 23 uses the target preset Chinese character as the Chinese character corresponding to the key input character.

[0117] Further, exemplarily, based on the three preset Json objects found, the preset Chinese characters contained in each preset Json object are further found as the target preset Chinese characters, that is, the Chinese characters corresponding to the key input characters (English characters) are obtained.

[0118] like Figure 2 As shown, the display framework provided by the embodiment of the present application also includes: a keyboard object configuration module 7, a panel object configuration module 8 and an event configuration module 9, and the event configuration module 9 is connected to the keyboard object configuration module 7 and the panel object configuration module 8 respectively. The working principles of these three modules are explained as follows:

[0119] The keyboard object configuration module 7 is used to create a keyboard object and configure the corresponding text display area.

[0120] In the embodiment of the present application, a keyboard object can be created based on the Keyboard component in the display framework, and the keyboard object is actually used to capture the key input characters corresponding to the key events. The text display area corresponding to the keyboard object is used to display the key input characters to the user in a visual manner, and then further display the Chinese characters corresponding to the key input characters in a visual manner.

[0121] The panel object configuration module 8 is used to create a panel object and configure the corresponding panel display area.

[0122] The event configuration module 9 is used to add a callback event to the keyboard object. The callback event is used to obtain the object information corresponding to the keyboard object and transmit it to the text display area and the panel display area.

[0123] In an embodiment of the present application, the keyboard object and the panel object are in a corresponding binding relationship. Based on the callback event, the text display area and the panel display area will simultaneously know what the key input character is, and the subsequent panel display area will further display at least one Chinese character corresponding to the key input character.

[0124] It should be noted that the panel display area corresponding to the panel object can output the Chinese characters corresponding to the key input characters in the input field, and these Chinese characters are visually displayed in the form of Label components, that is, the properties are set to be clickable, so that the user can select the actual Chinese characters they want from the panel display area by clicking.

[0125] like Figure 2 As shown, based on the keyboard object configured by the keyboard object configuration module 8, the detection module 1 is further specifically used to: detect key events, so as to capture key input characters corresponding to the key events based on the keyboard object.

[0126] The display framework provided by the embodiment of the present application also includes: an event calling module 10, which is connected to the event configuration module 9 and is used to transfer the key input characters corresponding to the key event to the text display area and the panel display area by triggering the callback event corresponding to the keyboard object after capturing the key input characters corresponding to the key event.

[0127] like Figure 2 As shown, in the display framework provided in the embodiment of the present application, the Chinese character output module 3 can be further divided into: a text display submodule 31, a panel display submodule 32, a determination submodule 33, a replacement submodule 34 and an output submodule 35; the determination submodule 33 is connected to the panel display submodule 32, the replacement submodule 34 is respectively connected to the text display submodule 31 and the panel display submodule 32, and the output submodule 35 is connected to the text display submodule 31. Specifically, the working principles of these five submodules are explained as follows:

[0128] A text display sub-module 31 for displaying key input characters in a text display area.

[0129] In an embodiment of the present application, after capturing the key input characters corresponding to a key event based on a keyboard object, based on the callback event corresponding to the keyboard object, the key input characters are passed to the text display area corresponding to the keyboard object, so that the text display area visually displays the key input characters.

[0130] A panel display sub-module 32 for displaying at least one Chinese character corresponding to the key input characters in a panel display area based on the key input characters received by the panel display area, wherein the attributes of the Chinese characters are set to be clickable in a panel object.

[0131] In an embodiment of the present application, based on the callback event corresponding to the keyboard object, the key input characters corresponding to the key event captured by the keyboard object are also passed to the panel display area corresponding to the panel object, and after the panel display area receives the passed key input characters, a Json object matching the key input characters is searched from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input characters based on the corresponding relationship between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object. Accordingly, the panel display area will display at least one Chinese character corresponding to the key input characters. And the attributes of these Chinese characters are set to be clickable in the panel object. For example, they are visually displayed in the form of a Label component, that is, the attribute is set to be clickable.

[0132] Exemplarily, for example, if the key input character is "ai", based on the preset Json object linked list, the Chinese characters matching the "ai" are obtained, such as "唉", "爱", "挨", "矮", etc. These Chinese characters will be visually displayed in the panel display area in the form of a Label component, so that each Chinese character is clickable and selectable. Thus, when the user clicks on a Chinese character, it indicates that the user actually wants this Chinese character.

[0133] A determination sub-module 33 for determining the selected Chinese character corresponding to at least one Chinese character displayed in the panel display area in response to a click operation.

[0134] A replacement sub-module 34 for deleting the key input characters in the text display area and replacing them with the selected Chinese characters.

[0135] An output sub-module 35 for outputting the target Chinese character corresponding to the key input characters according to the selected Chinese characters filled in by replacement.

[0136] In the embodiment of the present application, illustratively, in the graphical user interface of the display frame, the text display area may be a text box, and the position corresponding to the key input character may be the "cursor display" position. Based on the Chinese character selected by the user from the panel display area, the selected Chinese character is replaced to the "cursor display" position, thereby replacing the key input character originally at the "cursor display" position, so that the selected Chinese character actually becomes the Chinese character input corresponding to the key event.

[0137] It should be noted that the embodiment of the present application adds a Chinese character processing function under the LVGL framework to obtain an improved display framework, and its purpose is also to support the input of Chinese characters in micro-intelligent devices. Since the size of the character display area of ​​the micro-intelligent device is relatively small, then if the number of Chinese characters corresponding to the key input characters in the panel display area is relatively large, the following preferred implementation method can be used to display Chinese characters in the panel display area:

[0138] For example, the panel display area can be set to a paged display mode, so that these large numbers of Chinese characters are displayed in the form of page turning; or, further, historical word frequency statistics can be performed based on the Chinese characters confirmed by multiple historical key events on this micro-intelligent device, and the large number of Chinese characters corresponding to the current key input characters can be sorted by word frequency according to the historical word frequency statistics results, and these large numbers of Chinese characters can be displayed by page turning according to the word frequency ranking.

[0139] Based on such a preferred implementation, it is equivalent to analyzing the user's historical key events, and indirectly displaying at least one Chinese character corresponding to the key input character in the panel display area in a manner of recommending high-frequency Chinese characters to the user, so as to facilitate the user to efficiently find the Chinese characters they actually want.

[0140] Furthermore, as a response to the above Figure 1 The application of the display framework shown in the embodiment of the present application provides a method for supporting Chinese character input in a display framework. The method embodiment corresponds to the above-mentioned display framework embodiment. For ease of reading, the method embodiment will not repeat the details of the above-mentioned display framework embodiment one by one, but it should be clear that the method in this embodiment can correspond to all the contents of the above-mentioned display framework embodiment. The method is as follows Figure 3 As shown, the present application embodiment provides the following specific steps:

[0141] 101. Detect key events to obtain key input characters.

[0142] 102. Search a Json object matching the key input character from a preset Json object linked list, and obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object.

[0143] 103. In response to the click selection operation, determine a corresponding output target Chinese character from at least one Chinese character corresponding to the key input character.

[0144] Furthermore, as a response to the above Figure 2 The application of the display framework shown in the embodiment of the present application provides another display framework supporting Chinese character input method. This method embodiment corresponds to the above display framework embodiment. For ease of reading, this method embodiment will not repeat the details of the above display framework embodiment one by one, but it should be clear that the method in this embodiment can correspond to all the contents of the above display framework embodiment. Figure 4 As shown, the present application embodiment provides the following specific steps:

[0145] 201. Build a preset Json object list.

[0146] In the embodiment of the present application, the specific implementation method for constructing a preset Json object linked list can be refined into the following steps:

[0147] First, a file containing a Json string array is pre-configured. The Json string array is composed of multiple Json strings, and each Json string contains a correspondence between preset pinyin characters and preset Chinese characters.

[0148] Furthermore, it can be further refined to include: configuring a first preset Chinese character corresponding to a single preset pinyin character, and obtaining a first Json string containing the correspondence between the single preset pinyin character and the first preset Chinese character; and / or, configuring a second preset Chinese character corresponding to a pinyin string composed of multiple preset pinyin characters, and obtaining a second Json string containing the correspondence between the pinyin string and the second preset Chinese character.

[0149] Then, based on the first Json string and / or the second Json string, a corresponding Json string array is formed to obtain a file containing the Json string array.

[0150] Secondly, based on the Json string, a corresponding Json object is constructed, and the object information corresponding to the Json object includes a preset pinyin character and a preset Chinese character corresponding to the preset pinyin character. Finally, a corresponding preset Json object linked list is constructed based on multiple Json objects.

[0151] 202. Configure the keyboard object and panel object under the display framework.

[0152] In the embodiment of the present application, this step can be further explained as follows:

[0153] Create a keyboard object and configure the corresponding text display area, create a panel object and configure the corresponding panel display area, and add a callback event to the keyboard object. The callback event is used to obtain the object information corresponding to the keyboard object and pass it to the text display area and the panel display area.

[0154] 203. Detect a key event to capture a key input character corresponding to the key event based on a keyboard object.

[0155] 204. By triggering a callback event corresponding to the keyboard object, the key input characters are transferred to the text display area and the panel display area.

[0156] 205. For the key input character displayed in the panel display area, search for a Json object matching the key input character from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object.

[0157] In the embodiment of the present application, the specific implementation method of obtaining the key input character corresponding to the key event can be further refined as follows:

[0158] First, by performing pinyin character conversion processing on the key input character, at least one target pinyin character corresponding to the key input character is obtained.

[0159] Secondly, traverse the preset pinyin characters and preset Chinese characters stored in each Json object in the preset Json object linked list, find out whether there is a target preset pinyin character that matches the target pinyin character, and obtain the target preset Chinese character corresponding to the target preset pinyin character; use the target preset Chinese character as the Chinese character corresponding to the key input character.

[0160] 206. Determine the key input characters displayed in the text display area, and determine at least one Chinese character corresponding to the key input characters displayed in the panel display area, wherein the attributes of the Chinese characters are set to be clickable in the panel object.

[0161] 207. In response to the click operation, determine a corresponding selected Chinese character in at least one Chinese character displayed in the panel display area.

[0162] 208. Delete the key input characters in the text display area and replace them with the selected Chinese characters.

[0163] 209. According to the selected Chinese characters filled in by replacement, the target Chinese characters corresponding to the key input characters are output.

[0164] In summary, the embodiment of the present application provides a display framework and a method for supporting Chinese character input in the display framework. The embodiment of the present application adds the function of inputting Chinese characters in pinyin under the LVGL framework to obtain an improved display framework, and uses such a display framework to implement the following technical solutions: when a key event is detected, the key input character is obtained based on the keyboard object, and based on the callback event corresponding to the keyboard object, the key input character is transferred to the text display area and the panel display area, and at least one Chinese character matching the key input character is searched based on the preset Json object linked list and displayed in the panel display area; in response to a click operation triggered by the user in the panel display area, a certain Chinese character is selected, and the corresponding key input character in the text display area is replaced with the selected Chinese character to obtain the Chinese character output result corresponding to this key event. The display framework provided by the embodiment of the present application meets the demand for Chinese character input, thereby greatly facilitating Chinese users in information reading, information search, information interaction and other operations, and improving the operation experience of Chinese users on smart devices.

[0165] The display framework provided in the embodiment of the present application includes a processor and a memory, and the detection module 、 The Chinese character processing module and the Chinese character output module are stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.

[0166] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the function of inputting Chinese characters in pinyin mode is added under the LVGL framework by adjusting the kernel parameters to meet the input requirements of Chinese characters under the LVGL framework, thereby greatly facilitating Chinese users' operations in information reading, information search, information interaction and other aspects, and improving the operation experience of Chinese users on smart devices.

[0167] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for supporting Chinese character input in the display framework as described above is implemented.

[0168] An embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for supporting Chinese character input in the display framework as described above when executing the computer program.

[0169] An embodiment of the present application provides a computer program product, including: computer program instructions, which, when executed, implement the method for supporting Chinese character input in the display framework as described above.

[0170] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0171] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0172] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0173] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0174] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0175] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0176] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A display frame, characterized in that: The display framework comprises: a detection module, a Chinese character processing module and a Chinese character output module, wherein the Chinese character processing module is connected to the detection module, and the Chinese character output module is connected to the Chinese character processing module; The detection module is used to detect key events to obtain key input characters; The Chinese character processing module is used to search for a Json object matching the key input character from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin characters and the preset Chinese characters pre-stored in the Json object; Wherein, the Chinese character processing module comprises: a character conversion submodule, a search submodule and a determination submodule, wherein the character conversion submodule is connected to the search submodule, and the search submodule is connected to the determination submodule; The character conversion submodule is used to obtain at least one target pinyin character corresponding to the key input character by performing pinyin character conversion processing on the key input character; The search submodule is used to traverse the preset pinyin characters and preset Chinese characters stored in each of the Json objects in the preset Json object linked list, find out whether there is a target preset pinyin character matching the target pinyin character, and obtain the target preset Chinese character corresponding to the target preset pinyin character; The determination submodule uses the target preset Chinese character as the Chinese character corresponding to the key input character; The Chinese character output module is used to determine a corresponding output target Chinese character from at least one Chinese character corresponding to the key input character in response to a click selection operation; Wherein, the display framework further includes: a Json file configuration module, a Json object construction module and a Json object linked list construction module, the Json file configuration module is connected to the Json object construction module, and the Json object construction module is connected to the Json object linked list construction module; The Json file configuration module is used to pre-configure a file containing a Json string array, wherein the Json string array is composed of multiple Json strings, each of which contains a correspondence between a preset pinyin character and a preset Chinese character; The Json file configuration module includes: a first configuration submodule, a second configuration submodule and a composition submodule, and the composition submodule is connected to the first configuration submodule and the second configuration submodule respectively; The first configuration submodule is used to configure a first preset Chinese character corresponding to a single preset pinyin character, and obtain a first Json string containing a correspondence between the single preset pinyin character and the first preset Chinese character; The second configuration submodule is used to configure a second preset Chinese character corresponding to a pinyin string composed of a plurality of the preset pinyin characters, and obtain a second Json string containing a correspondence between the pinyin string and the second preset Chinese character; The composition submodule is used to compose a corresponding Json string array based on the first Json string and / or the second Json string, and obtain a file containing the Json string array; The Json object construction module is used to construct a corresponding Json object based on the Json string, and the object information corresponding to the Json object includes the preset pinyin character and the preset Chinese character corresponding to the preset pinyin character; The Json object linked list construction module constructs a corresponding preset Json object linked list based on a plurality of the Json objects.

2. The display frame according to claim 1, characterized in that: The display framework further comprises: a keyboard object configuration module, a panel object configuration module and an event configuration module, wherein the event configuration module is connected to the keyboard object configuration module and the panel object configuration module respectively; The keyboard object configuration module is used to create a keyboard object and configure a corresponding text display area; The panel object configuration module is used to create a panel object and configure the corresponding panel display area; The event configuration module is used to add a callback event to the keyboard object, and the callback event is used to obtain object information corresponding to the keyboard object and transmit it to the text display area and the panel display area.

3. The display frame according to claim 2, characterized in that: The detection module is also specifically used to: detect a key event to capture a key input character corresponding to the key event based on the keyboard object; The display framework also includes: an event calling module, which is connected to the event configuration module and is used to transfer the key input characters corresponding to the key event to the text display area and the panel display area by triggering the callback event corresponding to the keyboard object after capturing the key input characters corresponding to the key event.

4. The display frame according to claim 3, characterized in that: The Chinese character output module comprises: a text display submodule, a panel display submodule, a determination submodule, a replacement submodule and an output submodule, wherein the determination submodule is connected to the panel display submodule, the replacement submodule is respectively connected to the text display submodule and the panel display submodule, and the output submodule is connected to the text display submodule; The text display submodule is used to display the key input characters in the text display area; The panel display submodule is used for displaying at least one Chinese character corresponding to the key input character in the panel display area based on the key input character received in the panel display area, wherein the attribute of the Chinese character is set to be clickable in the panel object; The determination submodule is used to determine the corresponding selected Chinese character in the at least one Chinese character displayed in the panel display area in response to the click operation; The replacement submodule is used to delete the key input characters in the text display area and replace them with the selected Chinese characters; The output submodule is used to output the target Chinese character corresponding to the key input character according to the selected Chinese character filled in by the replacement.

5. A method for supporting Chinese character input applied to the display framework of claim 1, characterized in that: The method comprises: Detect key events to get key input characters; Searching a Json object matching the key input character from a preset Json object linked list, so as to obtain at least one Chinese character corresponding to the key input character based on the correspondence between the preset pinyin character and the preset Chinese character pre-stored in the Json object, including: obtaining at least one target pinyin character corresponding to the key input character by performing pinyin character conversion processing on the key input character; traversing the preset pinyin characters and preset Chinese characters stored in each of the Json objects in the preset Json object linked list, searching whether there is a target preset pinyin character matching the target pinyin character, and obtaining a target preset Chinese character corresponding to the target preset pinyin character; the target preset Chinese character is used as the Chinese character corresponding to the key input character; In response to the click selection operation, a corresponding output target Chinese character is determined from at least one Chinese character corresponding to the key input character.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method for supporting Chinese character input in the display framework as claimed in claim 5 is implemented.

7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for supporting Chinese character input in the display framework as claimed in claim 5 when executing the computer program.

8. A computer program product, characterized in that include: Computer program instructions, when executed, implement the method for supporting Chinese character input of the display framework as claimed in claim 5.