Search

CN-122018739-A - Multi-window interaction optimization method for containerized hong Mongolian application

CN122018739ACN 122018739 ACN122018739 ACN 122018739ACN-122018739-A

Abstract

The invention discloses a multi-window interaction optimization method for a containerized HongMong application, wherein an independent host side window is created at a host side when the containerized HongMong application is started, an initial state is saved to a first window state table, binding relations among the HongMong application, the host side window and an input device are added to the first binding table, a differential event receiving rule starting result receiving service is configured, the container side starts the event receiving service and a result feedback service marks the application as ready states, when a user operates the input device, the host side generates an original input event, updates the first window state table, adjusts an event processing rule, performs differential parameter preprocessing on the original input event to obtain a unified window event, the event receiving service performs differential event processing on the unified window event to generate an event processing result and sends the event processing result to the host side, and the differential interaction response is executed by the result receiving service according to the application type to complete interaction.

Inventors

  • WEN YAN
  • ZHAO WANGLIN

Assignees

  • 北京麟卓信息科技有限公司

Dates

Publication Date
20260512
Application Date
20260409

Claims (10)

  1. 1.A multi-window interaction optimization method for containerized Hongmon application is characterized by comprising the following steps: When the container-type hong Mongolian application is started, a host side creates an independent host side window for the application, an ID of the host side window is allocated, the acquired initial state is stored in a first window state table, the binding relation among the hong Mongolian application, the host side window and the input device is added into the first binding table, the binding relation comprises an application type, an input device path and an event type which is allowed to be received, a differential event receiving rule is configured according to the application type and the initial window state, a result receiving service is started, then the hong Mongolian application ID, the host side window ID, the binding relation and the event receiving rule are sent to the container side, the container side starts an event receiving service and a result feedback service, and the hong Mongolian application is marked as a ready state; When a user operates input equipment, a host side generates an original input event, wherein the original input event comprises an input equipment path, an event type, original parameters and a timestamp, a first binding table is queried to write a host side window ID into the original input event, an event source screen ID is recorded, screen coordinates are converted into relative coordinates to be written into the original input event, a first window state table is updated according to a current window state, event processing rules are adjusted, the original input event is subjected to differential parameter preprocessing according to an application type and then packaged into a unified window event, the unified window event comprises an event ID, a target host side window ID, a target window home screen ID, an event type, a priority, an event generation timestamp and an application type differential parameter, and the unified window event is sent to a container side; The event receiving service of the application executes differentiated event processing on the unified window event according to the application type, generates an event processing result and sends the event processing result to the host side, the result receiving service of the host side analyzes the event processing result, prompts errors and retries if the processing state is failure, triggers the automatic restart of the honest application if the processing state is crash, and executes differentiated interaction response according to the application type to complete interaction if the processing state is successful.
  2. 2. The multi-window interaction optimization method according to claim 1, wherein the method for configuring the differentiated event receiving rule according to the application type and the initial window state is characterized in that the application type is game application, a low-delay event queue is configured, handle rocker dead zone filtering and key continuous click detection are started, a vibration feedback interface is reserved, the application type is drawing application, a primary parameter mapping rule is configured, a pen pressure sensing scaling formula and coordinate conversion logic are preset, the application type is office application, a keyboard key code mapping table and a voice semantic filtering rule are configured, and a system conflict shortcut key shielding strategy is preset.
  3. 3. The multi-window interaction optimization method according to claim 1, wherein the host side generates original input events by collecting different full-quantity parameters for different input devices, and constructing the original input events by the full-quantity parameters, specifically, collecting precision coordinates, touch pressure and multi-finger IDs for a touch device, fixing the sampling rate to 120Hz, collecting coordinates, original pressure feeling, inclination angle, rotation angle and side key states for a digital pen device, collecting rocker shaft displacement, key states and LED states for a game handle, reserving vibration feedback interfaces, collecting key codes, modifying key states and keyboard layout for a keyboard device, supporting automatic reloading layout after hot plug, collecting voice streams for a voice device, completing voice-to-word and semantic intention extraction, and recording confidence.
  4. 4. The multi-window interaction optimization method according to claim 1 is characterized in that event processing rules are adjusted according to a current window state in a mode that if the current window state is a minimized window, wake events are reserved, other events are temporarily stored in a wake queue, if the current window state is a semitransparent window, sliding and dragging events are discarded, only click and key events with confidence degrees larger than a threshold value are reserved, if the current window state is a completely shielded window, only related global shortcut key events are reserved, other events are directly discarded, and if the current window state is a focus window, preprocessing priority is improved.
  5. 5. The multi-window interaction optimization method according to claim 1, wherein the mode of performing differential parameter preprocessing on the original input event according to the application type is that if the application type is a game application, a rocker dead zone filtering and continuous impact detection are performed, a vibration intensity field is reserved, if the application type is a drawing application, a pressure sensing parameter scaling, a coordinate conversion and a sampling rate adaptation are performed, and if the application type is an office application, a key code conversion, a confidence voice result setting filtering and a system conflict shortcut key shielding are performed.
  6. 6. The multi-window interaction optimization method according to claim 1, wherein the application event receiving service executes differentiated event processing on unified window events according to application types, and is characterized in that if the application types are game applications, the handle parameters are converted into role control instructions, continuous clicking logic is processed, vibration feedback instructions are generated based on game scenes, application states are detected through heartbeats, crash state notification is sent to a host side in a non-responsive mode, if the application types are drawing applications, pen parameters are converted into pen touch parameters in a analytic mode, a vector drawing engine is called to complete drawing, abnormal parameters are automatically corrected and warning is sent to the host side, if the application types are office applications, keyboards and voice events are analyzed, text input, document operation and shortcut key response are completed, conflict shortcut key prompt is processed, and a voice input text format is corrected.
  7. 7. The multi-window interactive optimization method according to claim 1, wherein the manner of performing differentiated interactive responses according to application types is: the method comprises the steps of updating a window picture based on a processing result, triggering handle vibration and synchronously adjusting window refreshing frame rate when the application type is game application, finishing line rendering based on drawing parameters, refreshing window canvas, visually displaying pressure feeling and inclination angle parameters when the application type is drawing application, and finishing text insertion, cursor synchronization and operation result prompt when the application type is office application.
  8. 8. The multi-window interaction optimization method according to claim 1, wherein the container side starts event receiving service and result feedback service in a manner that a container starts event receiving service for a hong Mongolian application, a binding setting port enables the container to only receive event data of the port, and a result feedback service is started, wherein the binding setting port is used for returning a processing result to a host side.
  9. 9. The multi-window interactive optimization method according to claim 1, wherein the sink side pre-configures a screen-dedicated transmission channel for a window in a multi-screen scene, and marks the hong Mongolian application as ready after the sink side and the container side complete connectivity verification of the hong Mongolian application-dedicated channel.
  10. 10. The multi-window interaction optimization method according to claim 1, wherein the host side queries a first binding table according to an input device path in an original input event, marks the input event as illegal if no corresponding binding relation exists in the first binding table, directly discards and records a log, otherwise checks whether the event type is a type of event allowed to be received, temporarily stores the event which is not allowed into a special low-priority queue of the host side window, and writes a host side window ID in the binding relation into a target window ID field of the original input event.

