Character display method and device, storage medium, electronic equipment and product

By designing the same font but different display styles for PUA-encoded and officially encoded characters, the problem of users distinguishing encoded characters is solved, improving the success rate of name verification and saving font resources.

CN116204629BActive Publication Date: 2026-07-03ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2023-01-31
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing technologies, users have difficulty distinguishing between PUA-encoded and officially encoded characters, leading to name verification failures, and font resources are wasted when designing characters with different encodings.

Method used

Characters can be distinguished by using the same font but different display styles for PUA-encoded and officially encoded characters. For example, characters can be distinguished by differences in display attributes such as color, font size, whether they are bold, and whether they are italic.

Benefits of technology

While avoiding increasing the size of font resources, it effectively distinguishes characters with different encodings, thus improving the success rate of name verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116204629B_ABST
    Figure CN116204629B_ABST
Patent Text Reader

Abstract

The embodiment of the present specification provides a character display method, a character display device, a computer readable storage medium, an electronic device and a computer program product. The character display method comprises: obtaining candidate characters corresponding to the input information of the user, and then determining whether there is a first type of character with a first type of code in the candidate characters. When there is a first type of character, the first type of character is displayed in a preset first display style, and the second type of character in the candidate character is displayed in a preset second display style, wherein the second type of character is a second type of code character, and the first display style and the second display style belong to different display styles of the same font. That is, the first type of code of the first type of character and the second type of code of the second type of character are the same font, but there are other display differences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of data processing technology, and in particular to a method for displaying characters, a device for displaying characters, a computer-readable storage medium, an electronic device, and a computer program product. Background Technology

[0002] Currently, some uncommon characters have multiple encodings, meaning the same character may have both a formal encoding and a Private Use Area (PUA) encoding. The characters may look identical, but the encodings differ. In related technologies, users often struggle to distinguish between PUA-encoded and formally encoded characters on the screen, unsure which encoding they are entering. However, during real-name authentication, such as name verification on some websites, the mismatch between PUA-encoded and formally encoded characters can easily lead to verification failures. Therefore, to improve the success rate of name verification, a solution to differentiate between different types of character encoding is urgently needed.

[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this specification, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] The purpose of this specification is to provide a method for displaying characters, a device for displaying characters, a computer-readable storage medium, an electronic device, and a computer program product, which improves the success rate of name verification to at least a certain extent by providing a scheme for distinguishing between characters of the first type of encoding and characters of the second type of encoding.

[0005] Other features and advantages of this specification will become apparent from the following detailed description, or may be learned in part by practice of this specification.

[0006] According to one aspect of this specification, a method for displaying characters is provided, the method comprising: acquiring candidate characters corresponding to user input information; determining whether a first type of character exists among the candidate characters; wherein the first type of character is a character with a first type of encoding; when the first type of character exists among the candidate characters, displaying the first type of character in a preset first display style, and displaying a second type of character among the candidate characters in a preset second display style; wherein the second type of character is a character with a second type of encoding, and the first display style and the second display style are different display styles with the same font.

[0007] According to another aspect of this specification, a character display device is provided, the device comprising: an acquisition module, a determination module, and a display module.

[0008] The system includes an acquisition module for acquiring candidate characters corresponding to user input information; a determination module for determining whether a first type of character exists among the candidate characters; wherein the first type of character is a character with a first type of encoding; and a display module for displaying the first type of character in a preset first display style and displaying the second type of character among the candidate characters in a preset second display style when the first type of character exists among the candidate characters; wherein the second type of character is a character with a second type of encoding, and the first display style and the second display style are different display styles with the same font.

[0009] According to another aspect of this specification, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the character display method described above.

[0010] According to one aspect of this specification, a computer-readable storage medium is provided that stores instructions which, when executed on a computer or processor, cause the computer or processor to perform the character display method described above.

[0011] According to another aspect of this specification, a computer program product containing instructions is provided, which, when run on a computer or processor, causes the computer or processor to perform the character display method described above.

[0012] The character display method, character display device, computer-readable storage medium, electronic device, and computer program product provided in the embodiments of this specification have the following technical effects:

[0013] In the exemplary embodiments provided in this specification, candidate characters corresponding to user input information are obtained, and then it is determined whether a first-class character with a first-class code exists among these candidate characters. When a first-class character exists, it is displayed in a preset first display style, and a second-class character among the candidate characters is displayed in a preset second display style. The second-class character is a character with a second-class code, and the first and second display styles are different display styles using the same font. That is, the first-class character with the first-class code and the second-class character with the second-class code use the same font, but there are other display differences, allowing users to distinguish between characters with the first-class code and characters with the second-class code based on these differences. Furthermore, displaying with the same font allows the same font to be used for characters with different codes in cases of multiple codes, eliminating the need to design different fonts for different codes, thus avoiding wasted design resources and increased font size. Therefore, the exemplary embodiments provided in this specification can help users distinguish between characters with the first-class code and characters with the second-class code while avoiding wasted design resources and increased font size, thereby improving the success rate of name verification.

[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification. It is obvious that the drawings described below are merely some embodiments of this specification, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0016] Figure 1 This is a flowchart illustrating a character display method provided in one embodiment of this specification.

[0017] Figure 2 This is a schematic diagram illustrating the display of a first type of character and a second type of character according to an embodiment of this specification.

[0018] Figure 3 This is a flowchart illustrating the implementation of S130 in one embodiment of this specification.

[0019] Figure 4 This is a schematic diagram of the candidate characters of the target character group obtained after rendering, provided as an embodiment of this specification.

[0020] Figure 5This is a schematic diagram showing the first and second types of characters in a target character group displayed side by side, according to an embodiment of this specification.

