A method, system and storage medium for Chinese character input state multiplexing and dynamic candidate sorting

CN122816477APending Publication Date: 2026-09-25LANZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611028360.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2026-03-31
Filing Date
2026-07-10
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

候选排序多依赖静态词频或简单用户频率,缺乏多因素协同动态调整,导致生僻字在精确匹配时仍被高频字淹没,用户选择成本增加

Benefits of technology

[0021]第一,显著减少重复输入操作。通过功能键继承、功能键重复及组合键机制,连续同偏旁字输入可减少约百分之七十按键。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application discloses a Chinese character input state multiplexing and dynamic candidate sorting method and system, and a storage medium. The method records last screened Chinese character information and a current input coding sequence by maintaining an input state buffer, and when a preset multiplexing trigger operation is detected, coding inheritance, component repetition or whole word repetition operations are performed, and a multi-factor weighting model is used to dynamically sort a candidate set, wherein an accurate matching candidate obtains an additional weight score. The system uses an incremental update and coding cache mechanism to realize low delay output, and the average key response delay is controlled to be 0.29 milliseconds. Experimental results show that the method has a low key cost of 2.29 keys per word, a 100% input coverage rate and good real-time response performance, and is suitable for continuous Chinese character input, rare character retrieval and multi-scene switching scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human-computer interaction and text input, in particular to a state reuse mechanism, dynamic candidate ranking algorithm, interaction acceleration method, system and storage medium for Chinese character input. Background Art

[0002] Most existing Chinese character input methods focus on coding rules themselves, and have obvious deficiencies in interaction optimization during continuous input, which is specifically manifested as:

[0003] First, the cost of repeated input is high. Adjacent Chinese characters often share structures or components; for example, "江河湖海 (river, lake and sea)" all contain the three-water-side radical. However, existing input methods can hardly reuse input information, and users need to repeatedly input codes for the same component, which increases keystroke cost.

[0004] Second, candidate ranking is static. Candidate ranking mostly relies on static word frequency or simple user frequency, and lacks multi-factor cooperative dynamic adjustment, which causes rare Chinese characters to be submerged by high-frequency characters even in exact matching, increasing user selection cost.

[0005] Third, a fast reuse mechanism is missing. There is a lack of a unified shortcut key mechanism for high-frequency operations such as repeating the previous character and reusing the previous component, and users need to complete re-input, which reduces continuous input efficiency.

[0006] Fourth, response optimization is insufficient. Under multi-path input and complex candidate screening, it is difficult to balance delay control and real-time performance, which is particularly obvious in mobile terminal scenarios.

[0007] Fifth, path utilization is low. Different input paths including pure stroke paths, component-stroke paths, pure structure paths, pure component paths and association paths fail to form cooperative optimization, and each path operates independently without unified scheduling.

[0008] Therefore, there is a need for a Chinese character input method that can reuse historical states during input and combines multi-factor dynamic ranking and low-latency processing. Summary of the Invention

[0009] The purpose of the present invention is to provide a Chinese character input method and system that can reuse input states, reduce repeated keystrokes, dynamically optimize candidate ranking, and ensure low-latency response.

[0010] To achieve the above purpose, the present invention adopts the following technical solution.

[0011] A Chinese character input state reuse and dynamic candidate ranking method, comprising the following steps:

[0012] First, input state recording. During user input, the system maintains an input state buffer, recording the following information: the current encoding state, including the input sequence of structure, component, or stroke; the previously displayed Chinese character and its component sequence; the component sequence in the current input buffer; the candidate list and its sorting information; and the user's selection behavior history.

[0013] Second, state reuse triggering. When a preset trigger operation is detected, state reuse is performed, including: encoding inheritance operation, reusing the structure or component encoding of the previous input; component repetition operation, reusing the most recent component in the current buffer; repeating the previous character operation, directly reusing the previously displayed Chinese character; and combination reuse operation, simultaneously reusing the encoding and candidate. Preferably, the function keys include: function key one triggers the encoding inheritance operation; function key two triggers the component repetition operation; and the combination of function key one and function key two triggers the whole character repetition operation within a preset time window.

[0014] Third, candidate generation. Based on the current encoding state and multiplexing results, a candidate set is generated, including: candidates based on the current input encoding; candidates based on the multiplexing state; and candidates based on association or context prediction.

[0015] Fourth, multi-factor dynamic ranking. The candidate set is ranked, and the ranking factors include: word frequency (global frequency); user usage frequency; context probability (prediction score based on language model); encoding accuracy; and input path weights, including the priority of paths such as structure, components, and strokes.

