Scripting-Driven UI Event Loop for Cross-Platform Frame Refresh

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current UI frameworks lack support for both scripting languages and frame refreshing, with IMGUI not supporting scripting languages well and Electron primarily focusing on event-driven non-frame refreshing scenarios.

Innovation Solution

A method and system utilizing an event loop mechanism to periodically acquire and process user interface events using a scripting language, enabling frame refreshing while supporting cross-platform functionality and personalized processing for different operating systems.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If IMGUI is used for real-time rendering UI, then frame refreshing capability is achieved, but scripting language support is poor

Engineering Contradiction:
Improveframe refreshing capabilityVSAvoidscripting language support
Core Design Contradiction:
SpeedVSEase of manufacture

Solution Approach 1:

The system is divided into distinct modules: an event loop mechanism for frame management, a scripting language interpreter for code processing, and an event processing system. This segmentation allows each component to specialize in its function while working together to achieve both frame refreshing and scripting support.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An event loop mechanism serves as an intermediary between the scripting language processing and the frame rendering system. It periodically processes events from the scripting layer and triggers frame refreshing, bridging the gap between event-driven scripting and real-time rendering requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of manufacture

If Electron is used for UI framework, then scripting language support is provided, but frame refreshing capability is limited

Engineering Contradiction:
Improvescripting language supportVSAvoidframe refreshing capability
Core Design Contradiction:
Ease of manufactureVSSpeed

Solution Approach 1:

The event loop mechanism implements periodic action by continuously cycling through event processing phases at fixed intervals. This periodic execution ensures that scripting events are processed regularly while maintaining a predictable frame refresh rate, combining the benefits of event-driven programming with real-time rendering capabilities.

Inventive Principle:
Principle #19Periodic action

3Adaptability or versatility

If cross-platform compatibility is implemented, then adaptability to different operating systems is improved, but system complexity increases

Engineering Contradiction:
Improvecross-platform compatibilityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The event loop mechanism and event processing system are designed with universality, handling multiple types of events (mouse, keyboard, touch, etc.) through a unified interface. This allows the same core system to operate across different operating systems without requiring platform-specific implementations, reducing overall system complexity while maintaining cross-platform compatibility.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS20230205553A1Method, system, electronic device, medium and program product for user interface processing
Publication Date: 2023.06.29 BEIJING ZITIAO NETWORK TECH CO LTD
  • US20230205553A1 patent drawing
  • US20230205553A1 patent drawing
  • US20230205553A1 patent drawing

AI summary

The present application relates to a method, system, electronic device, medium and program product for user interface processing, which are applied in the field of computer technology. The present disclosure enables: periodically acquiring user interface events for a target application based on an event loop mechanism; using a scripting language, processing the user interface events acquired in each period to perform frame refreshing on the user interface of the target application.