[0021] Figure 6 This is a schematic diagram showing the first and second types of characters in a target character group displayed side-by-side adjacent to each other, according to an embodiment of this specification.

[0022] Figure 7 This is a schematic diagram of a character display device provided in one embodiment of this specification.

[0023] Figure 8 This is a schematic diagram of a character display device provided for another embodiment of this specification.

[0024] Figure 9 The schematic diagram illustrates the structure of an electronic device according to an exemplary embodiment of this specification. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this specification clearer, the embodiments of this specification will be described in further detail below with reference to the accompanying drawings.

[0026] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0027] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this specification more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of the embodiments described herein. However, those skilled in the art will recognize that the technical solutions described herein may be practiced with one or more of the specific details mentioned above omitted, or other methods, components, apparatus, steps, etc., may be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this specification.

[0028] Furthermore, the accompanying drawings are merely illustrative diagrams of this specification and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0029] Rare characters, also known as uncommon characters, refer to Chinese characters that are not frequently used or are unfamiliar to most people. Since the inception of Chinese characters, they have been constantly evolving and changing; new characters are constantly being created, and others are constantly being discarded. The "General Standard Chinese Characters" were promulgated and implemented on August 19, 2013, containing 8105 characters. Characters outside of these 8105 can be considered rare characters. Currently, the Unicode character set includes approximately 93,000 Chinese characters. Unicode, also known as Universal Character Set or Universal Code, is an industry standard in computer science developed by the Unicode Consortium, encompassing character sets and encoding schemes.

[0030] When implementing the second-generation ID card, a custom character creation technique was used for some uncommon characters (i.e., using the Unicode custom area PUA to temporarily assign encodings to characters). These custom characters were later gradually included in international standards and given official encodings, resulting in one character having two codes, or even multiple codes for one character due to repeated character creation. For example, […]. Previously, U+E863 encoding (PUA encoding) was used, but it was officially included in Unicode 3.0 as U+4DAE (official encoding). However, because existing ID cards still store characters in PUA encoding and are still in use, the same character has both PUA and official encodings. Users find it difficult to distinguish between PUA-encoded and official-encoded characters on the screen, and are unsure which encoding they are entering. However, during real-name authentication, such as name verification on some websites, the incompatibility between PUA-encoded and official-encoded characters can easily lead to name verification failure.

[0031] Currently, to help users distinguish between characters encoded in different ways, such as PUA-encoded characters and standard-encoded characters, the method used is to design separate fonts for PUA-encoded characters and standard-encoded characters, and these fonts are different for each type of character. Both fonts are loaded simultaneously during display, causing PUA-encoded characters and standard-encoded characters to be displayed in different fonts. This method increases the size of font resources, and because different fonts are needed for PUA-encoded and standard-encoded characters during font design, requiring two fonts for each character, it wastes design resources.

[0032] This specification provides a method for displaying characters, a device for displaying characters, and a computer-readable storage medium, electronic device, and computer program product for implementing the above method, which can solve the aforementioned problems existing in the related art. The following is a detailed description of the character display method provided in this specification:

[0033] in, Figure 1 This is a flowchart illustrating a character display method according to an embodiment of this specification. For example, the execution subject of the character display method provided in this embodiment is an electronic device, such as a mobile phone, computer, laptop, or tablet. (Reference) Figure 1 The embodiment shown in the figure includes: S110-S130.

[0034] S110: Obtain the candidate character corresponding to the user's input information.

[0035] S120: Determine whether a first-class character exists among the above candidate characters. The first-class character is a character encoded in the first class. If a first-class character exists among the candidate characters, proceed to S130; otherwise, the process ends.

[0036] S130: Display the first type of characters in a preset first display style, and display the second type of characters among the candidate characters in a preset second display style. The second type of characters are characters with a second type of encoding, and the first and second display styles are different display styles for the same font.

[0037] exist Figure 1In the character display method provided in the illustrated embodiment, the font used for the first type of character with the first type of encoding and the second type of character with the second type of encoding is the same, but there are other display differences, allowing users to distinguish between the first type of encoded characters and the second type of encoded characters based on these differences. Furthermore, displaying with the same font allows for the use of the same font for characters with multiple encodings, eliminating the need to design different fonts for different encodings. This avoids wasting design resources and increasing font size. Therefore, the character display method provided in this embodiment, while avoiding wasting design resources and increasing font size, allows users to distinguish between the first type of encoded characters and the second type of encoded characters, thereby improving the success rate of name verification.

[0038] The following are Figure 1 The specific implementation methods of each step in the illustrated embodiments are described in detail below:

[0039] In S110, candidate characters corresponding to the user's input information are obtained.

[0040] In an exemplary embodiment, the user's input information can be information entered by the user through an input method. For example, Pinyin information entered through a Pinyin input method, handwritten information entered through a handwriting input method, character root information entered through a Wubi input method, voice information entered through a voice input method, and stroke information entered through a stroke input method.

[0041] The candidate characters corresponding to the above input information can be understood as candidate characters that match the input information. The following explanation uses Pinyin input as an example: obtaining candidate characters that match the user's Pinyin input can be done by searching the Pinyin input method's dictionary for several candidate characters that match the user's Pinyin input. For example, if the user's Pinyin input is "yan", then the candidate characters that match the Pinyin input include several characters in the Pinyin input method's dictionary that contain the Pinyin "yan".

[0042] In S120, it is determined whether a first-type character exists among the candidate characters obtained in S110. In this embodiment, there may be two types of candidate characters: first-type characters and second-type characters. First-type characters are characters encoded in the first type, and second-type characters are characters encoded in the second type. The first type of encoding and the second type of encoding belong to different encoding methods.