[0016] Fifth, weighted exact match. When a rare character pattern or exact match condition is detected, additional weight is assigned to the exact match candidate to ensure that the exact match candidate is ranked first. Preferably, when the number of components and strokes of the candidate Chinese character is exactly the same as the number of input codes, the exact match weight is significantly increased, and the increase in the exact match weight is greater than the maximum fluctuation range of the basic word frequency weight.

[0017] Sixth, low-latency output. The candidate generation and sorting process is optimized by adopting an incremental update mechanism, reordering only candidates that have changed; an encoding caching mechanism is used to store hot codes and their candidate results in an in-memory hash table; and the average key response latency is controlled to within ten milliseconds.

[0018] A Chinese character input system includes a state management module, an input cache module, a candidate generation module, a sorting module, a weight update module, and an output module. The system is used to execute the aforementioned Chinese character input method.

[0019] A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the above-described Chinese character input method.

[0020] Compared with the prior art, the present invention has at least the following beneficial effects:

[0021] First, it significantly reduces repetitive input operations. Through function key inheritance, function key repetition, and combination key mechanisms, continuous input of characters with the same radical can reduce keystrokes by approximately 70%.

[0022] Second, it improves continuous input efficiency. The state reuse mechanism eliminates the need for re-entry when adjacent Chinese characters share components, reducing the average number of keystrokes per character in actual tests to 2.29.

[0023] Third, improve candidate hit rate. Multi-factor dynamic ranking combined with precise matching weighting achieves a first-prediction hit rate of over 85%.

[0024] Fourth, reduce user selection costs. Precisely matched candidates are prioritized and placed at the top, reducing the time users spend flipping through pages to find what they're looking for.

[0025] Fifth, maintain low latency response under complex input paths. Incremental updates and encoding caching are used to control the average key press latency to 0.29 milliseconds.

[0026] Sixth, it supports multi-path collaborative input. Structure, component, stroke, and associative paths are uniformly scheduled to improve input flexibility. Attached Figure Description

[0027] Figure 1 is a flowchart of the state reuse process of the present invention.

[0028] Figure 2 is a flowchart of the candidate sorting process of the present invention.

[0029] Figure 3 is a timing diagram of the shortcut key interaction of the present invention.

[0030] Figure 4 is a schematic diagram of the multi-factor ranking model of the present invention.

[0031] Figure 5 is a diagram of the low-latency output mechanism of the present invention. Detailed Implementation

[0032] The present invention will be further described below with reference to the embodiments, but the scope of protection of the present invention is not limited to the following embodiments.

[0033] Example 1: State Reuse Mechanism

[0034] The system records the following status information after each input, corresponding to the engine status structure:

[0035] Current input encoding sequence; current candidate list; selected candidate index; input mode; whether in sub-layer; confirmed text; previous displayed Chinese character; previous character component sequence.

[0036] When a user triggers a reuse operation, the system executes the following logic:

[0037] The first function key triggers code inheritance. Query the first component code of the last Chinese character that has been committed to the screen, fill the code into the current input buffer, trigger candidate query and update the display. Example: after inputting and committing "Jiang 江" to the screen, pressing the first function key automatically fills in the three-dot water radical component, then inputting "Gu 古" outputs "Hu 湖".

[0038] The second function key triggers component repetition. Query the most recently input component code in the current input buffer, copy and append the code to the buffer, trigger candidate query and update the display. Example: after inputting a structure key plus the "Kou 口" component, pressing the second function key changes the input to structure key plus "Kou 口" component plus "Kou 口" component, and the candidates are updated.

[0039] The combination key triggers repetition of the last character. After pressing the first function key, a timer is started, and the preset time window is 200 milliseconds to 500 milliseconds, preferably 200 milliseconds. If the signal of the second function key is received within the time window, repetition of the last character is executed, and the last Chinese character that has been committed to the screen is directly filled into the output buffer and committed to the screen. Example: after inputting and committing "Xie 谢" to the screen, pressing the combination of the first function key and the second function key outputs "Xiexie 谢谢".

[0040] Timeout processing. If the second function key is not received beyond the time window, the single-key function of the first function key, that is, code inheritance, is executed; the state is automatically reset after the timer times out.

[0041] Embodiment 2: Candidate sorting model

[0042] Candidate sorting adopts a multi-factor weighting model, and the sorting formula is:

