Frame for embedded touch screen interaction

By designing an embedded touch screen interactive framework, integrating the MCU resource packaging module, MCU driver module, touch screen UI resource module and interface logic processing module, the problems of large coding volume, long cycle and high cost in the development of embedded touch screens are solved, and fast response and efficient porting are achieved.

CN120560643APending Publication Date: 2025-08-29SHENZHEN BAOAN MEDICAL SUPPLY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510629299.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

In the development of embedded touch screens, the existing technology has problems such as large coding workload, long development cycle, high maintenance cost and low compatibility, especially the cumbersome transplantation work between different MCUs.

Method used

Design a framework for embedded touch screen interaction, including MCU resource packaging module, MCU driver module, touch screen UI resource module and interface logic processing module. Through the integration and hierarchical architecture of these modules, dynamic adaptation of unified IO interface and standardized protocol format conversion are realized, reducing duplicate encoding and improving software portability.

Benefits of technology

It shortens the development cycle, reduces maintenance costs, and improves the portability and function expansion capabilities of the software through unified IO interfaces and standardized protocol formats, ensuring rapid response to user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120560643A_ABST
    Figure CN120560643A_ABST
Patent Text Reader

Abstract

The invention relates to a framework for embedded touch screen interaction, which belongs to the technical field of touch screens, and comprises an MCU (Microprogrammed Control Unit) resource packaging module, an MCU driving module, a touch screen UI (User Interface) resource module and an interface logic processing module, the MCU resource packaging module is used for identifying MCU models, generating corresponding packaging codes according to different types of MCU models and generating a unified IO interface according to the packaging codes; the MCU driving module is used for packaging underlying hardware operation logic according to the IO interface; the touch screen UI resource module is used for packaging an interaction protocol and display resources of a touch screen, receiving user operation and converting original data of the user operation into a standardized protocol format; and the interface logic processing module responds to a request of user operation, generates a control instruction according to the original data in the standardized protocol format, and sends the control instruction to the MCU driving module. According to the method, the aims of shortening the development period of the embedded touch screen, reducing the maintenance cost and improving the software portability are fulfilled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of touch screens, and in particular to a framework for embedded touch screen interaction. Background Art

[0002] Embedded touch screens provide intuitive human-computer interaction, offering a superior user experience while also displaying more system information. However, control methods in embedded development are often implemented using process-oriented programming languages. This results in a high coding workload and long product development cycles when implementing complex interactive logic. Product maintenance costs are also high, and using different MCUs often results in different IO configurations, making porting between different platforms cumbersome and resulting in low compatibility. Summary of the Invention

[0003] In view of this, it is necessary to provide a framework for embedded touch screen interaction to shorten the embedded touch screen development cycle, reduce maintenance costs, and improve software portability.

[0004] In order to achieve the above object, the present invention provides a framework for embedded touch screen interaction, including: an MCU resource encapsulation module, an MCU driver module, a touch screen UI resource module and an interface logic processing module;

[0005] The MCU resource encapsulation module is used to identify the MCU model and generate corresponding encapsulation codes according to different types of MCU models and generate a unified IO interface according to the encapsulation codes;

[0006] The MCU driver module is used to encapsulate the underlying hardware operation logic according to the IO interface;

[0007] The touch screen UI resource module is used to encapsulate the interactive protocol and display resources of the touch screen, receive user operations, and convert the original data of user operations into a standardized protocol format;

[0008] The interface logic processing module responds to the user's operation request, generates a control instruction according to the original data in the standardized protocol format, and sends the control instruction to the MCU driver module.

[0009] In a possible implementation, the MCU resource encapsulation module is used to identify the MCU model according to a configuration file and a database, wherein the configuration file is in XML format.

[0010] In a possible implementation, the MCU model is a microcontroller that supports C++ language and includes serial port resources, including at least STM32 and ESP32.

[0011] In one possible implementation, the touch screen UI resource module includes a protocol optimization unit;