[0043] In an exemplary embodiment, the first type of encoding is PUA encoding, and the second type of encoding is formal encoding, which is the official Unicode code point. This allows users to distinguish between characters in PUA encoding and those in formal encoding based on the visual differences, thereby improving the success rate of name verification.

[0044] In an exemplary embodiment, the first type of encoding is Chinese Internal Code Specification (GBK) encoding. GBK encoding is a Chinese character encoding standard; GB stands for "National Standard" and K is the first letter of the Pinyin for "extended". The second type of encoding is GB2312 encoding or GB18030 encoding.

[0045] In an exemplary embodiment, the first type of encoding and the second type of encoding can be any two of the following encoding methods: PUA encoding, formal encoding, GBK encoding, GB2312 encoding, and GB18030 encoding.

[0046] In an exemplary embodiment, S120 may be implemented by: obtaining the current encoding of the candidate character, and determining whether a first type of character exists among the candidate characters based on the encoding range in which the current encoding is located.

[0047] In this embodiment, the current encoding of each candidate character obtained in S110 is acquired. It is understood that the first type of encoding and the second type of encoding each have their own encoding range. Therefore, based on the encoding range in which the current encoding is located, it can be determined whether a first type of character exists among the candidate characters. In this embodiment, by using the encoding range in which the current encoding of a candidate character is located, it is more convenient to determine whether a first type of character exists among the candidate characters.

[0048] In an exemplary embodiment, the first type of encoding is PUA encoding, and the second type of encoding is formal encoding. PUA encoding and formal encoding each have their own encoding range. For example, the encoding range of PUA encoding is E000-F8FF. Therefore, when the current encoding (Unicode encoding) of a candidate character falls within the encoding range of E000-F8FF, it can be determined that a first-type character exists among the candidate characters. When the Unicode encodings of several candidate characters obtained in S110 are all within the encoding range of formal encoding, it can be determined that no first-type character exists among the candidate characters. When among the Unicode encodings of several candidate characters obtained in S110, there is one that is not within the encoding range of formal encoding, it can be determined that a first-type character exists among the candidate characters.

[0049] In an exemplary embodiment, S120 may be implemented in the following ways:

[0050] Each candidate character is queried to determine if it exists in the first database and / or the second database. If it exists, it is determined that the candidate characters contain a first-type character. If it does not exist, it is determined that the candidate characters do not contain a first-type character. The first database stores characters with two codes and their corresponding encodings, forming a first mapping. The second database stores characters with three codes and their corresponding encodings, forming a second mapping. The following explains the cases involving "one character with two codes" / "one character with three codes" (hereinafter referred to as "one character with multiple codes").

[0051] The GBK standard of 1995 and the GB18030-2000 national standard of 2000 resulted in 52 Chinese characters having "two codes for one character", such as " On January 1, 2004, the second-generation resident identity cards began to be issued. If uncommon handwritten characters (also known as "rare characters") from the first-generation identity cards were not included in national or international standards when the second-generation cards were issued, a temporary code (PUA code) would be assigned to the character using a custom encoding from the PUA area of ​​the GB13000 standard (equivalent to Unicode encoding) after approval from relevant departments, based on the population information character library and input method manufacturers. Subsequently, after being submitted to the Unicode Consortium (ISO), the uncommon character was officially included and thus had a formal Unicode code, resulting in a "one character, two codes" phenomenon. Possibly due to management records or other reasons, three Chinese characters were encoded twice using PUA codes, leading to a "one character, three codes" phenomenon.

[0052] In S130, the first and second categories of candidate characters are displayed using differentiated display styles. Specifically, the first category of characters is displayed using a preset first display style, and the second category of characters is displayed using a preset second display style. The first and second display styles are different display styles for the same font. That is, the first and second categories of characters have the same font, but there are other display differences. The first display style can be understood as the display style for the first category of characters, and the second display style can be understood as the display style for the second category of characters. The first and second display styles can be implemented by setting Cascading Style Sheets (CSS). CSS is a style sheet language that describes how elements should be rendered on screen, paper, audio, and other media. CSS can be used to set the style and layout of web pages; for example, it can set the font, color, size, weight, and slant of characters, or add animations and other decorative features to content.

[0053] In exemplary embodiments, the first display style and the second display style differ in any one or more of the following display attributes: color, font size, whether it is bold, whether it is italic, whether it is underlined, and whether it is dynamically displayed. That is, the first type of characters and the second type of characters have the same font, but differ in color, font size, whether it is bold, whether it is italic, whether it is underlined, and whether it is dynamically displayed. For example, both the first type of characters and the second type of characters use SimSun font, the first type of characters are displayed in red, and the second type of characters are displayed in black. Or, both the first type of characters and the second type of characters use KaiTi font, the first type of characters are displayed in size 5, and the second type of characters are displayed in size 4. Or, both the first type of characters and the second type of characters use KaiTi font, the first type of characters are displayed in bold, and the second type of characters are displayed normally without bolding. Or, both the first type of characters and the second type of characters use SimSun font, the first type of characters are displayed italic, and the second type of characters are displayed normally without italicizing. Or, both the first type of characters and the second type of characters use SimSun font, the first type of characters are displayed dynamically, and the second type of characters are displayed statically.

[0054] It should be noted that the display styles of the first and second types of characters described above are only examples of differences in one display attribute. In actual implementation, the display styles of the first and second types of characters can also differ in multiple display attributes simultaneously. For example, if both types of characters use the KaiTi font, the first type of characters are displayed in red and bold, while the second type of characters are displayed in black and normally without bold.

