Middle Layer Library Decouples POS Terminal Applications
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The current application development platform for POS terminals is complex and difficult to manage due to the need for direct interaction between upper layer applications and bottom layer APIs, leading to increased development challenges and repetitive work when adapting to changes in industry standards or device models.
Innovation Solution
A data processing method that introduces a middle layer library, allowing upper layer applications to invoke library interfaces which in turn call bottom layer APIs, thereby decoupling the upper layer from the underlying complexities and enabling compatibility with different device models through macro definitions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If upper layer application directly calls bottom layer API, then implementation simplicity is improved, but device complexity and difficulty of maintenance increase
Solution Approach 1:
The patent introduces a middle layer library that acts as an intermediary between the upper layer application and the bottom layer API. This middle layer provides unified interface definitions and implementation details, shielding the complexity of direct API calls while maintaining ease of application development. The middle layer handles device-specific variations and implementation details, allowing applications to work with abstracted interfaces.
2Adaptability or versatility
If codes are compared and modified for each demander, then adaptability to different demanders is improved, but development time and complexity increase
Solution Approach 1:
The patent creates a universal middle layer library that serves multiple demanders and application types. The library provides standardized interface definitions and implementations that can be reused across different applications and demanders. When industry standards change, modifications are made in the middle layer and automatically benefit all applications, eliminating the need for repetitive code comparison and transplantation for each demander.
Solution Approach 2:
The patent performs preliminary work by pre-defining interface specifications and implementing common functionality in the middle layer library. This includes pre-establishing standardized APIs, pre-implementing common business logic, and pre-configuring adapter patterns for different device types. This preliminary preparation reduces the need for repetitive modification work when new demanders or standards arise.
3Adaptability or versatility
If industry standards change and code transplantation is required, then adaptability to new standards is improved, but development difficulty increases
Solution Approach 1:
The patent segments the system into distinct layers: upper layer applications, middle layer library with interface definitions, and bottom layer implementation. When industry standards change, only the middle layer interface definitions and implementations need to be modified, while the upper layer applications remain unchanged. This segmentation isolates modification requirements to specific layers, reducing development difficulty.
Solution Approach 2:
The middle layer library serves as an intermediary that absorbs and manages changes in industry standards. It provides a stable interface contract between applications and the underlying implementation, allowing standard changes to be implemented in the middle layer without affecting applications. This mediator pattern simplifies the adaptation process by confining changes to a single layer.
Data Source
AI summary
The present application is applicable to a field of computer technology, and provides a data processing method, a terminal device, and a storage medium. The data processing method comprises: invoking a library interface of a middle layer library by using an upper layer application; implementing a function corresponding to the library interface by invoking a bottom layer application programming interface by the middle layer library. The data processing method provided in the embodiment of the present application can reduce the difficulty of developing upper layer applications.