[0012] The protocol optimization unit is used to convert the original data of user operations into a standardized protocol format.

[0013] In a possible implementation, the protocol optimization unit includes LZ77 compression and / or CRC32 check.

[0014] In a possible implementation, a touch screen is further included, and the touch screen is a Diwin screen. The serial communication protocol of the protocol optimization unit also includes a standardized interface for data sending, receiving and error feedback.

[0015] In a possible implementation, the device further includes a light sensor and an encryption chip. The light sensor is used to collect ambient light intensity and dynamically adjust display parameters of the touch screen. The encryption chip is used to generate an encryption key for serial communication.

[0016] In a possible implementation, the touch screen UI resource module includes a gesture recognition function, as well as event binding and response including sliding and double-clicking operations.

[0017] In one possible implementation, the MCU driver module includes a data encryption unit;

[0018] The data encryption unit is used to perform encryption operation on the control instruction.

[0019] In a possible implementation, the interface logic processing module includes an interface state machine, which dynamically switches the interface display mode based on user operation events or feedback from a lower computer.

[0020] The present invention has the following beneficial effects: by integrating the MCU resource encapsulation module, MCU driver module, touch screen UI resource module, and interface logic processing module, it can reduce repetitive coding and shorten the development cycle. Furthermore, the MCU resource encapsulation module dynamically adapts to different MCU models, generating a unified I / O interface, significantly reducing porting costs. Furthermore, the decoupling of the logic processing module from the hardware driver based on the layered architecture design facilitates functional expansion and maintenance upgrades. Standardized protocol format conversion ensures rapid response to user operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a system architecture diagram of an embodiment of a framework for embedded touch screen interaction provided by the present invention;

[0022] Figure 2 A framework diagram of another embodiment of an embedded system in the framework for embedded touch screen interaction provided by the present invention;

[0023] Figure 3 This is a modular diagram of another embodiment of the embedded system in the framework for embedded touch screen interaction provided by the present invention. DETAILED DESCRIPTION

[0024] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.

[0025] Traditionally, porting STM32 platform code to ESP32 requires manual modification of the underlying drivers, which is time-consuming and labor-intensive. Furthermore, the touchscreen communication protocol lacks optimization, resulting in high response latency and prone to data errors.

[0026] A specific embodiment of the present invention discloses a framework for embedded touch screen interaction, see Figure 1-Figure 3 , including: MCU resource packaging module 1, MCU driver module 2, touch screen UI resource module 3 and interface logic processing module 4;

[0027] The MCU resource encapsulation module is used to identify the MCU model and generate corresponding encapsulation codes according to different types of MCU models and generate a unified IO interface according to the encapsulation codes;

[0028] It should be noted that the MCU resource encapsulation module is configured to dynamically identify MCU models, such as STM32 and ESP32, and parse hardware parameters through configuration files (XML format) or databases; generate encapsulation code adapted to the current MCU, such as the HAL library interface of the STM32 and the GPIO driver of the ESP32, and provide a unified IO interface, such as GPIO_WritePin()).

[0029] It's important to note that the unified interface is a standardized calling method provided by the hardware layer, ensuring decoupling of upper-layer code from the hardware. Different IO interface encapsulation codes are implemented by an adaptation layer generated within the hardware layer for different MCUs. This layered design of abstract interfaces and dynamic adaptation ensures both interface uniformity and differentiated compatibility with hardware.

[0030] The MCU driver module is used to encapsulate the underlying hardware operation logic according to the IO interface;

[0031] It should be noted that the MCU driver module implements specific hardware operation logic, such as serial communication and motor control, based on a unified IO interface. It is used to connect the upper-level logic with the underlying hardware and execute specific operation instructions.

[0032] The touch screen UI resource module is used to encapsulate the interactive protocol and display resources of the touch screen, receive user operations, and convert the original data of user operations into a standardized protocol format;