[0055] In an exemplary embodiment, the font size corresponding to the first display style is smaller than the font size corresponding to the second display style. For example, the font size corresponding to the first display style is 80% of the font size corresponding to the second display style. When the first type of encoding is PUA encoding and the second type of encoding is formal encoding, since the first display style is equivalent to the display style of PUA-encoded characters and the second display style is equivalent to the display style of formally encoded characters, and the number of PUA-encoded characters is relatively small, setting the font size corresponding to the first display style to be smaller than the font size corresponding to the second display style allows for setting the display style of PUA-encoded characters without adjusting the existing display style of formally encoded characters. This helps to differentiate between PUA-encoded characters and formally encoded characters while avoiding adjustments to the existing display style of formally encoded characters, thus not affecting the user's viewing habits for formally encoded characters.

[0056] For easier understanding, please refer to Figure 2 , Figure 2This is a diagram illustrating the first and second categories of characters. The user input is "yan," and among the candidate characters... " is a first-class character, and the rest are second-class characters. Figure 2 It can be seen that among the candidate characters, " "The font is the same as other characters, but the size is different, meaning the font size is different, which makes it easy for users to distinguish the PUA-encoded characters among the candidate characters." " and other officially encoded characters.

[0057] In an exemplary embodiment, S130 can be implemented as follows: Figure 3 As shown, it may include:

[0058] S132: Obtain the glyph data of the above candidate characters based on their current encoding.

[0059] S134: Render the glyph data of the first type of characters according to the first display style to display the first type of characters, and render the glyph data of the second type of characters according to the second display style to display the second type of characters.

[0060] In this embodiment, the glyph data of the candidate characters are obtained according to the current encoding of the candidate characters. The glyph data of the first type of characters and the glyph data of the second type of characters are rendered through different display styles, so that the first type of characters and the second type of characters can be displayed in a differentiated style.

[0061] In S132, a mapping relationship can exist between the current encoding and the glyph data, allowing the acquisition of glyph data for each candidate character based on its current encoding and the aforementioned mapping relationship. The glyph data for a candidate character may include its glyph outline data. It is understood that the glyph outline data for the same character typically differs when displayed in different fonts. The glyph data can be used to describe the glyph outline curve of the candidate character. For example, the glyph data includes the coordinates of multiple sets of points. A set of coordinate points can be the endpoints of a straight line, or the endpoints of a Bézier curve and control points outside the Bézier curve.

[0062] For example, the first type of encoding is PUA encoding, and the second type of encoding is the formal encoding. In this case, if the candidate character is a first-type character (i.e., a PUA-encoded character), then the current encoding of the candidate character (i.e., the Unicode encoding) is PUA encoding. If the candidate character is a second-type character (i.e., a formally encoded character), then the Unicode encoding of the candidate character is the formal encoding. The above mapping relationship is the mapping relationship between Unicode encoding and glyph data.

[0063] For example, S132 can be implemented as follows: determine the current font of the current page, and query the glyph data corresponding to the current encoding in the font library of the current font according to the pre-stored mapping relationship. Here, the mapping relationship is the mapping relationship between the current encoding and the glyph data. For example, the electronic device can determine the current font of the current page based on the displayed content of the current page, or based on the configuration information of the current page. If the current font of the current page is SimSun, then query the glyph data corresponding to the current encoding in the SimSun font library. Here, the SimSun font library stores glyph data for several characters of SimSun. If the current font of the current page is KaiTi, then query the glyph data corresponding to the current encoding in the KaiTi font library. Here, the KaiTi font library stores glyph data for several characters of KaiTi.

[0064] In this embodiment, by first determining the current font of the current page, querying the glyph data in the font library of the current font, the queried glyph data can be matched with the current font of the current page, thereby improving the coordination of the displayed content of the current page.

[0065] For example, the specific implementation of querying the glyph data corresponding to the current encoding in the font library of the current font based on the pre-stored mapping relationship can be as follows: Based on the locally stored mapping relationship, query the glyph data corresponding to the current encoding in the local font library of the current font. If the glyph data corresponding to the current encoding is not found locally, then the glyph data corresponding to the current encoding is obtained from the remote font library of the current font. In other words, the glyph data of candidate characters is first queried in the local font library; if it does not exist in the local font library, it is then obtained from the remote font library. This ensures that the glyph data can be accurately obtained and also avoids, to some extent, the frequent retrieval of glyph data from the remote library. At the same time, since glyph data can be obtained from the remote library, it also reduces the need to store excessive glyph data in the local font library.

[0066] In this embodiment, both local and remote storage can store the mapping relationship between the current encoding and glyph data. Furthermore, in cases where a character has multiple encodings, the glyph data corresponding to these multiple encodings is the same, such as the formal encoding. and PUA encoding The corresponding glyph data is the same, so there is no need to differentiate between the two encodings. By setting their respective glyph data, the number of mapping relationships can be greatly reduced, thereby saving local and remote storage space.

[0067] Exemplarily, querying the glyph data corresponding to the current encoding in the font library of the current font locally according to the above local pre-stored mapping relationship includes: determining the priorities of the font libraries of multiple fonts set for the current page; according to the mapping relationship and the above priorities, taking the font library of the current font as the first priority, and sequentially querying the glyph data corresponding to the current encoding in the font libraries of multiple fonts locally until the glyph data corresponding to the current encoding is queried or the glyph data corresponding to the current encoding is not queried locally. Through the setting of priorities, it is possible to query the glyph data locally as much as possible, thereby avoiding obtaining it from the remote font library as much as possible.