Description

Multi-window interaction optimization method for containerized hong Mongolian application Technical Field The invention belongs to the technical field of computer software development, and particularly relates to a multi-window interaction optimization method for containerized hong Monte application. Background With the popularity of container technology in cross-system application deployment, openHarmony runs on a Linux system through a container, input event interaction becomes a key bottleneck affecting user experience under the condition that OpenHarmony applications are bound with independent Linux windows one by one. However, the prior art has the main defects that firstly, the acquisition granularity of user input is insufficient, the prior art only acquires basic event parameters (such as touch coordinates and keyboard key codes), the inclination angle, pressure feeling of pen input, rocker displacement of a game handle, semantic intention of a voice command and the like cannot be captured, so that professional scenes (such as a digital tablet drawing and a 3A game) are degraded, secondly, linux side window event processing is rough, differential preprocessing logic is not designed for one-to-one binding of applications and windows, such as a game window needs low delay and shares the same event queue with an office window, the drawing window needs high-precision pressure feeling and is forcedly compressed to 0 to 1024 levels, and an event receiving rule is not dynamically adjusted when the state of the window changes, so that event is wrongly sent, thirdly, openHarmony application event processing semantic loss is caused, the existing static mapping table cannot be matched with equipment in real time (such as a new digital tablet is inserted), so that the semantic loss of the application is caused (such as a pressure feeling value 2048 is mapped to 512 on the Linux side), fourth, feedback break OpenHarmony is applied to processing events (such as a game window moves, such as a game window is mapped to a 512 on the side), the figure is not closed-loop, the state of the Linux side window is stopped, and a synchronous display window is not corresponding to a synchronous display window is displayed on the basis of a synchronous display screen, and the real-time window is not available, and the state of the real-time window is not matched with a synchronous display window has a synchronous window, and the real-time window has a synchronous state has been displayed, and the state has been displayed, and the event coordinates are not recalibrated when dragging the window across the screen. In summary, openHarmony still has the problems of low orientation precision of cross-system events, poor semantic consistency, synchronous lag between focus and window, disordered multi-screen interaction and the like when the container runs in the Linux system. Disclosure of Invention In view of the above, the invention provides a multi-window interaction optimization method for a containerized hong application, which realizes the end-to-end interaction from user input to interface presentation of the containerized hong application. The invention provides a multi-window interaction optimization method for containerized HongMong application, which specifically comprises the following steps: When the container-type hong Mongolian application is started, a host side creates an independent host side window for the application, an ID of the host side window is allocated, the acquired initial state is stored in a first window state table, the binding relation among the hong Mongolian application, the host side window and the input device is added into the first binding table, the binding relation comprises an application type, an input device path and an event type which is allowed to be received, a differential event receiving rule is configured according to the application type and the initial window state, a result receiving service is started, then the hong Mongolian application ID, the host side window ID, the binding relation and the event receiving rule are sent to the container side, the container side starts an event receiving service and a result feedback service, and the hong Mongolian application is marked as a ready state; When a user operates input equipment, a host side generates an original input event, wherein the original input event comprises an input equipment path, an event type, original parameters and a timestamp, a first binding table is queried to write a host side window ID into the original input event, an event source screen ID is recorded, screen coordinates are converted into relative coordinates to be written into the original input event, a first window state table is updated according to a current window state, event processing rules are adjusted, the original input event is subjected to differential parameter preprocessing according to an application type and then packaged into a unified win