Search

CN-121996234-A - Vehicle-mounted lightweight window management system based on adaptable drawing interface

CN121996234ACN 121996234 ACN121996234 ACN 121996234ACN-121996234-A

Abstract

The embodiment of the invention provides a vehicle-mounted lightweight window management system based on an adaptable drawing interface, which constructs a collaborative framework consisting of four core modules of drawing interface adaptation, window management, message routing and control library and an optional dynamic skin switching module. The drawing interface adaptation module is compatible with OpenGL, direct D and other third party interfaces through unified standards and adapter modes to provide standardized drawing call, the window management module organizes windows in a tree structure, realizes synchronization of adding, deleting and changing with father and son states through a recursion algorithm, manages and controls the whole flow of the windows by combining a life cycle management unit, the message routing module accurately transmits interaction and state messages by means of a message queue and a classification distribution mechanism to support message expansion, the control library module provides preset controls and class inheritance expansion interfaces, the rendering unit guarantees display consistency of multiple drawing back ends, and the adaptation compatible unit simplifies back end replacement operation. The method realizes unified adaptation of the drawing interfaces, reduces the complexity of back-end replacement, and realizes efficient and orderly window management.

Inventors

  • ZHANG LONG
  • MA JI

Assignees

  • 武汉光庭信息技术股份有限公司

Dates

Publication Date
20260508
Application Date
20260313

Claims (10)

  1. 1. The vehicle-mounted lightweight window management system based on the adaptable drawing interface is characterized by comprising a drawing interface adapting module, a window management module, a message routing module and a control library module which are sequentially in communication connection; The drawing interface adapting module is used for defining unified drawing standards, adapting the multi-class third-party drawing interfaces to the unified standards, providing a window drawing call interface for the window management module and providing a control drawing call interface for the control library module; The window management module is used for organizing windows and child window structures by adopting a tree data structure, executing window adding, deleting, searching and hierarchical adjustment operations by a recursive algorithm, monitoring the state of a parent window and synchronizing the states of child windows, generating a state message when the states of the windows are changed, sending the state message to the message routing module, and executing window state synchronous updating and window life cycle adjustment after receiving the state message or the interaction message distributed by the message routing module; The message routing module caches externally input interactive messages through a built-in message queue, classifies the interactive messages according to type identifiers and target window identifiers of the interactive messages, and precisely distributes the interactive messages and internal state messages to the target windows or corresponding modules; The control library module is used for providing preset controls, packaging drawing logic and interaction behaviors of the preset controls, providing control expansion interfaces based on class inheritance to support creation of custom controls, calling a control drawing call interface of the drawing interface adaptation module to realize control rendering, generating interaction messages when the controls trigger interaction events and sending the interaction messages to the message routing module, and receiving control creation and management requests of the window management module to incorporate a window tree structure.
  2. 2. The vehicle-mounted lightweight window management system based on an adaptable rendering interface of claim 1, wherein the rendering interface adaptation module comprises an interface specification definition unit and an adapter unit, the interface specification definition unit is configured to define a unified operation standard including rectangular rendering, circular rendering, image rendering, and reserved text rendering, the adapter unit is configured to adapt a third party rendering interface to the unified operation standard in an adapter mode, and the third party rendering interface includes an open graphics library OpenGL, direct D.
  3. 3. The vehicle-mounted lightweight window management system based on an adaptable rendering interface of claim 1, wherein the window management module comprises a window organization unit and a state synchronization unit; the window organization unit is used for storing windows and sub-windows in a tree data structure and executing the addition, deletion, searching and hierarchy adjustment of the windows through a recursion algorithm; the state synchronization unit is used for monitoring the hiding, moving and scaling states of the parent window, and recursively calling a child window state update function when the state of the parent window changes, so that child window state synchronization is realized.
  4. 4. The system of claim 3, wherein the window management module further comprises a life cycle management unit, the life cycle management unit is used for controlling the whole process of window creation initialization, display activation, hidden suspension and destruction release, and receiving the instruction of the message routing module to complete window life cycle state switching.
  5. 5. The adaptable rendering interface-based vehicular lightweight window management system of claim 1, wherein the message routing module comprises a message storage unit, a message distribution unit, and a message delivery unit; the message storage unit is used for caching interaction messages through the built-in message queue, wherein the interaction messages comprise mouse clicks, keyboard inputs, window state changes and control interactions; The message distribution unit is used for directionally distributing the interactive message to the processing function of the corresponding window according to the type identifier and the target window identifier of the interactive message; The message transfer unit is used for establishing a parent-child window communication channel and transferring interaction messages based on the window hierarchy relation.
  6. 6. The system of claim 5, wherein the message routing module further comprises a message expansion unit for providing a custom message type registration interface supporting a developer binding callback function to expand message processing logic.
  7. 7. The vehicle-mounted lightweight window management system based on the adaptable drawing interface of claim 1, wherein the control library module comprises a preset control unit and a control expansion unit; The preset control unit is used for encapsulating drawing logic and interaction behaviors of the track sliding bar, the check box, the modal dialog box and the multi-label assembly; the control expansion unit is used for providing a class inheritance interface and supporting the creation of a custom control by rewriting a control drawing function and an event response function.
  8. 8. The adaptable rendering interface-based vehicular lightweight window management system of claim 7, wherein the control library module further comprises a control rendering unit; The control rendering unit is used for calling a unified standard interface of the drawing interface adaptation module to realize graphic rendering of the preset control and the custom control so as to enable display consistency under different drawing back ends.
  9. 9. The vehicle-mounted lightweight window management system based on the adaptable drawing interface of claim 7, wherein the control library module further comprises an adaptation compatibility unit, the adaptation compatibility unit is used for replacing only the corresponding adapter component depending on the abstract interface of the drawing interface adaptation module when the drawing back end is replaced, and communication compatibility with the window management module and the control library module is maintained through the abstract interface.
  10. 10. The vehicle-mounted lightweight window management system based on the adaptable drawing interface according to claim 1, further comprising a dynamic skin switching module, wherein the dynamic skin switching module is in communication connection with the drawing interface adaptation module and the control library module, the dynamic skin switching module comprises a skin configuration unit and an effective triggering unit, the skin configuration unit is used for storing interface style parameters, the effective triggering unit is used for providing a global skin switching API, calling the API to trigger the drawing interface adaptation module to update control drawing parameters, and realizing real-time effective of styles.