[0068] Among them, during the process of page development by those skilled in the art, an initial font can be set for the page, and multiple initial fonts can be set. For example, Song typeface can be used as the first priority, Kai typeface as the second priority, and Hei typeface as the third priority. The corresponding local font libraries can include: the font library of Song typeface, the font library of Kai typeface, and the font library of Hei typeface. The priorities of the font libraries of multiple fonts can be determined according to the priorities of the initial fonts. For example, the priority of the font itself can be used as the priority of the font library of that font. For example, combining the above priorities of Song typeface, Kai typeface, and Hei typeface, the font library of Song typeface is the first priority, the font library of Kai typeface is the second priority, and the font library of Hei typeface is the third priority. Assuming the current font is Song typeface, the glyph data corresponding to the current encoding can be first queried in the font library of Song typeface as the first priority. If not queried, the glyph data corresponding to the current encoding can be queried in the font library of Kai typeface as the second priority. If still not queried, the glyph data corresponding to the current encoding can be queried in the font library of Hei typeface as the third priority until the glyph data corresponding to the current encoding is queried or the glyph data is not queried in the font libraries of Song typeface, Kai typeface, and Hei typeface locally.

[0069] In S134, the glyph data of the first type of characters is rendered according to the first display style to display the first type of characters, and the glyph data of the second type of characters is rendered according to the second display style to display the second type of characters. During rendering, the electronic device can generate multiple coordinate points forming the glyph contour curves of the first type of characters based on the glyph data of the first type of characters, obtain the dot matrix coordinate group forming the glyph contour curves of the first type of characters, and then, the electronic device can display the glyph contour curves of the first type of characters based on the dot matrix coordinate group and the first display style to obtain the rendered first type of characters. Correspondingly, the electronic device can generate multiple coordinate points forming the glyph contour curves of the second type of characters based on the glyph data of the second type of characters, obtain the dot matrix coordinate group forming the glyph contour curves of the second type of characters, and then, the electronic device can display the glyph contour curves of the second type of characters based on the dot matrix coordinate group and the second display style to obtain the rendered second type of characters. For example, reference can be made to Figure 2 The first type of character that is ultimately displayed is " ",remove" The candidate characters other than “” are the second type of characters.

[0070] In an exemplary embodiment, S132 can be further implemented as follows: when a target character group exists among the candidate characters, the glyph data corresponding to the Unicode of any candidate character in the target character group is determined as the glyph data of the target character group. The target character group includes multiple candidate characters, and the current encodings of the multiple candidate characters are different, but the glyph data of the multiple candidate characters in the target character group are the same, that is, the multiple candidate characters in the target character group are actually the same character. Meanwhile, S134 can be: rendering the glyph data of the target character group according to a first display style to display the first type of characters in the target character group, and rendering the glyph data of the target character group according to a second display style to display the second type of characters in the target character group.

[0071] For example, the target character group includes two candidate characters, which are PUA-encoded " "and the formal code" This means that the two candidate characters are actually the same character encoded in different ways. In this embodiment, the two candidate characters use the same glyph data, that is, the glyph data is the same.

[0072] In S132, the glyph data of the target character group can be obtained according to a preset mapping relationship and the current encoding of any candidate character in the target character group. This mapping relationship can be a mapping between glyph data and the current encoding. In the case of multiple codes for a single character, multiple encodings of the same character correspond to the same glyph data. Therefore, in this embodiment, the corresponding glyph data can be obtained as the glyph data of the target character group based on the current encoding of any candidate character in the target character group. That is, since the glyph data of multiple candidate characters in the target character group are the same, the glyph data of any candidate character in the target character group can be used as the glyph data of the target character group.

[0073] For example, the implementation of S132 can also combine the above-mentioned method of first querying glyph data locally, and then querying remotely if the data is not found locally. For instance, based on the current encoding of any candidate character in the target character group, the local font library is used to query the glyph data corresponding to the current encoding. If the glyph data corresponding to the current encoding is not found locally, then the glyph data corresponding to the current encoding is queried remotely.

[0074] In S134, the same glyph data is rendered according to the first display style and the second display style respectively, to display the first type of characters and the second type of characters in the target character group. The first type of characters and the second type of characters in the target character group belong to the same character with different encodings. For example, see... Figure 4 , Figure 4 This is a schematic diagram showing the candidate characters of the target character group after rendering. Figure 4 It can be seen that the first type of characters and the second type of characters in the target character group have the same font, and the font size of the first type of characters is smaller than that of the second type of characters.

[0075] In this embodiment, when the candidate characters include the target character group, the first type of characters and the second type of characters in the target character group are displayed differently, so that even if the user sees multiple characters with the same glyph at the same time, such as seeing the PUA-encoded " "and the formal code" It can also be distinguished. Since the first and second types of characters in the target character group have the same font, there is no need to obtain glyph data multiple times, saving network resources that may be consumed by obtaining glyph data multiple times during rendering.

[0076] For example, a specific display style can be enabled by specifying the encoding range as E000-F8FF using a CSS stylesheet. This means enabling the first display style mentioned above, automatically modifying the display style of PUA-encoded characters to differentiate them from officially encoded characters. This allows users to directly distinguish whether the same character is PUA-encoded or officially encoded on the screen. For example, see... Figure 4 Users can distinguish PUA encoding by the different font sizes on the screen. "and the formal code" ".

[0077] In an exemplary embodiment, the first type of characters and the second type of characters in the target character group are displayed adjacent to each other. Adjacent can be, for example, as shown below. Figure 5 The adjacent side-by-side display shown can also be as follows: Figure 6 The adjacent characters are displayed side-by-side. This makes the display of the same character with different encodings more distinct, allowing it to be quickly seen by the user.

[0078] In an exemplary embodiment, the first display style and the second display style in S130 are determined based on the following method: First, the current scene of the user is determined. Then, an encoding applicable to the scene is determined. Next, the first display style and the second display style are determined based on the encoding applicable to the scene.

