A rare character processing method and device, a storage medium and an electronic device
By combining a rare character library with a rare character encoding plane, online, real-time, and rapid updates of the rare character library are achieved, solving the problem of long update cycles in existing technologies and improving processing efficiency and user experience.
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-04-28
AI Technical Summary
In existing technologies, the updating and maintenance of rare character libraries need to be carried out according to the version of the library, which results in a long update cycle and affects the convenience and efficiency of rare character processing.
By combining a rare character library with a rare character encoding plane, online, real-time, and rapid encoding updates can be achieved, avoiding updates based on the character library version.
It improves the efficiency of handling rare characters, enhances the user experience, and reduces the cost of font library management.
Smart Images

Figure CN116204538B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a method, apparatus, storage medium, and electronic device for processing rare characters. Background Technology
[0002] With the development of computer technology, electronic devices are gradually able to provide users with intelligent services, assisting users to complete tasks quickly and accurately. However, in daily life, there are still many rare characters, variant characters, and local special characters that are still in use, and users have a need to use these rare characters. Summary of the Invention
[0003] This specification provides a method, apparatus, storage medium, and electronic device for processing uncommon characters. The technical solution is as follows:
[0004] Firstly, this specification provides a method for processing uncommon characters, the method including:
[0005] A target rare character to be updated for a rare character library is detected, and the target rare character code corresponding to the target rare character is obtained;
[0006] Determine the target rare character encoding plane corresponding to the target rare character encoding, and update the rare character library using the target rare character encoding plane based on the target rare character encoding.
[0007] Secondly, this specification provides a device for processing uncommon characters, the device comprising:
[0008] The update detection module is used to detect the target rare character to be updated for the rare character library and obtain the target rare character code corresponding to the target rare character;
[0009] The encoding update module is used to determine the target rare character encoding plane corresponding to the target rare character encoding, and to perform encoding update processing on the rare character library based on the target rare character encoding and the target rare character encoding plane.
[0010] Thirdly, this specification provides a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0011] Fourthly, this specification provides an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.
[0012] Fifthly, this specification provides a computer program product storing at least one instruction adapted to be loaded by a processor and to execute the method steps of one or more embodiments of this specification.
[0013] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:
[0014] In one or more embodiments of this specification, when an electronic device detects a target rare character to be updated for a rare character library, it obtains the target rare character code corresponding to the target rare character, determines the target rare character encoding plane corresponding to the target rare character code, and performs encoding update processing on the rare character library based on the target rare character code and the target rare character encoding plane. By determining the form of the target rare character encoding plane for the rare character library, updates according to the font library version are avoided. Online encoding update, real-time encoding update, and fast encoding update of the rare character library can be realized, improving the efficiency of rare character processing, enhancing user experience, and reducing font library management costs. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in this specification or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of a rare character processing system provided in this manual;
[0017] Figure 2 This is a flowchart illustrating a method for handling uncommon characters provided in this manual;
[0018] Figure 3 This is a schematic diagram of a scenario where multiple encoding planes are used to represent rare characters, as provided in this instruction manual.
[0019] Figure 4 This is a flowchart illustrating another method for handling uncommon characters provided in this manual;
[0020] Figure 5 This is a flowchart illustrating a font detection process provided in this manual;
[0021] Figure 6 This is a flowchart illustrating the construction of a rare character encoding plane provided in this manual;
[0022] Figure 7 This is a schematic diagram of the structure of a rare character processing device provided in this manual;
[0023] Figure 8 This is a structural diagram of an encoding update module provided in this specification;
[0024] Figure 9 This is a schematic diagram of the structure of an electronic device provided in this specification;
[0025] Figure 10 This is a schematic diagram of the operating system and user space provided in this manual;
[0026] Figure 11 yes Figure 10 Architecture diagram of the Android operating system in China;
[0027] Figure 12 yes Figure 10 Architecture diagram of the iOS operating system. Detailed Implementation
[0028] The technical solutions in this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0029] 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. In the description of this specification, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above 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, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0030] In related technologies, the use of rare character libraries is often used to address users' needs for inputting rare characters. When users input rare characters, they will use the rare codes corresponding to the rare character library. The updating and maintenance of rare character libraries is particularly important. Currently, the rare codes of rare character libraries are updated according to the version of the library. Usually, a new version of the library will be generated only after a certain amount of rare data updates are accumulated. This method of updating the rare character codes according to the version of the library makes the update cycle of rare character codes very long, resulting in inconvenience in handling rare characters.
[0031] The present specification will now be described in detail with reference to specific embodiments.
[0032] Please see Figure 1 This is a schematic diagram illustrating a scenario for a system for processing uncommon characters provided in this manual. Figure 1 As shown, the rare character processing system may include at least a client cluster and a service platform 100.
[0033] The client cluster may include at least one client, such as Figure 1 As shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.
[0034] Each client in a client cluster can be an electronic device with communication capabilities, including but not limited to: wearable devices, handheld devices, personal computers, tablets, in-vehicle devices, smartphones, computing devices, or other processing devices connected to a wireless modem. Electronic devices may have different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), and electronic devices in 5G networks or future evolved networks.
[0035] The service platform 100 can be a standalone server device, such as a rack-mount, blade, tower, or cabinet-type server device, or a workstation, mainframe, or other hardware device with strong computing power; or it can be a server cluster composed of multiple servers. The servers in the service cluster can be composed in a symmetrical manner, wherein each server is functionally and hierarchically equivalent in the transaction chain, and each server can provide services independently. The independent provision of services can be understood as not requiring the assistance of other servers.
[0036] In one or more embodiments of this specification, the service platform 100 can establish a communication connection with at least one client in the client cluster, and complete the data interaction in the rare character processing process based on the communication connection, such as online transaction data interaction. For example, the service platform 100 can perform encoding update processing on the rare character library based on the rare character processing method of this specification.
[0037] For example, a target user (such as a font library maintenance user or a font library user) can initiate an encoding update request for the uncommon font library to the service platform 100 through the corresponding client, and send the target uncommon characters to be updated for the uncommon font library. After detecting the target uncommon characters to be updated for the uncommon font library by the target user, the service platform 100 can execute one or more uncommon character processing methods as described in this specification to realize real-time encoding update processing of the uncommon font library through the target uncommon character encoding plane;
[0038] It should be noted that the service platform 100 establishes a communication connection with at least one client in the client cluster via a network for interactive communication. This network can be a wireless network or a wired network. Wireless networks include, but are not limited to, cellular networks, wireless LANs, infrared networks, or Bluetooth networks. Wired networks include, but are not limited to, Ethernet, universal serial bus (USB), or controller area networks. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network (such as target compressed packets). Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.
[0039] The rare character processing system embodiments provided in this specification and the rare character processing methods described in one or more embodiments belong to the same concept. The execution entity corresponding to the rare character processing method involved in one or more embodiments of this specification can be the electronic device corresponding to the aforementioned service platform 100; the execution entity corresponding to the rare character processing method involved in one or more embodiments of this specification can also be the electronic device corresponding to the client, specifically determined based on the actual application environment. The implementation process of the rare character processing system embodiments can be detailed in the following method embodiments, and will not be repeated here.
[0040] based on Figure 1 The following is a detailed description of the method for handling rare characters provided in one or more embodiments of this specification, as illustrated in the scene diagram.
[0041] Please see Figure 2 This document provides a flowchart illustrating a method for processing uncommon characters, one or more embodiments of which can be implemented using a computer program and run on an uncommon character processing device based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application. The uncommon character processing device can be an electronic device.
[0042] Specifically, the methods for handling rare characters include:
[0043] S102: Detect a target rare character to be updated for the rare character library, and obtain the target rare character code corresponding to the target rare character;
[0044] In one or more embodiments of this specification, a character set is a collection of multiple characters. There are many types of character sets, and the number of characters contained in each character set varies. Common character set names include: ASCII character set, GB2312 character set, BIG5 character set, GB18030 character set, Unicode character set, etc.
[0045] It is understandable that users may encounter situations requiring the use of uncommon characters in daily character-based applications. Uncommon characters can be categorized into two types: those unfamiliar to individuals and those unrecognizable by information systems. In one or more embodiments of this specification, uncommon characters primarily refer to characters (such as Chinese characters) that cannot currently be normally input, stored, or displayed on institutional business systems, personal computers, mobile terminals, or other devices. In some scenarios, these uncommon characters can be understood as characters not found in the character set library supported by the service provider or device. In such cases, the service provider or device will be unable to recognize these uncommon characters not in its supported character set library.
[0046] In some implementation scenarios, rare characters (characters) mainly refer to characters that are not within the range of commonly used character encoding sets. For example, characters that are not within the range of commonly used GBK character (encoding) sets can be regarded as rare characters. Usually, common devices support the GBK character (encoding) set.
[0047] The rare character library is a pre-maintained rare character (set) encoding library that stores rare characters and their encoding information. Usually, when users intend to input rare characters using character input components (such as input method components), they will use the rare character encoding in the rare character library.
[0048] The target rare character is the rare character object to be updated in the rare character library. The target rare character can be a rare character (object) that already exists in the rare character library, or a rare character (object) that does not exist in the rare character library;
[0049] The target rare character encoding is the rare character encoding data of the target rare character pair to be updated;
[0050] In a demonstrative sense, a target user (such as a font library maintenance user or a font library user) can initiate an encoding update request for a rare character library to an electronic device through a corresponding terminal device. The encoding update request can carry the rare character information to be updated by the target user for the rare character library. Upon receiving the encoding update request, the electronic device can detect the rare character information to be updated by the target user for the rare character library. The electronic device can determine the target rare character (object) to be updated from the rare character information and obtain the rare character encoding corresponding to the target rare character.
[0051] As an illustration, the target user (such as the font library maintenance user or the font library user) can initiate an encoding update request for the uncommon font library to the electronic device through the corresponding terminal device. When the electronic device receives the encoding update request, it can obtain the target uncommon character (object) to be updated for the uncommon font library and the target uncommon character encoding corresponding to the target uncommon character (object) from the terminal device corresponding to the target user.
[0052] S104: Determine the target rare character encoding plane corresponding to the target rare character encoding, and update the rare character library by using the target rare character encoding plane based on the target rare character encoding;
[0053] In one or more embodiments of this specification, the rare character library is not a separate data character library. Instead, the rare character library corresponds to one or more rare character encoding planes. The rare character library and the rare character encoding planes are used in conjunction. Each rare character encoding plane can be an independently formed encoding plane based on rare characters under a certain rare encoding type in the rare character library and their corresponding rare character codes. Different rare character encoding planes correspond to different rare encoding types.
[0054] For example, such as Figure 3 As shown, Figure 3 This is a schematic diagram of a scenario where multiple encoding planes are used to represent rare characters. Figure 3 As shown in the diagram, the rare character library is associated with multiple rare character encoding planes, such as encoding type 1 plane, encoding type 2 plane, ..., encoding type n plane, where n is a positive integer. Any rare character encoding plane can be an independent encoding plane formed based on rare characters under a certain rare encoding type in the rare character library and their corresponding rare character codes. Different rare character encoding planes correspond to different rare encoding types. In other words, any rare character encoding plane corresponding to a rare encoding type integrates the rare character code data of all or part of the rare characters under that rare encoding type, and the rare character encoding plane corresponding to a certain rare encoding type does not contain the encoding data of rare characters of other rare encoding types besides "that rare encoding type".
[0055] Optionally, the encoding plane for rare characters in the rare character library can be expanded according to the rare character encoding type;
[0056] This example illustrates how combining a rare character library with several rare character encoding planes enables online, real-time, and rapid updates to the rare character library when encoding updates are needed, without requiring updates based on the library version. This shortens the cycle of updating rare character encodings and improves the efficiency of rare character processing.
[0057] Among them, the rare encoding type can be understood as the specific encoding standard for rare characters; the rare encoding type includes, but is not limited to, one or more of the following: "all uppercase pinyin" encoding type, "first letter uppercase pinyin" encoding type, "lowercase pinyin" encoding type, "pinyin with full-angle brackets" encoding type, "pinyin with half-angle brackets" encoding type, "pinyin with square brackets" encoding type, "pinyin with / without tone" encoding type, "one character split into multiple characters" encoding type, etc.
[0058] The target rare character plane is the rare character plane determined from several rare character encoding planes corresponding to the rare character library for encoding update. The encoding update of the rare character library can be completed based on the target rare character plane.
[0059] Specifically, after the electronic device determines the target rare character encoding plane corresponding to the target rare character encoding from several rare character encoding planes corresponding to the rare character library, it then performs encoding update processing on the rare character library based on the target rare character encoding and the target rare character encoding plane.
[0060] Optionally, the electronic device may determine the target rare character encoding plane based on the target rare character encoding type;
[0061] Optionally, the electronic device may allocate a target rare character encoding plane from several rare character encoding planes for the target rare character encoding;
[0062] In a schematic way, an electronic device can request an encoding update from the target encoding management and maintenance service corresponding to the target rare character encoding plane. Through the target encoding management and maintenance service, the target rare character encoding corresponding to the target rare character is submitted to the target rare character encoding platform. The target rare character encoding plane will update the target rare character encoding to realize the addition of the target rare character encoding, thereby completing the encoding update process of rare characters in the rare character library.
[0063] Optionally, in actual rare character input scenarios, rare character libraries and several rare character encoding planes can be used together. When a rare character is input using a character input component, the character input component can call the rare character library. If the rare character library supports the rare character, it can index the rare character encoding data of the "rare character" from a rare character encoding plane associated with the rare character library, and complete the display loading or output processing of the "rare character" based on the rare character encoding data.
[0064] In one or more embodiments of this specification, when an electronic device detects a target rare character to be updated for a rare character library, it obtains the target rare character code corresponding to the target rare character, determines the target rare character encoding plane corresponding to the target rare character code, and performs encoding update processing on the rare character library based on the target rare character code and the target rare character encoding plane. By determining the form of the target rare character encoding plane for the rare character library, updates according to the font library version are avoided. Online encoding update, real-time encoding update, and fast encoding update of the rare character library can be realized, improving the efficiency of rare character processing, enhancing user experience, and reducing font library management costs.
[0065] Please see Figure 4 , Figure 4 This is a flowchart illustrating another embodiment of a method for processing rare characters proposed in one or more embodiments of this specification. Specifically:
[0066] S202: A target rare character to be updated for the rare character library is detected, and the target rare character code corresponding to the target rare character is obtained;
[0067] For details, please refer to one or more embodiments of this specification for the method steps, which will not be repeated here.
[0068] S204: Determine the target rare character encoding type corresponding to the target rare character encoding;
[0069] Indicatively, electronic devices can determine the target rare character encoding plane based on the target rare character encoding type.
[0070] S206: Obtain at least one rare character encoding plane corresponding to the rare character library, and determine the target rare character encoding plane corresponding to the target rare character encoding type from the at least one rare character encoding plane;
[0071] Schematic, the electronic device performing the task of determining the target rare character encoding plane corresponding to the target rare character encoding type from the at least one rare character encoding plane can be:
[0072] SA2: The electronic device detects whether the target rare code type exists in at least one rare character encoding plane corresponding to a rare code type;
[0073] SA4: If a target rare character encoding type exists in the rare character encoding type, then determine the target rare character encoding plane corresponding to the target rare character encoding type from at least one rare character encoding plane.
[0074] Understandably, a rare character library is associated with several rare character encoding planes. Among the rare character encoding types corresponding to these rare character encoding planes, there exists a target rare character encoding type. In this case, the rare character encoding planes contain the rare character encoding plane corresponding to the target rare character encoding type, which is the target rare character encoding plane. Usually, in this situation, the rare character library may contain rare characters that support the target rare character encoding type.
[0075] S208: Detect whether the target rare character encoding plane contains the original rare character encoding of the target rare character;
[0076] The original rare character encoding refers to the source rare character encoding data corresponding to the target rare character in the rare character library, or it can be understood as the existing rare character encoding data corresponding to the target rare character in the rare character library.
[0077] Indicatively, the target rare character encoding plane consists of rare character codes corresponding to several rare characters of the target rare character encoding type. By searching the existing rare character codes in the target rare character encoding plane, it is possible to detect whether the original rare character code of the target rare character exists in the target rare character encoding plane.
[0078] Indicatively, the target rare character encoding plane typically consists of rare characters (objects) and rare character encodings of the target rare character encoding type corresponding to the rare characters (objects). The aforementioned detection can use rare characters (objects) as the detection method. Therefore, the detection of the original rare character encoding of the target rare character can be achieved by detecting whether the target rare character encoding plane contains the target rare character (object).
[0079] For example, if the target rare character encoding plane contains an index of the target rare character (object), then there exists a native rare character encoding for the target rare character; if the target rare character encoding plane does not contain an index of the target rare character (object), then there is no native rare character encoding for the target rare character in the target rare character encoding plane.
[0080] S210: If the target rare character encoding plane contains the original rare character encoding, then the original rare character encoding is updated based on the target rare character encoding;
[0081] In a schematic way, an electronic device can request an encoding update from the target encoding management and maintenance service corresponding to the target rare character encoding plane. Through the target encoding management and maintenance service, the target rare character encoding corresponding to the target rare character is submitted to the target rare character encoding platform. The target rare character encoding plane will update the target rare character encoding to realize the addition of the target rare character encoding, thereby completing the encoding update process of rare characters in the rare character library.
[0082] Furthermore, electronic devices can request the target encoding management and maintenance service to request an encoding update, instructing the target encoding management and maintenance service to first compare whether the original rare character encoding is consistent with the target rare character encoding. If they are consistent, it means that no encoding update is required. If they are different, the target rare character encoding can replace the original rare character encoding, or the target rare character encoding can be added directly on the basis of the original rare character encoding without replacing it.
[0083] Understandably, the rare character encoding plane is maintained by the corresponding encoding management and maintenance service. For example, the encoding management can be implemented by the platform side where the encoding management and maintenance service is located. The platform side where the encoding management and maintenance service is located manages all rare character encodings under the rare character encoding plane and for one or more specified rare character encoding types in the rare character library.
[0084] In one or more embodiments of this specification, a rare character library and a rare character encoding plane are used together. The rare character encoding plane can be a component of the rare character library, or it can be component data independent of the rare character library. Optionally, the rare character library may include at least rare characters, and the rare character encoding plane may include at least a number of rare characters corresponding to a certain rare encoding type.
[0085] S212: If the target rare character encoding plane does not have the original rare character encoding, then submit an encoding addition request to the target rare character encoding plane, and add the target rare character encoding of the target rare character in the target rare character encoding plane based on the encoding addition request.
[0086] Indicatively, the absence of the native rare character encoding in the target rare character encoding plane indicates that the target rare character in the rare character library does not contain an encoding of the target rare character encoding type. The electronic device can submit an encoding addition request to the target rare character encoding plane, and the target rare character encoding of the target rare character can be added to the target rare character encoding plane by controlling the target rare character encoding plane.
[0087] SA6: If the target rare character encoding type does not exist in the rare character encoding type, then construct a target rare character encoding plane for the target rare character encoding type for the rare character library.
[0088] Understandably, a rare character library is associated with several rare character encoding planes. If the target rare character encoding type is not present in any of the rare character encoding types corresponding to these rare character encoding planes, then the rare character encoding planes do not contain the target rare character encoding plane. In other words, the rare character library may contain the target rare character, but the rare character encoding plane does not contain the rare character encoding type corresponding to the target rare character encoding of the target rare character to be updated. Alternatively, the rare character library may contain other rare characters that support the target rare character encoding type, but the target rare character in the rare character library does not support the target rare character encoding type, or the rare character library does not contain the target rare character. In this case, the target rare character encoding is the encoding data for a newly added rare character encoding type for the target rare character in the rare character library. At this time, the electronic device can create a new target rare character encoding plane for the target rare character encoding type for the rare character library. In some embodiments, if the rare character library does not contain the target rare character, then the target rare character needs to be added to the rare character library.
[0089] Furthermore, the electronic device constructs a target rare character encoding plane for the target rare character type based on the rare character library. Then, it associates the target rare character and the target rare code of the target rare character corresponding to the target rare character encoding type with the target rare character encoding plane. For example, the target rare character and the target rare code of the target rare character corresponding to the target rare character encoding type can be written into the target rare character encoding plane. It can be understood that the target rare character encoding plane is currently based on the encoding of the target rare character and the target rare character corresponding to the target rare character encoding type. In subsequent updates to the rare character library, the encodings of other rare characters belonging to the target rare character encoding type can be added.
[0090] In one or more embodiments of this specification, when an electronic device detects a target rare character to be updated for a rare character library, it obtains the target rare character code corresponding to the target rare character, determines the target rare character encoding plane corresponding to the target rare character code, and performs encoding update processing on the rare character library based on the target rare character code and the target rare character encoding plane. By determining the form of the target rare character encoding plane for the rare character library, updates according to the font library version are avoided. Online encoding update, real-time encoding update, and fast encoding update of the rare character library can be realized, improving the efficiency of rare character processing, enhancing user experience, and reducing font library management costs.
[0091] Exemplary examples are found in one or more embodiments of this specification. Figure 5 A flowchart illustrating an exemplary character library detection process is provided. Before determining the target rare character encoding plane corresponding to the target rare character encoding, the process further includes:
[0092] S3002: Detect whether the target rare character exists in the rare character library;
[0093] In one or more embodiments of this specification, the electronic device can also detect whether a target rare character (object) exists in the rare character library; for example, after detecting a target rare character to be updated for the rare character library, and obtaining the target rare character code corresponding to the target rare character, S3002 is executed.
[0094] S3004: If the target rare character exists in the rare character library, then the step of determining the target rare character encoding plane corresponding to the target rare character encoding is executed;
[0095] S3006: If the target rare character does not exist in the rare character library, then add the target rare character to the rare character library and execute the step of determining the target rare character encoding plane corresponding to the target rare character encoding.
[0096] In one or more embodiments of this specification, the electronic device detects whether a target rare character (object) exists in the rare character library. If the target rare character does not exist in the rare character library, the electronic device adds the target rare character to the rare character library and then executes the step of determining the target rare character encoding plane corresponding to the target rare character encoding as described in one or more embodiments of this specification.
[0097] Exemplary examples are found in one or more embodiments of this specification. Figure 6 A flowchart illustrating the construction of a rare character encoding plane;
[0098] S4002: Obtain information on multiple rare characters, wherein the rare character information includes the rare character, the rare character code corresponding to the rare character, and the rare character code type corresponding to the rare character code;
[0099] Understandably, electronic devices can obtain a large amount of rare character information from online platforms, reference books, and written books in advance in actual application scenarios. The rare character information consists of rare characters (objects), rare character codes corresponding to rare characters, and rare code types corresponding to rare character codes.
[0100] S4004: Based on the rare character information, construct a rare character library containing at least one rare character and a rare character encoding plane corresponding to the rare character encoding type.
[0101] In a schematic way, at least a rare character library can be constructed based on several rare characters (objects) in the rare character information. The rare characters (objects) can usually be represented in the form of glyph data. For example, a rare character library can be constructed based on rare characters (objects), and the rare character library contains all rare characters (objects). Alternatively, a rare character library can be constructed based on rare characters (objects) and the rare codes of all rare encoding types corresponding to the rare characters (objects).
[0102] Indicatively, when an electronic device performs the process of constructing a rare character library containing at least one rare character and a rare character encoding plane corresponding to the rare character encoding type based on the rare character information, it may be as follows:
[0103] The electronic device acquires at least one rare character encoding type corresponding to multiple rare character information, and determines the rare character encoding plane associated with the rare character library based on each rare character encoding type;
[0104] The electronic device then performs encoding association processing on the reference rare characters of the same rare encoding type and the reference rare character codes corresponding to the reference rare characters, and the rare character encoding plane corresponding to the rare encoding type.
[0105] In a schematic way, an electronic device can first determine i (where i is a positive integer) rare character encoding types corresponding to all rare characters using information on several rare characters. For each rare character encoding type, a rare character encoding plane is constructed and associated with a rare character library. After constructing the rare character encoding plane, reference rare characters of the same rare character encoding type and their corresponding reference rare character encodings are determined in the rare character information. Then, the reference rare characters of the same rare character encoding type and their corresponding reference rare character encodings are added to the rare character encoding plane to achieve encoding association.
[0106] Understandably, by combining a rare character library with several rare character encoding planes, online, real-time, and rapid updates to the rare character library can be achieved when there is a need for encoding updates, without having to update according to the character library version. This shortens the cycle of updating rare character libraries with rare encodings, enables more precise real-time updates of the character library at the character dimension, and improves the efficiency of rare character processing.
[0107] The following will combine Figure 7 This manual provides a detailed introduction to the uncommon character processing device. It should be noted that... Figure 7 The uncommon character processing device shown is used to execute this instruction manual. Figures 1-6 The methods of the embodiments shown are illustrated only in connection with this specification for ease of explanation. For specific technical details not disclosed, please refer to this specification. Figures 1-6 The example shown.
[0108] Please see Figure 7 This diagram illustrates the structure of the uncommon character processing device described in this specification. The uncommon character processing device 1 can be implemented as all or part of a user terminal through software, hardware, or a combination of both. According to some embodiments, the uncommon character processing device 1 includes an update detection module 11 and an encoding update module 12, specifically used for:
[0109] Update detection module 11 is used to detect the target rare character to be updated for the rare character library and obtain the target rare character code corresponding to the target rare character;
[0110] Encoding update module 12 is used to determine the target rare character encoding plane corresponding to the target rare character encoding, and to perform encoding update processing on the rare character library based on the target rare character encoding and the target rare character encoding plane.
[0111] Optional, such as Figure 8 As shown, the encoding update module 12 is used for:
[0112] The type determination unit 121 is used to determine the target rare character encoding type corresponding to the target rare character encoding;
[0113] The plane determination unit 122 is used to obtain at least one rare character encoding plane corresponding to the rare character library, and determine the target rare character encoding plane corresponding to the target rare character encoding type from the at least one rare character encoding plane.
[0114] Optionally, the plane determination unit 122 is used for:
[0115] Detect whether the target rare character encoding type exists in the rare character encoding type corresponding to the at least one rare character encoding plane;
[0116] If the target rare character encoding type exists among the rare character encoding types, then the target rare character encoding plane corresponding to the target rare character encoding type is determined from the at least one rare character encoding plane.
[0117] Optionally, the encoding update module 12 is used for:
[0118] Detect whether the target rare character encoding plane contains the original rare character encoding of the target rare character;
[0119] If the target rare character encoding plane contains the original rare character encoding, then the original rare character encoding is updated based on the target rare character encoding;
[0120] If the target rare character encoding plane does not contain the original rare character encoding, then a new encoding request is submitted to the target rare character encoding plane, and based on the new encoding request, a target rare character encoding for the target rare character is added to the target rare character encoding plane.
[0121] Optionally, the plane determination unit 122 is used for:
[0122] If the target rare character encoding type does not exist in the rare character encoding type, then construct a target rare character encoding plane for the target rare character encoding type for the rare character library.
[0123] Optionally, the plane determination unit 122 is used for:
[0124] Submit a new encoding request to the target rare character encoding plane, and add a target rare character encoding for the target rare character in the target rare character encoding plane based on the new encoding request.
[0125] Optionally, the device 1 is further configured to:
[0126] Detect whether the target rare character exists in the rare character database;
[0127] If the target rare character exists in the rare character library, then the step of determining the target rare character encoding plane corresponding to the target rare character encoding is performed;
[0128] If the target rare character does not exist in the rare character library, then the target rare character is added to the rare character library, and the step of determining the target rare character encoding plane corresponding to the target rare character encoding is performed.
[0129] Optionally, the device 1 is further configured to:
[0130] Obtain information on multiple uncommon characters, wherein the uncommon character information includes the uncommon character, the uncommon character code corresponding to the uncommon character, and the uncommon code type corresponding to the uncommon character code;
[0131] Based on the rare character information, a rare character library containing at least one rare character and a rare character encoding plane corresponding to the rare character encoding type are constructed.
[0132] Optionally, the device 1 is further configured to:
[0133] Obtain at least one rare character encoding type corresponding to multiple rare character information, and determine the rare character encoding plane associated with the rare character library based on each rare character encoding type;
[0134] The reference rare characters of the same rare encoding type and their corresponding reference rare character codes are associated with the rare character encoding plane corresponding to the rare encoding type.
[0135] It should be noted that the rare character processing device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the rare character processing method. In practical 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. In addition, the rare character processing device and the rare character processing method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0136] The serial numbers in this specification are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0137] In this specification, ...
[0138] This specification also provides a computer storage medium capable of storing multiple instructions adapted to be loaded and executed by a processor as described above. Figures 1-6 The method for handling rare characters in the illustrated embodiment can be found in the following documentation for a detailed execution process: Figures 1-6 The specific details of the illustrated embodiments will not be elaborated here.
[0139] This specification also provides a computer program product that stores at least one instruction, said at least one instruction being loaded and executed by the processor as described above. Figures 1-6 The method for handling rare characters in the illustrated embodiment can be found in the following documentation for a detailed execution process: Figures 1-6 The specific details of the illustrated embodiments will not be elaborated here.
[0140] Please refer to Figure 9 This diagram illustrates a structural block diagram of an electronic device provided in an exemplary embodiment of this specification. The electronic device in this specification may include one or more components such as a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected via the bus 150.
[0141] Processor 110 may include one or more processing cores. Processor 110 connects to various parts of the electronic device via various interfaces and lines, and performs various functions and processes data of electronic device 100 by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 110 may integrate one or more of the following: central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately through a communication chip.
[0142] The memory 120 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 120 may include a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described below, etc. The operating system may be the Android system, including systems deeply developed based on the Android system, the iOS system developed by Apple Inc., including systems deeply developed based on the iOS system, or other systems. The data storage area may also store data created by the electronic device during use, such as phonebook data, audio and video data, chat log data, etc.
[0143] See Figure 10As shown, the memory 120 can be divided into operating system space and user space. The operating system runs in the operating system space, while native and third-party applications run in the user space. To ensure that different third-party applications can achieve good running performance, the operating system allocates corresponding system resources for each application. However, different application scenarios within the same third-party application have different requirements for system resources. For example, in local resource loading scenarios, third-party applications have high requirements for disk read speed; in animation rendering scenarios, third-party applications have high requirements for GPU performance. Since the operating system and third-party applications are independent of each other, the operating system often cannot promptly perceive the current application scenario of a third-party application, resulting in the operating system's inability to adapt system resources accordingly to the specific application scenario of the third-party application.
[0144] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to establish data communication between the third-party applications and the operating system. This would allow the operating system to obtain the current scenario information of the third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0145] Taking the Android operating system as an example, the programs and data stored in memory 120 are as follows: Figure 11As shown, the memory 120 can store the Linux kernel layer 320, the system runtime library layer 340, the application framework layer 360, and the application layer 380. The Linux kernel layer 320, system runtime library layer 340, and application framework layer 360 belong to the operating system space, while the application layer 380 belongs to the user space. The Linux kernel layer 320 provides low-level drivers for various hardware components of the electronic device, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, and power management. The system runtime library layer 340 provides support for key features of the Android system through several C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D graphics support, and the Webkit library provides browser kernel support. The system runtime library layer 340 also provides the Android runtime library, which mainly provides core libraries that allow developers to write Android applications using the Java language. The Application Framework Layer 360 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application runs in the Application Layer 380. These applications can be native applications that come with the operating system, such as contacts, SMS, clock, and camera apps; or third-party applications developed by third-party developers, such as games, instant messaging, and photo editing apps.
[0146] Taking the operating system as an example (iOS), the programs and data stored in memory 120 are as follows: Figure 12As shown, the iOS system includes: Core OS layer 420, Core Services layer 440, Media layer 460, and Cocoa Touch layer 480. Core OS layer 420 includes the operating system kernel, drivers, and low-level program frameworks. These low-level program frameworks provide hardware-level functionality for use by the program frameworks located in Core Services layer 440. Core Services layer 440 provides system services and / or program frameworks required by applications, such as Foundation framework, account framework, advertising framework, data storage framework, network connectivity framework, geolocation framework, motion framework, etc. Media layer 460 provides applications with audiovisual interfaces, such as interfaces related to graphics and images, audio technology, video technology, and AirPlay (wireless playback of audio and video transmission technologies). Cocoa Touch layer 480 provides various commonly used interface-related frameworks for application development and is responsible for user touch interaction on electronic devices. Examples include local notification services, remote push services, advertising frameworks, game tool frameworks, message user interface (UI) frameworks, UIKit frameworks, map frameworks, and so on.
[0147] exist Figure 12 The framework shown includes, but is not limited to, the base framework in the core service layer 440 and the UIKit framework in the touchable layer 480. The base framework provides many basic object classes and data types, offering the most basic system services to all applications, and is independent of the UI. The UIKit framework, on the other hand, provides a basic UI class library for creating touch-based user interfaces. iOS applications can use the UIKit framework to provide their UI, thus providing the application's infrastructure for building user interfaces, drawing, handling user interaction events, responding to gestures, and so on.
[0148] The methods and principles for implementing data communication between third-party applications and the operating system in the iOS system can be found in the Android system, and will not be repeated here.
[0149] The input device 130 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 140 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined into a touch screen, which is used to receive touch operations from the user using a finger, stylus, or any suitable object on or near it, and to display the user interface of various applications. The touch screen is usually located on the front panel of the electronic device. The touch screen can be designed as a full-screen, curved screen, or irregularly shaped screen. The touch screen can also be designed as a combination of a full-screen and a curved screen, or a combination of an irregularly shaped screen and a curved screen; this specification does not limit this.
[0150] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WiFi) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.
[0151] In this specification, the entity executing each step can be the electronic device described above. Optionally, the entity executing each step can be the operating system of the electronic device. The operating system can be Android, iOS, or other operating systems; this specification does not limit this.
[0152] The electronic device described in this manual may also be equipped with a display device. This display device can be any device capable of displaying information, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an e-ink screen, a liquid crystal display (LCD), or a plasma display panel (PDP). Users can use the display device on electronic device 101 to view displayed text, images, videos, and other information. The electronic device may be a smartphone, tablet computer, gaming device, AR (Augmented Reality) device, automobile, data storage device, audio playback device, video playback device, laptop, desktop computing device, or wearable device such as an electronic watch, electronic glasses, electronic helmet, electronic bracelet, electronic necklace, or electronic clothing.
[0153] exist Figure 9 In the illustrated electronic device, the processor 110 can be used to call the application program stored in the memory 120 and specifically perform the following operations:
[0154] A target rare character to be updated for a rare character library is detected, and the target rare character code corresponding to the target rare character is obtained;
[0155] Determine the target rare character encoding plane corresponding to the target rare character encoding, and update the rare character library using the target rare character encoding plane based on the target rare character encoding.
[0156] In one embodiment, the processor 110, when executing the process of determining the target rare character encoding plane corresponding to the target rare character encoding, includes:
[0157] Determine the target rare character encoding type corresponding to the target rare character encoding;
[0158] Obtain at least one rare character encoding plane corresponding to the rare character library, and determine the target rare character encoding plane corresponding to the target rare character encoding type from the at least one rare character encoding plane.
[0159] In one embodiment, the processor 110, when performing the step of determining the target rare character encoding plane corresponding to the target rare character encoding type from the at least one rare character encoding plane, executes the following steps:
[0160] Detect whether the target rare character encoding type exists in the rare character encoding type corresponding to the at least one rare character encoding plane;
[0161] If the target rare character encoding type exists among the rare character encoding types, then the target rare character encoding plane corresponding to the target rare character encoding type is determined from the at least one rare character encoding plane.
[0162] In one embodiment, when the processor 110 performs the encoding update process for the rare character library based on the target rare character encoding and using the target rare character encoding plane, it executes the following steps:
[0163] Detect whether the target rare character encoding plane contains the original rare character encoding of the target rare character;
[0164] If the target rare character encoding plane contains the original rare character encoding, then the original rare character encoding is updated based on the target rare character encoding;
[0165] If the target rare character encoding plane does not contain the original rare character encoding, then a new encoding request is submitted to the target rare character encoding plane, and based on the new encoding request, a target rare character encoding for the target rare character is added to the target rare character encoding plane.
[0166] In one embodiment, the processor 110 further performs the following steps when executing the rare character processing method:
[0167] If the target rare character encoding type does not exist in the rare character encoding type, then construct a target rare character encoding plane for the target rare character encoding type for the rare character library.
[0168] In one embodiment, when the processor 110 performs the encoding update process for the rare character library based on the target rare character encoding and using the target rare character encoding plane, it executes the following steps:
[0169] Submit a new encoding request to the target rare character encoding plane, and add a target rare character encoding for the target rare character in the target rare character encoding plane based on the new encoding request.
[0170] In one embodiment, before executing the step of determining the target rare character encoding plane corresponding to the target rare character encoding, the processor 110 further includes:
[0171] Detect whether the target rare character exists in the rare character database;
[0172] If the target rare character exists in the rare character library, then the step of determining the target rare character encoding plane corresponding to the target rare character encoding is performed;
[0173] If the target rare character does not exist in the rare character library, then the target rare character is added to the rare character library, and the step of determining the target rare character encoding plane corresponding to the target rare character encoding is performed.
[0174] In one embodiment, the processor 110 further performs the following steps when executing the rare character processing method:
[0175] Obtain information on multiple uncommon characters, wherein the uncommon character information includes the uncommon character, the uncommon character code corresponding to the uncommon character, and the uncommon code type corresponding to the uncommon character code;
[0176] Based on the rare character information, a rare character library containing at least one rare character and a rare character encoding plane corresponding to the rare character encoding type are constructed.
[0177] In one embodiment, the processor 110, when executing the step of constructing a rare character library containing at least one rare character and a rare character encoding plane corresponding to the rare character encoding type based on the rare character information, performs the following steps:
[0178] Obtain at least one rare character encoding type corresponding to multiple rare character information, and determine the rare character encoding plane associated with the rare character library based on each rare character encoding type;
[0179] The reference rare characters of the same rare encoding type and their corresponding reference rare character codes are associated with the rare character encoding plane corresponding to the rare encoding type.
[0180] In one or more embodiments of this specification, when an electronic device detects a target rare character to be updated for a rare character library, it obtains the target rare character code corresponding to the target rare character, determines the target rare character encoding plane corresponding to the target rare character code, and performs encoding update processing on the rare character library based on the target rare character code and the target rare character encoding plane. By determining the form of the target rare character encoding plane for the rare character library, updates according to the font library version are avoided. Online encoding update, real-time encoding update, and fast encoding update of the rare character library can be realized, improving the efficiency of rare character processing, enhancing user experience, and reducing font library management costs.
[0181] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0182] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the information on rare characters and target rare characters involved in this specification were obtained with full authorization.
[0183] The above-disclosed embodiments are merely preferred embodiments of this specification and should not be construed as limiting the scope of this specification. Therefore, any equivalent variations made in accordance with the claims of this specification shall still fall within the scope of this specification.
Claims
1. A method for processing uncommon characters, the method comprising: A target rare character to be updated for a rare character library is detected, and the target rare character code corresponding to the target rare character is obtained; Determine the target rare character encoding plane corresponding to the target rare character encoding, and update the rare character library using the target rare character encoding plane based on the target rare character encoding; The rare character library is associated with multiple rare character encoding planes. Different rare character encoding planes correspond to different rare character encoding types. Any rare character encoding plane is an encoding plane constructed based on rare characters under rare character encoding types in the rare character library and the rare character encodings corresponding to those rare characters.
2. The method according to claim 1, wherein determining the target rare character encoding plane corresponding to the target rare character encoding includes: Determine the target rare character encoding type corresponding to the target rare character encoding; Obtain at least one rare character encoding plane corresponding to the rare character library, and determine the target rare character encoding plane corresponding to the target rare character encoding type from the at least one rare character encoding plane.
3. The method according to claim 2, wherein determining the target rare character encoding plane corresponding to the target rare character encoding type from the at least one rare character encoding plane comprises: Detect whether the target rare character encoding type exists in the rare character encoding type corresponding to the at least one rare character encoding plane; If the target rare character encoding type exists among the rare character encoding types, then the target rare character encoding plane corresponding to the target rare character encoding type is determined from the at least one rare character encoding plane.
4. The method according to claim 3, wherein the step of updating the rare character library by using the target rare character encoding plane based on the target rare character encoding includes: Detect whether the target rare character encoding plane contains the original rare character encoding of the target rare character; If the target rare character encoding plane contains the original rare character encoding, then the original rare character encoding is updated based on the target rare character encoding; If the target rare character encoding plane does not contain the original rare character encoding, then a new encoding request is submitted to the target rare character encoding plane, and based on the new encoding request, a target rare character encoding for the target rare character is added to the target rare character encoding plane.
5. The method according to claim 3, further comprising: If the target rare character encoding type does not exist in the rare character encoding type, then construct a target rare character encoding plane for the target rare character encoding type for the rare character library.
6. The method according to claim 5, wherein the step of updating the rare character library by using the target rare character encoding plane based on the target rare character encoding includes: Submit a new encoding request to the target rare character encoding plane, and add a target rare character encoding for the target rare character in the target rare character encoding plane based on the new encoding request.
7. The method according to claim 1, further comprising, before determining the target rare character encoding plane corresponding to the target rare character encoding: Detect whether the target rare character exists in the rare character database; If the target rare character exists in the rare character library, then the step of determining the target rare character encoding plane corresponding to the target rare character encoding is performed; If the target rare character does not exist in the rare character library, then the target rare character is added to the rare character library, and the step of determining the target rare character encoding plane corresponding to the target rare character encoding is performed.
8. The method according to claim 1, further comprising: Obtain information on multiple uncommon characters, wherein the uncommon character information includes the uncommon character, the uncommon character code corresponding to the uncommon character, and the uncommon code type corresponding to the uncommon character code; Based on the rare character information, a rare character library containing at least one rare character and a rare character encoding plane corresponding to the rare character encoding type are constructed.
9. The method according to claim 8, wherein constructing a rare character library containing at least one rare character and a rare character encoding plane corresponding to the rare character encoding type based on the rare character information comprises: Obtain at least one rare character encoding type corresponding to multiple rare character information, and determine the rare character encoding plane associated with the rare character library based on each rare character encoding type; The reference rare characters of the same rare encoding type and their corresponding reference rare character codes are associated with the rare character encoding plane corresponding to the rare encoding type.
10. A device for processing uncommon characters, the device comprising: The update detection module is used to detect the target rare character to be updated for the rare character library and obtain the target rare character code corresponding to the target rare character; The encoding update module is used to determine the target rare character encoding plane corresponding to the target rare character encoding, and to perform encoding update processing on the rare character library based on the target rare character encoding and the target rare character encoding plane; The rare character library is associated with multiple rare character encoding planes. Different rare character encoding planes correspond to different rare character encoding types. Any rare character encoding plane is an encoding plane constructed based on rare characters under rare character encoding types in the rare character library and the rare character encodings corresponding to those rare characters.
11. A computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the method steps of any one of claims 1 to 9.
12. A computer program product storing at least one instruction, said at least one instruction being loaded by a processor and executing the method steps of any one of claims 1 to 9.
13. An electronic device, comprising: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 9.
Citation Information
Patent Citations
Chinese character input method and Chinese character input system
CN102566769A
Method for obtaining rarely-used Chinese character library in basic geographic information data
CN105183844A