Description

Vehicle-mounted lightweight window management system based on adaptable drawing interface Technical Field The embodiment of the invention relates to the technical field of embedded systems and lightweight GUI development, in particular to a vehicle-mounted lightweight window management system based on an adaptable drawing interface. Background In the development field of embedded systems and lightweight GUIs (GRAPHICAL USER INTERFACE, graphical user interfaces), efficient window management techniques have a key role in reducing hardware resource consumption and improving development efficiency, and particularly in the scenes of vehicle-mounted instruments and the like, the performance and suitability of the window management techniques directly influence product experience and development period. The prior art has obvious technical bottlenecks in practical application, and is specifically expressed in the following two aspects: 1. The frame is bloated, which results in high learning cost and low development efficiency The main stream cross-platform frame and the development scheme have the problems of difficult operation and complex realization. The Qt and Electron frames require developers to master complex design modes and tool chains, and according to 2023-year Stack over flow developer research and display, the Qt frame starts to take an average learning period of 42 days, and the Electron basic memory occupies more than 100 Megabytes (MB), so that the embedded scene light-weight requirement is difficult to meet, the pure OpenGL (Open Graphics Library, open graphic library) scheme requires the developers to manually manage all drawing details, including a buffer area, a shader and other underlying logic, and through Github vehicle-mounted open source project analysis, 2000+ line template codes are required for developing a basic instrument interface, and KANZI engine provides a visual tool, but at least 3 months is required for learning state machine logic and a material system (BMW internal training data display). The standard test shows that the code quantity and the development period of the existing scheme are far higher than those of the novel technical scheme, wherein the code quantity of the pure OpenGL scheme is more than 6 times of that of the novel scheme, and the development period of KANZI is 2.5 times of that of the novel scheme. 2. Insufficient flexibility of drawing adaptation and poor hardware compatibility The existing scheme shows two-pole differentiation on the drawing interface adaptation surface, and is difficult to adapt to the diversified requirements of the vehicle-mounted scene. On one hand, weight-level frameworks such as MFC (Microsoft Foundation Classes, microsoft basic class library) are forcedly bound with specific drawing APIs (Application Programming Interface, application programming interfaces) and cannot be flexibly adjusted according to the characteristics of vehicle-mounted hardware, and therefore, the vehicle-mounted framework is not suitable for development of a vehicle, on the other hand, the weight-level libraries such as DearImGui only support single rendering back ends, and the extensibility is limited, so that the vehicle-mounted framework is not suitable for development of the vehicle. In addition, the pure OpenGL scheme severely depends on specific GPU driving, the performance on a domestic vehicle rule chip such as core X9 is reduced by 70%, a KANZI engine is bound with a special rendering pipeline, and the existing graphic middleware of an enterprise cannot be compounded, so that the hardware adaptation cost is high, and the compatibility is poor. The technical defects are that the quick development requirement and the architecture flexibility are inherently contradicted, the existing architecture is designed for pursuing universality or excessive performance, the relationship between the two is not balanced, the real-time requirement of a light scene is not considered by an existing message routing mechanism, the response efficiency is insufficient, a business engine introduces excessive abstract layers (such as a KANZI material system comprises 7 layers of interface calls), the system redundancy is increased, and meanwhile, most schemes do not perform special optimization aiming at the hardware characteristics and the resource limitation of a vehicle scene, so that the performance and the practicability are difficult to be considered in a vehicle-mounted environment. These problems severely limit the efficiency and quality of vehicle GUI development, and a need for targeted technical improvements exists. Disclosure of Invention The embodiment of the invention provides a vehicle-mounted lightweight window management system based on an adaptable drawing interface, which aims to solve the technical problems that the hardware characteristics and resource limitation of a vehicle-mounted scene are not specially optimized in the existing vehicle-mounted lightwe