[0079] The user's current scenario can be divided into two categories: Category 1 and Category 2. Category 1 scenarios involve using Category 1 encoding for uncommon characters during name verification, while Category 2 scenarios involve using Category 2 encoding for uncommon characters during name verification. The encoding applicable to Category 1 is Category 1, and the encoding applicable to Category 2 is Category 2. If the user is currently in Category 1, it can be determined that the visual appeal of the first display style is greater than that of the second display style. For example, the first display style can be dynamic, while the second display style can be static; or the font size corresponding to the first display style is the normal display size, while the font size corresponding to the second display style is 0 (i.e., no Category 2 characters are displayed). If the user is currently in Category 2, it can be determined that the visual appeal of the second display style is greater than that of the first display style. For example, the first display style can be static, while the second display style can be dynamic; or the font size corresponding to the second display style is the normal display size, while the font size corresponding to the first display style is 0 (i.e., no Category 1 characters are displayed). The normal display font size can be set by the user according to actual needs, such as setting it to the display font size that the user usually uses. This embodiment does not make specific limitations on this.

[0080] In this embodiment, a first display style and a second display style are determined based on the encoding applicable to the user's current scenario, making the first display style and the second display style more personalized and more in line with the actual needs of the user's current scenario.

[0081] It should be noted that the above figures are merely illustrative of the processes included in the methods according to exemplary embodiments of this specification, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may, for example, be executed synchronously or asynchronously in multiple modules.

[0082] The following are embodiments of the apparatus described in this specification, which can be used to execute the embodiments of the methods described in this specification. For details not disclosed in the apparatus embodiments of this specification, please refer to the embodiments of the methods described in this specification.

[0083] in, Figure 7 A schematic diagram of a character display device to which one embodiment of this specification can be applied is shown. Please refer to... Figure 7 The character display device shown in the figure can be implemented as all or part of an electronic device through software, hardware, or a combination of both, or it can be integrated into an electronic device as an independent module.

[0084] The character display device 700 in the embodiments of this specification includes: an acquisition module 710, a determination module 720, and a display module 730.

[0085] The acquisition module 710 is used to acquire candidate characters corresponding to the user's input information. The determination module 720 is used to determine whether a first type of character exists among the candidate characters; wherein the first type of character is a character with a first type of encoding. The display module 730 is used to display the first type of character in a preset first display style and display the second type of character among the candidate characters in a preset second display style when the first type of character exists among the candidate characters; wherein the second type of character is a character with a second type of encoding, and the first display style and the second display style are different display styles with the same font.

[0086] In an exemplary embodiment, based on the foregoing scheme, the determining module 720 is specifically used to: obtain the current encoding of the candidate character; and determine whether there is a first type of character among the candidate characters according to the encoding range in which the current encoding is located.

[0087] In an exemplary embodiment, based on the foregoing scheme, such as Figure 8 As shown, the display module 730 includes a character shape data acquisition module 7031 and a character shape data rendering module 7032. The character shape data acquisition module 7031 is used to: acquire the character shape data of the candidate characters according to the current encoding of the candidate characters; the character shape data rendering module 7032 is used to: render the character shape data of the first type of characters according to the first display style to display the first type of characters, and render the character shape data of the second type of characters according to the second display style to display the second type of characters.

[0088] In an exemplary embodiment, based on the foregoing scheme, the character data acquisition module 7031 is specifically used to: when there is a target character group among the candidate characters, determine the character data corresponding to the current encoding of any candidate character in the target character group as the character data of the target character group; the character data rendering module 7032 is specifically used to: render the character data of the target character group according to the first display style to display the first type of characters in the target character group, and render the character data of the target character group according to the second display style to display the second type of characters in the target character group.

[0089] In an exemplary embodiment, based on the foregoing scheme, the display positions of the first type of characters and the second type of characters in the target character group are adjacent.

[0090] In an exemplary embodiment, based on the foregoing scheme, the glyph data acquisition module 7031 is specifically used to: acquire the glyph data of the candidate character according to the current encoding of the candidate character, including: determining the current font of the current page; and querying the glyph data corresponding to the current encoding in the font library of the current font according to the pre-stored mapping relationship.

[0091] In an exemplary embodiment, based on the aforementioned scheme, the glyph data acquisition module 7031 is specifically used to: query the glyph data corresponding to the current encoding in the font library of the current font according to the pre-stored mapping relationship, including: querying the glyph data corresponding to the current encoding in the local font library of the current font according to the locally pre-stored mapping relationship; if the glyph data corresponding to the current encoding is not found locally, then the glyph data corresponding to the current encoding is obtained from the remote font library of the current font.

[0092] In an exemplary embodiment, based on the foregoing scheme, the glyph data acquisition module 7031 is specifically used to: query the glyph data corresponding to the current encoding in the font library of the current font in the local storage according to the above-mentioned mapping relationship, including: determining the priority of the font libraries of the multiple fonts set for the current page; according to the above-mentioned mapping relationship and the above-mentioned priority, taking the font library of the current font as the first priority, querying the glyph data corresponding to the current encoding in the font libraries of the multiple fonts in the local storage in turn, until the glyph data corresponding to the current encoding is found or the glyph data corresponding to the current encoding is not found in the local storage.

[0093] In an exemplary embodiment, based on the foregoing scheme, the first display style and the second display style differ in any one or more of the following display attributes: color, font size, whether bold, whether it is slanted, whether an underline is added, and whether it is dynamically displayed.

[0094] In an exemplary embodiment, based on the aforementioned scheme, the font size corresponding to the first display style is smaller than the font size corresponding to the second display style.

[0095] In an exemplary embodiment, based on the foregoing scheme, the character display device 700 further includes: a display style determination module, which is used to determine the scene currently in which the user is located; determine an encoding applicable to the scene; and determine the first display style and the second display style according to the encoding applicable to the scene.