[0033] It should be noted that there is no limitation on the types and quantities of interactive protocols and display resources.

[0034] The interface logic processing module responds to the user's operation request, generates a control instruction according to the original data in the standardized protocol format, and sends the control instruction to the MCU driver module.

[0035] In this embodiment, the collaborative process between modules includes a forward process of user operation and a reverse process of lower computer feedback. Among them, the forward process of user operation is: the touch screen UI resource module receives user operation, such as click or parameter setting, and converts the original data into a standardized protocol format. The original data is then passed to the user interface logic processing module, the user interface logic processing module parses the operation request and generates a control instruction, the control instruction calls the interface provided by the MCU resource encapsulation module through the MCU driver module, such as the serial port sending method, and is finally sent to the lower computer for execution. The reverse process of lower computer feedback is: the data returned by the lower computer is received and standardized by the MCU resource encapsulation module, the data is passed to the user interface logic processing module via the MCU driver module, the display content is updated after logical processing, and the touch screen UI resource module updates the interface display such as parameter values ​​or alarm prompts according to the processing results.

[0036] In this embodiment, by integrating the MCU resource encapsulation module, MCU driver module, touch screen UI resource module, and interface logic processing module, repetitive coding can be reduced and the development cycle shortened. The MCU resource encapsulation module dynamically adapts to different MCU models, generating a unified IO interface, significantly reducing porting costs. At the same time, the decoupling of the logic processing module from the hardware driver based on the layered architecture design facilitates functional expansion and maintenance upgrades. Standardized protocol format conversion ensures rapid response to user operations.

[0037] In some embodiments of the present invention, the object-oriented programming language is C++, and the procedure-oriented programming language is C.

[0038] In some embodiments of the present invention, the MCU resource encapsulation module is used to identify the MCU model according to a configuration file and a database, wherein the configuration file is in XML format.

[0039] In this embodiment, the XML-formatted configuration file supports rapid adaptation to new MCU models without modifying the core code. For example, the migration time from STM32 to ESP32 can be reduced by 80%. It also supports a variety of MCUs, including but not limited to microcontrollers such as the STM32 and ESP32 series.

[0040] Furthermore, by dynamically adapting and interpreting the configuration file, the corresponding IO interface encapsulation code is generated, which can reduce the workload of manual adaptation.

[0041] In a specific embodiment, the MCU pin mapping is defined through an XML configuration file, and the HAL parses it to generate a C / C++ interface.

[0042] In some embodiments of the present invention, the touch screen UI resource module includes a protocol optimization unit;

[0043] The protocol optimization unit is used to convert the original data of user operations into a standardized protocol format.

[0044] In this embodiment, a protocol optimization algorithm, such as LZ77 compression and CRC32 checksum, is embedded in the touch screen UI resource module. The LZ77 data compression algorithm reduces communication bandwidth requirements and transmission delays, while the CRC32 checksum ensures data transmission integrity and reduces bit error rates. This protocol optimization algorithm can reduce communication delays and improve reliability.

[0045] In some embodiments of the present invention, a touch screen is further included, and the touch screen is a Diwin screen. The serial communication protocol of the protocol optimization unit also includes a standardized interface for data sending, receiving and error feedback.

[0046] In this embodiment, the standardized interface (data transmission, reception, error feedback) of the Diwin screen is adapted to a variety of industrial-grade touch screens, simplifying the integration process.

[0047] In some embodiments of the present invention, a light sensor and an encryption chip are further included. The light sensor is used to collect ambient light intensity and dynamically adjust the display parameters of the touch screen. The encryption chip is used to generate an encryption key for serial communication.

[0048] In this embodiment, a light sensor is provided to monitor the ambient light intensity in real time, and the display brightness is dynamically adjusted according to the ambient light intensity to adapt to different lighting conditions and improve the practicality of the display screen.

[0049] It also uses AES-256 encrypted communication to prevent data leakage or tampering, further enhancing the security of applications in the medical and health field.