[0043] Score = word frequency × 0.4 + user frequency × 0.3 + context prediction score × 0.2 + exact matching weight × 0.1.

[0044] Wherein:

[0045] Word frequency is global character frequency, read from the character library;

[0046] User frequency is the user's usage frequency, read from the user character library;

[0047] The context prediction score is the prediction probability based on a binary language model;

[0048] The exact matching weight is a weight dynamically assigned according to the matching degree.

[0049] The exact matching weighting rule in the rare character mode is:

[0050] If the number of strokes and the number of components completely match, add 100,000 points;

[0051] If only the number of strokes completely matches, add 50,000 points;

[0052] If only the number of components completely matches, add 30,000 points.

[0053] The bonus is greater than the maximum fluctuation range of the basic word frequency weight to ensure that the most accurate matching candidate is ranked first.

[0054] Example 3: Path Coordination Mechanism

[0055] The system supports multiple input paths, and each path participates in the recall process simultaneously during candidate generation and is evaluated uniformly during the ranking phase.

[0056] Pure stroke path, the trigger condition is the input of stroke key sequence, the candidate source is the stroke index, and the sorting weight is the basic weight;

[0057] The component is added to the stroke path, the triggering condition is the component code plus stroke filtering, the candidate source is the component index plus stroke filtering, and the sorting weight is the higher weight.

[0058] Pure structural path, the trigger condition is direct access via structural key, the candidate source is structural index, and the sorting weight is high weight;

[0059] Pure component path, triggered by direct access via component key, candidate source is component index, sorting weight is high weight;

[0060] The association path is triggered when the previous character appears on the screen, the candidate source is language model prediction, and the ranking weight is dynamic weight.

[0061] The state reuse path is triggered by a combination of function keys, the candidate source is the state buffer, and the sorting weight is the highest weight.

[0062] During candidate generation, all paths participate in the recall simultaneously. The system maintains a unified candidate pool and assigns different weights based on path type during the sorting phase.

[0063] Example 4: Low-latency output mechanism

[0064] To achieve low-latency response, the present invention employs the following optimization measures:

[0065] Encoding caching. A hash table is used as the encoding cache. During a query, the cache is checked first, and if a match is found, the candidate result is returned directly. If the cache is not found, the database is queried and the result is stored in the cache. When the capacity limit is reached, the cache is automatically cleaned up according to the least recently used strategy. Hotspot encoding is preloaded. At startup, 57 hotspot encodings are preloaded into the in-memory hash table. The hotspot encodings include structure keys and combinations of structure and high-frequency components, which significantly improves the speed of the first query.

[0066] Incremental updates. Only candidates that have changed are reordered; unchanged candidates retain their original positions, reducing computational overhead.

[0067] Heap sort optimization: Use a partial sorting algorithm to obtain the first few candidates, avoiding full sorting and reducing time complexity.

[0068] Memory-mapped loading. The font library uses a binary format with memory-mapped loading mode to reduce startup time and memory usage.

[0069] Example 5: Dual-mode configuration hot-switching

[0070] This invention supports hot-switching between dual-mode configurations. Without restarting the input engine, different key mapping configuration files are dynamically loaded to change the mapping relationship between physical keys and logical codes.

[0071] For example, the same physical key is mapped as a force component in the daily version and as a parallel structure in the education version. The display status is updated synchronously with the interface state machine, the keyboard skin color changes, and the highlighted key is changed.

[0072] The configuration structure includes parameters such as input mode, maximum number of candidates, sub-layer timeout in milliseconds, combination key time window in milliseconds, and debug mode.

[0073] Example 6: Performance Verification

[0074] In a test text containing 974 valid Chinese characters, the performance of this invention is as follows:

[0075] Input coverage: 974 characters were successfully entered, with a success rate of 100%. Zero characters could not be entered.

[0076] Input efficiency: Total number of keystrokes: 2,231; average number of keystrokes per character: 2.29.

[0077] Response latency: Average key press latency is 0.29 milliseconds, maximum latency is 11.36 milliseconds, and 95th percentile latency is 0.00 milliseconds.

[0078] Average time per word: 5.61 milliseconds.

[0079] Path distribution: Pure strokes 42.9%, components plus strokes 28.4%, pure structure 15.8%, pure components 9.0%, associative selection 1.2%, function key inheritance 0.5%, combination key repetition 0.3%.

[0080] The processor is an Intel Core i7-12700H, the memory is 16GB DDR4, the operating system is Windows 11, and the engine version is v2.0.0.