[0096] It should be noted that the character display device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the character display method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0097] Furthermore, the character display device and character display method embodiments provided in the above embodiments belong to the same concept. Therefore, for details not disclosed in the device embodiments of this specification, please refer to the character display method embodiments described above, which will not be repeated here.

[0098] This specification also 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 executes the program to implement the steps of any of the methods described above.

[0099] Figure 9 This schematic diagram illustrates the structure of an electronic device according to an exemplary embodiment of this specification. Please refer to... Figure 9 As shown, the electronic device 900 includes a processor 901 and a memory 902.

[0100] In this embodiment, processor 901 is the control center of the computer system and can be a processor of a physical machine or a processor of a virtual machine. Processor 901 may include one or more processing cores, such as a 4-core processor or a 9-core processor. Processor 901 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). Processor 901 may also include a main processor and a coprocessor; the main processor is used to process data in the wake-up state, and the coprocessor is a low-power processor used to process data in the standby state.

[0101] In the embodiments described in this specification, the processor 901 is specifically used for:

[0102] Obtain candidate characters corresponding to the user's input information; determine whether a first type of character exists among the candidate characters; wherein the first type of character is a character with a first type of encoding; when the first type of character exists among the candidate characters, display the first type of character in a preset first display style, and display the second type of character among the candidate characters in a preset second display style; wherein the second type of character is a character with a second type of encoding, and the first display style and the second display style are different display styles with the same font.

[0103] Furthermore, determining whether a first type of character exists among the candidate characters includes: obtaining the current encoding of the candidate character; and determining whether a first type of character exists among the candidate characters based on the encoding range in which the current encoding is located.

[0104] Furthermore, the above-mentioned display of the first type of characters in a preset first display style and display of the second type of characters among the candidate characters in a preset second display style includes: obtaining the glyph data of the candidate characters according to the current encoding of the candidate characters; rendering the glyph data of the first type of characters according to the first display style to display the first type of characters, and rendering the glyph data of the second type of characters according to the second display style to display the second type of characters.

[0105] Furthermore, obtaining the glyph data of the candidate characters based on their current encoding includes: when a target character group exists among the candidate characters, determining the glyph data corresponding to the current encoding of any candidate character in the target character group as the glyph data of the target character group; rendering the glyph data of the first type of characters according to the first display style to display the first type of characters, and rendering the glyph data of the second type of characters according to the second display style to display the second type of characters includes: rendering the glyph data of the target character group according to the first display style to display the first type of characters in the target character group, and rendering the glyph data of the target character group according to the second display style to display the second type of characters in the target character group.

[0106] Furthermore, the first type of characters and the second type of characters in the target character group are displayed in adjacent positions.

[0107] Furthermore, the above-mentioned method of obtaining the glyph data of the candidate characters based on their current encoding includes: determining the current font of the current page; and querying the glyph data corresponding to the current encoding in the font library of the current font based on the pre-stored mapping relationship.

[0108] Furthermore, the above-mentioned querying of the glyph data corresponding to the current encoding in the font library of the current font according to the pre-stored mapping relationship includes: querying the glyph data corresponding to the current encoding in the local font library of the current font according to the local pre-stored mapping relationship; if the glyph data corresponding to the current encoding is not found locally, then the glyph data corresponding to the current encoding is obtained from the remote font library of the current font.

[0109] Furthermore, the above-mentioned method of querying the glyph data corresponding to the current encoding in the local font library of the current font based on the locally stored mapping relationship includes: determining the priority of the font libraries of the various fonts set for the current page; based on the mapping relationship and the priority, with the font library of the current font as the first priority, querying the glyph data corresponding to the current encoding in the local font libraries of the various fonts in turn, until the glyph data corresponding to the current encoding is found or the glyph data corresponding to the current encoding is not found locally.

[0110] Furthermore, the first display style and the second display style mentioned above differ in any one or more of the following display attributes: color, font size, whether it is bold, whether it is italic, whether it is underlined, and whether it is dynamically displayed.

[0111] Furthermore, the font size corresponding to the first display style is smaller than the font size corresponding to the second display style.

[0112] Furthermore, the first display style and the second display style are determined based on the following method: determining the current scene of the user; determining the encoding applicable to the scene; and determining the first display style and the second display style based on the encoding applicable to the scene.

[0113] Memory 902 may include one or more computer-readable storage media, which may be non-transitory. Memory 902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments of this specification, the non-transitory computer-readable storage media in memory 902 is used to store at least one instruction for execution by processor 901 to implement the methods in the embodiments of this specification.

[0114] In some embodiments, the electronic device 900 further includes a peripheral device interface 903 and at least one peripheral device. The processor 901, memory 902, and peripheral device interface 903 are connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of a display screen 904, a camera 905, and an audio circuit 906.

[0115] Peripheral interface 903 can be used to connect at least one input / output (I / O) related peripheral device to processor 901 and memory 902. In some embodiments of this specification, processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in other embodiments of this specification, any one or two of processor 901, memory 902, and peripheral interface 903 can be implemented on separate chips or circuit boards. This specification does not specifically limit the embodiments in this regard.

[0116] Display screen 904 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. When display screen 904 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 901 for processing. In this case, display screen 904 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments of this specification, there may be one display screen 904, which is disposed on the front panel of electronic device 900; in other embodiments, there may be at least two display screens 904, respectively disposed on different surfaces of electronic device 900 or in a folded design; in still other embodiments, display screen 904 may be a flexible display screen, disposed on a curved or folded surface of electronic device 900. Furthermore, display screen 904 may also be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. The display screen 904 can be made of materials such as liquid crystal display (LCD) and organic light-emitting diode (OLED).