[0050] It should be noted that there is no limitation on the types and categories of the optical sensor and encryption chip.

[0051] In some embodiments of the present invention, the touch screen UI resource module includes a gesture recognition function, and event binding and response including sliding and double-clicking operations.

[0052] In this embodiment, based on the touch screen that supports gesture operations such as sliding and double-clicking, user operation convenience can be improved, and market competitiveness can be enhanced through multimodal interaction capabilities (touch + gesture).

[0053] In some embodiments of the present invention, the MCU driver module includes a data encryption unit;

[0054] The data encryption unit is used to perform encryption operation on the control instruction.

[0055] In this embodiment, the encryption unit of the MCU driver module, such as AES-256, is used to ensure secure transmission of control instructions and prevent malicious attacks.

[0056] In some embodiments of the present invention, the interface logic processing module includes an interface state machine, and the interface state machine dynamically switches the interface display mode based on user operation events or feedback from a lower computer.

[0057] In this embodiment, the interface state machine dynamically switches the display mode, such as from "settings" to "monitoring", to achieve a seamless user experience.

[0058] Therefore, the framework system designed according to the present invention uses an object-oriented programming language and software architecture to effectively shorten the development cycle and reduce maintenance costs. The object-oriented encapsulation of the underlying IO ports can improve the portability of the software. Therefore, this method is suitable for interactive development of embedded touch screens.

[0059] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.

Claims

1. A framework for embedded touch screen interaction, characterized in that: include: MCU resource packaging module, MCU driver module, touch screen UI resource module and interface logic processing module; The MCU resource encapsulation module is used to identify the MCU model and generate corresponding encapsulation codes according to different types of MCU models and generate a unified IO interface according to the encapsulation codes; The MCU driver module is used to encapsulate the underlying hardware operation logic according to the IO interface; The touch screen UI resource module is used to encapsulate the interactive protocol and display resources of the touch screen, receive user operations, and convert the original data of user operations into a standardized protocol format; The interface logic processing module responds to the user's operation request, generates a control instruction according to the original data in the standardized protocol format, and sends the control instruction to the MCU driver module.

2. The framework for embedded touch screen interaction according to claim 1, characterized in that: The MCU resource encapsulation module is used to identify the MCU model according to the configuration file and the database, wherein the configuration file is in XML format.

3. The framework for embedded touch screen interaction according to claim 1, characterized in that: The MCU model is a microcontroller that supports C++ language and includes serial port resources, including at least STM32 and ESP32.

4. The framework for embedded touch screen interaction according to claim 1, characterized in that: The touch screen UI resource module includes a protocol optimization unit; The protocol optimization unit is used to convert the original data of user operations into a standardized protocol format.

5. The framework for embedded touch screen interaction according to claim 4, characterized in that: The protocol optimization unit includes LZ77 compression and / or CRC32 check.

6. The framework for embedded touch screen interaction according to claim 5, characterized in that: It also includes a touch screen, which is a Diwin screen. The serial communication protocol of the protocol optimization unit also includes a standardized interface for data sending, receiving and error feedback.

7. The framework for embedded touch screen interaction according to claim 6, characterized in that: It also includes a light sensor and an encryption chip. The light sensor is used to collect the ambient light intensity and dynamically adjust the display parameters of the touch screen. The encryption chip is used to generate an encryption key for serial communication.

8. The framework for embedded touch screen interaction according to claim 1, characterized in that: The touch screen UI resource module includes gesture recognition function, as well as event binding and response including sliding and double-clicking operations.

9. The framework for embedded touch screen interaction according to claim 1, characterized in that: The MCU driver module includes a data encryption unit; The data encryption unit is used to perform encryption operation on the control instruction.

10. The framework for embedded touch screen interaction according to claim 1, characterized in that: The interface logic processing module includes an interface state machine, which dynamically switches the interface display mode based on user operation events or feedback from a lower computer.