[0081] The results show that the state reuse and sorting mechanism can effectively reduce input costs, multi-path collaboration improves input flexibility, and the system has good real-time performance.

[0082] Example 7: User Thesaurus Management

[0083] This invention supports user-defined dictionary management, including:

[0084] Load user thesaurus from file; save the thesaurus to file; add entries; update word frequencies; import and merge from file; export to file; query all entries; intelligently merge two thesauruses.

[0085] The entry information includes: word text, word frequency, and last used timestamp.

[0086] The import results include: the number of imported entries, the number of skipped entries, and a list of error messages.

[0087] Example 8: Event Callback Interface

[0088] This invention provides an event callback interface to support real-time front-end response:

[0089] Candidate update callback, triggered when the candidate list changes;

[0090] The input buffer update callback is triggered when the input encoding changes.

[0091] Text confirmation callback, triggered when the user confirms the text is displayed;

[0092] Error callback, triggered when an exception occurs.

[0093] The callback interface supports asynchronous calls, ensuring that the main thread's response is not blocked.

[0094] Example 9: Cross-platform integration

[0095] This invention supports multiple front-end integration methods:

[0096] The web page front-end connects via the web page assembly module;

[0097] Desktop applications connect via external function interfaces;

[0098] Mobile applications connect via native binding;

[0099] The server connects via a remote procedure call interface.

[0100] All connection methods follow a unified data exchange format to ensure cross-platform consistency.

[0101] Example 10: Configuration Management and Hot Update

[0102] This invention supports hot reloading of configuration files, including:

[0103] Data directory configuration; maximum number of candidates configuration; fuzzy matching level configuration; cache enable and size configuration; language model path configuration; user dictionary path configuration; automatic save interval configuration; log level and file configuration.

[0104] After the configuration file is modified, the system will automatically detect and reload it without restarting the engine.

Claims

1. A method for reusing Chinese character input states and dynamically sorting candidates, characterized in that, include: Maintain an input state buffer, recording the information of the previously displayed Chinese character and the current input encoding sequence; monitor function key input events, and execute state reuse when a preset reuse trigger operation is detected; generate a candidate set based on the reused encoding sequence; and sort the candidate set using a multi-factor weighted model. Output the sorted candidate results; wherein, the reuse trigger operation includes combination shortcut key detection, if a combination signal of the first function key and the second function key is received within a preset time window, the previously displayed Chinese character information is directly reused.

2. The method according to claim 1, characterized in that, The state reuse includes: Encoding inheritance: filling the first component encoding of the previously displayed Chinese character into the current input state buffer; Component repetition: copying the most recent component encoding in the current input state buffer and appending it to the buffer; Whole character repetition: filling the complete encoding or direct text of the previously displayed Chinese character into the current input state buffer.

3. The method according to claim 1, characterized in that, The preset time window is 200ms to 500ms; after receiving the first function key, the system starts a timer. If the second function key is not received within the time window, the single-key function logic is executed.

4. The method according to claim 1, characterized in that, The multi-factor weighted model includes: basic word frequency weight, user usage frequency weight, context prediction weight, and exact matching weight; when the number of components and strokes of the candidate Chinese character are completely consistent with the input code, the exact matching weight is significantly improved.

5. The method according to claim 4, characterized in that, The increase in the exact match weight is greater than the maximum fluctuation range of the basic word frequency weight, to ensure that the exact match candidate is ranked first.

6. The method according to claim 1, characterized in that, It also includes low-latency output steps: an incremental update mechanism is used, and only candidates that have changed are reordered; an encoding caching mechanism is used to store hot codes and their candidate results in an in-memory hash table; and the average key response latency is controlled within 10ms.

7. The method according to claim 1, characterized in that, Supports hot-switching between dual-mode configurations; dynamically loads different key mapping configuration files to change the mapping relationship between physical keys and logical codes without restarting the input engine.

8. The method according to claim 1, characterized in that, Supports multi-input path collaboration; the multi-input paths include pure stroke paths, component plus stroke paths, pure structure paths, pure component paths, and associative paths; each path participates in the recall during candidate generation and is uniformly evaluated during the sorting stage.

9. The method according to claim 1, characterized in that, The function keys include: C key: triggers encoding inheritance operation; V key: triggers component repetition operation; C plus V combination: triggers whole character repetition operation.

10. A Chinese character input system, comprising a state management module, an input buffer module, a candidate generation module, a sorting module, a weight update module, and an output module, characterized in that, The system is used to perform the method according to any one of claims 1 to 9.