Code Input Character Recommendation via Syntax Tree Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current touchscreen-based code input methods are cumbersome and time-consuming due to the limited size of the virtual keyboard, requiring frequent switching between different keyboard interfaces for various character types, which hampers input efficiency.

Innovation Solution

A character recommendation method that converts input code into a syntax tree, determines reference nodes based on the cursor location, parses these nodes to identify target characters, and recommends them for input, thereby eliminating the need to manually switch between keyboard interfaces.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a virtual keyboard with multiple keyboard interfaces is used to input different character types, then the terminal can support various character types (English letters, numbers, operators), but the operation becomes cumbersome and time-consuming due to frequent keyboard interface switching

Engineering Contradiction:
Improvecharacter type supportVSAvoidinput operation
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The system automatically determines the appropriate keyboard interface based on the current code context and cursor position without requiring manual user intervention. The terminal analyzes the syntax tree and automatically switches to the suitable keyboard layout, allowing the system to serve itself rather than requiring continuous user control for interface switching.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system continuously monitors the code input interface, cursor position, and syntax tree structure to dynamically determine which keyboard interface should be active. This feedback mechanism allows the system to adapt the keyboard interface in real-time based on the current coding context, eliminating the need for manual switching while maintaining appropriate character type support.

Inventive Principle:
Principle #23Feedback

2Adaptability or versatility

If multiple keyboard interfaces are provided for different character types, then various character types can be input, but input time increases due to the need to switch between keyboard interfaces

Engineering Contradiction:
Improvecharacter type supportVSAvoidinput time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The system performs preliminary analysis of the code context and syntax tree structure to pre-determine the appropriate keyboard interface before the user needs to input a character. By anticipating the required character type based on the current coding context, the system prepares the correct keyboard interface in advance, eliminating the time loss associated with manual switching.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The terminal automatically manages keyboard interface selection based on real-time analysis of the code and cursor position, eliminating manual intervention and reducing input time while maintaining support for multiple character types.

Inventive Principle:
Principle #25Self-service

3Adaptability or versatility

If keyboard interface switching is required for different character types, then comprehensive character input capability is achieved, but input efficiency decreases

Engineering Contradiction:
Improvecharacter input capabilityVSAvoidinput efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The system automatically determines and switches between keyboard interfaces based on syntax tree analysis and cursor position, eliminating manual switching operations. This self-service approach maintains comprehensive character input capability while significantly improving input efficiency by removing the overhead of manual interface management.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The manual mechanical process of switching keyboard interfaces is replaced with an automated computational system that analyzes the syntax tree and cursor context to determine the appropriate keyboard interface. This substitution eliminates the manual operations and time loss associated with mechanical interface switching while preserving full character input capability.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11537213B2Character recommending method and apparatus, and computer device and storage medium
Publication Date: 2022.12.27 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US11537213B2 patent drawing
  • US11537213B2 patent drawing
  • US11537213B2 patent drawing

AI summary

A character recommendation method and apparatus, a computer device, and a storage medium are disclosed. The method includes: converting code inputted in a code input interface into a syntax tree, the syntax tree including a plurality of nodes, a hierarchical relationship between the plurality of nodes, and location intervals of the plurality of nodes; determining, according to a cursor location in the code input interface and the syntax tree, at least one reference node corresponding to the cursor location in the syntax tree; parsing the at least one reference node, and determining a to-be-recommended target character according to a parsing result; and recommending the target character in the code input interface.