[0117] Camera 905 is used to capture images or videos. Optionally, camera 905 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the electronic device, and the rear-facing camera is located on the back of the electronic device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, virtual reality (VR) shooting, or other fusion shooting functions. In some embodiments of this specification, camera 905 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.

[0118] The audio circuit 906 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 901 for processing. For stereo sound acquisition or noise reduction purposes, there may be multiple microphones, each located in a different part of the electronic device 900. The microphone may also be an array microphone or an omnidirectional microphone.

[0119] Power supply 907 is used to supply power to various components in electronic device 900. Power supply 907 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 907 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0120] The block diagrams of the electronic device shown in the embodiments of this specification do not constitute a limitation on the electronic device 900. The electronic device 900 may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0121] In the description of this specification, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of these terms in this specification based on the specific circumstances. Furthermore, in the description of this specification, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0122] This specification also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps in the above embodiments. If the constituent modules of the character display device described above are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium.

[0123] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).

[0124] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0125] The above description is merely a specific embodiment of this specification, but the scope of protection of this specification is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, equivalent variations made in accordance with the claims of this specification are still within the scope of this specification.

Claims

1. A display method of characters, wherein, The method includes: Retrieve candidate characters corresponding to the user's input information; Determine whether a first type of character exists among the candidate characters; wherein, the first type of character is a character with a first type of encoding; When the first type of character exists among the candidate characters, the glyph data of the candidate character is obtained according to the current encoding of the candidate character; The glyph data of the first type of characters are rendered according to the first display style to display the first type of characters, and the glyph data of the second type of characters are rendered according to the second display style to display the second type of characters; wherein, the second type of characters are characters of the second type of encoding, and the first display style and the second display style are different display styles of the same font; Wherein, obtaining the glyph data of the candidate character based on its current encoding includes: When a target character group exists among the candidate characters, the glyph data corresponding to the current encoding of any candidate character in the target character group is determined as the glyph data of the target character group; The step of rendering the glyph data of the first type of characters according to a first display style to display the first type of characters, and rendering the glyph data of the second type of characters according to a second display style to display the second type of characters, includes: The glyph data of the target character group is rendered according to the first display style to display the first type of characters in the target character group, and the glyph data of the target character group is rendered according to the second display style to display the second type of characters in the target character group.

2. The method of claim 1, wherein, Determining whether a first type of character exists among the candidate characters includes: Obtain the current encoding of the candidate character; Based on the encoding range in which the current encoding is located, determine whether there is a first type of character among the candidate characters.

3. The method of claim 1, wherein, The first type of characters and the second type of characters in the target character group are displayed in adjacent positions.

4. The method of claim 1, wherein, The glyph data corresponding to the current encoding of the candidate character is determined in the following way: Determine the current font on the current page; Based on the pre-stored mapping relationship, the font data corresponding to the current encoding is queried in the font library of the current font.

5. The method of claim 4, wherein, The step of querying the glyph data corresponding to the current encoding in the font library of the current font according to the pre-stored mapping relationship includes: Based on the locally stored mapping relationship, query the glyph data corresponding to the current encoding in the local font library of the current font; If the glyph data corresponding to the current encoding is not found locally, the glyph data corresponding to the current encoding is obtained from the font library of the current font remotely.

6. The method according to claim 5, wherein, The step of querying the glyph data corresponding to the current encoding in the local font library of the current font according to the locally pre-stored mapping relationship includes: Determine the priority of the font libraries for the various fonts set for the current page; Based on the mapping relationship and the priority, with the font library of the current font as the first priority, the glyph data corresponding to the current encoding is queried in the font libraries of the various fonts in the local system in turn, until the glyph data corresponding to the current encoding is found or the glyph data corresponding to the current encoding is not found in the local system.

7. The method according to any one of claims 1 to 6, wherein, The first display style and the second display style differ in any one or more of the following display attributes: Color, font size, bold, italic, underline, and dynamic display.

8. The method according to any one of claims 1 to 6, wherein, The font size corresponding to the first display style is smaller than the font size corresponding to the second display style.

9. The method according to any one of claims 1 to 6, wherein, The first display style and the second display style are determined based on the following method: Determine the current scenario in which the user is located; Determine the appropriate encoding for the scenario; The first display style and the second display style are determined based on the encoding applicable to the scenario.

10. The method according to any one of claims 1 to 6, wherein, The first type of code is a private customization zone code, and the second type of code is a formal code.

11. A display device of characters, wherein, The device includes: The acquisition module is used to acquire candidate characters corresponding to the user's input information; A determining module is used to determine whether a first type of character exists among the candidate characters; wherein, the first type of character is a character with a first type of encoding; The glyph data acquisition module is used to acquire the glyph data of the candidate characters according to the current encoding of the candidate characters when the first type of characters exist among the candidate characters; The glyph data rendering module is used to render the glyph data of the first type of characters according to the first display style to display the first type of characters, and to render the glyph data of the second type of characters according to the second display style to display the second type of characters; wherein, the second type of characters are characters of the second type of encoding, and the first display style and the second display style are different display styles of the same font; Specifically, the glyph data acquisition module is used to determine the glyph data corresponding to the current encoding of any candidate character in the target character group as the glyph data of the target character group when the candidate characters contain a target character group; the glyph data rendering module is used to render the glyph data of the target character group according to the first display style to display the first type of characters in the target character group, and to render the glyph data of the target character group according to the second display style to display the second type of characters in the target character group.

12. A computer-readable storage medium storing a computer program that, when executed, implements the method as described in any one of claims 1 to 10.

13. An electronic device, comprising: The electronic device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the method as described in any one of claims 1 to 10.

14. A computer program product comprising instructions which, when the computer program product is executed on a computer or processor, cause the computer or processor to carry out the method of any one of claims 1 to 10.