A financial terminal responsive adaptation method, system and electronic device
By obtaining the device type of the financial terminal and calling the pending development interface, the layout ratio of the control is determined and drawn, which solves the problem that different terminals need to be developed separately, and realizes cross-terminal adaptation and efficient development of financial applications.
Patent Information
- Application Number
- CN202311841113.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-12-28
AI Technical Summary
Different types of financial terminals require different screen sizes and icons, which means that existing technologies need to customize or design a separate financial application version for each type of financial terminal, resulting in poor applicability and cumbersome development.
By obtaining the device type of the financial terminal, determining the layout ratio, and calling the pending development interface, the controls of each subpage are drawn based on the layout ratio to achieve responsive adaptation of the financial application.
This enables financial applications to be compatible with various types of financial terminals, avoiding redundant development and improving applicability and development efficiency.
Smart Images

Figure CN117850775B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial payment technology, and in particular to a responsive adaptation method, system and electronic device for financial terminals. Background Technology
[0002] There are many types of financial terminals, and different types of financial terminals often require different screen sizes and icons, making it difficult to adapt financial terminals.
[0003] In related technologies, a separate financial application version needs to be customized or designed for each type of financial terminal. This results in poor applicability and cumbersome development. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a responsive adaptation method, system and electronic device for financial terminals, which solves the problems in related technologies where different financial terminals require different versions of financial applications, resulting in poor applicability and cumbersome development; and enables a financial application to be compatible with multiple types of financial terminals.
[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0006] A responsive adaptation method for a financial terminal, the financial terminal including a display screen, the method comprising:
[0007] Obtain the device type of the financial terminal;
[0008] The layout ratio is determined based on the device type, and the layout ratio includes the layout percentage of each sub-page in the financial terminal;
[0009] According to the device type, a pending development interface is called, and the controls of each subpage are drawn using the pending development interface based on the layout ratio, wherein the controls of different device types have at least one difference.
[0010] The controls are displayed on the screen according to the specified layout ratio to complete the adaptation process.
[0011] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0012] A responsive adaptation system for financial terminals includes a financial terminal, the financial terminal including a display screen, and the financial terminal is used for:
[0013] Obtain the device type of the financial terminal;
[0014] The layout ratio is determined based on the device type, and the layout ratio includes the layout percentage of each sub-page in the financial terminal;
[0015] According to the device type, a pending development interface is called, and the controls of each subpage are drawn using the pending development interface based on the layout ratio, wherein the controls of different device types have at least one difference.
[0016] The controls are displayed on the screen according to the specified layout ratio to complete the adaptation process.
[0017] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0018] An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement a financial terminal responsive adaptation method as described in any one of claims 1-8.
[0019] The beneficial effects of this invention are as follows: The method of this application obtains the device type of the financial terminal, determines the layout ratio according to the device type, and calls a pending development interface according to the device type. Based on the layout ratio, the controls of each corresponding sub-page are drawn using the pending development interface. Due to the characteristics of financial terminals, controls of different device types have at least one difference. Therefore, the method of this application can automatically draw controls of each sub-page adapted to the device type of the financial terminal, and can also display the controls on the display screen according to the layout ratio. Using the method of this application, for different financial terminals, there is no need to develop different versions of financial applications separately. Adaptation to financial terminals only requires one development and can be applied to different types of financial terminals, improving the applicability of financial applications, avoiding cumbersome development problems, and improving development efficiency. Attached Figure Description
[0020] Figure 1 This diagram illustrates the setup methods for financial applications in different financial devices within the relevant technologies.
[0021] Figure 2 A flowchart illustrating the steps of a responsive adaptation method for a financial terminal provided in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of the layout ratio of a responsive adaptation method for a financial terminal provided in an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram illustrating the layout of a page using breakpoints and media queries in a responsive adaptation method for a financial terminal provided in an embodiment of the present invention.
[0024] Figure 5 This is a schematic diagram illustrating the layout of a page using a grid layout in a responsive adaptation method for a financial terminal provided in an embodiment of the present invention.
[0025] Figure 6 This is a schematic diagram illustrating the application of a responsive adaptation method for financial terminals to adapt to different financial terminal screens, as provided in an embodiment of the present invention.
[0026] Figure 7 This is a schematic diagram of the architecture of a financial terminal responsive adaptation system provided in an embodiment of the present invention;
[0027] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0028] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0029] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0030] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0031] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0032] There are many types of financial terminals, and different types of financial terminals often require different screen sizes and icons, making it difficult to adapt financial terminals.
[0033] For example, in related technologies, different types of financial terminals typically have different screen sizes. This necessitates designing different versions of financial applications to adapt to financial terminals with different screen sizes. Figure 1 As shown, for financial terminals of different sizes, such as computers, tablets, and mobile phones, a separate version of the financial application needs to be customized or designed for each type of terminal to adapt to the interface display of the corresponding terminal. Furthermore, in related technologies, application layouts can only ensure normal page display when the window size changes within a certain range; they cannot adapt beyond that range. For example, when the window width changes from 400vp (virtual pixel: a virtual size for an application on a device) to 1000vp, a significant change in window size, the application layout based on related technologies may result in abnormally enlarged images or sparse page content and excessive white space. Conversely, when the window size is small, content congestion or even content overlap may occur.
[0034] Therefore, in related technologies, a separate financial application version needs to be customized or designed for each type of financial terminal. This results in poor applicability and cumbersome development.
[0035] To better understand the solution in this application, let's first introduce the concept of responsive design. Responsive design refers to the way or means of appropriately displaying interactive effects in response to the specific requirements of different devices. It's not just about the method, but also the means. To illustrate responsive design simply: a mobile phone issues a command to a specific object, and the object responds "I understand, mobile phone"; a tablet issues a command to a specific object, and the object responds "I understand, tablet"; a smart screen issues a command to a specific object, and the object responds "I understand, smart screen". For different calling objects, the specific object will respond with different content. It's absolutely unacceptable for a mobile phone to issue a command to a specific object, while the specific object responds "I understand, smart screen".
[0036] A responsive financial application is one that is compatible with multiple types of financial terminals, rather than customizing a version of the application with identical functionality for each type of financial terminal. The method described in this application achieves the same technical effect as a responsive financial application. That is, using this method, different financial application versions do not need to be developed separately for different financial terminals. Terminal adaptation requires only one development effort, which can then be applied to different types of financial terminals, improving the applicability of the financial application, avoiding cumbersome development issues, and increasing development efficiency.
[0037] The following section details a responsive adaptation method for financial terminals proposed in this application.
[0038] Please refer to Figure 2 This application provides a responsive adaptation method for financial terminals. Specifically, it can be applied to the main control chip of the financial terminal, or to other chips in the financial terminal used for controlling display and payment; this application does not limit the application to these applications. The financial terminal includes a display screen, and the method includes steps S110-S140.
[0039] Step S110: Obtain the device type of the financial terminal.
[0040] Financial terminals exist in different device types depending on their payment methods or uses. For example, a financial terminal can be a cash register, a financial POS machine, a smart POS machine, a card reader, a facial recognition terminal, or other financial payment terminals with a screen. In step S110, the main control chip of the financial terminal can obtain the device type of the financial terminal itself.
[0041] Step S120: Determine the layout ratio according to the device type. The layout ratio includes the layout percentage of each subpage in the financial terminal.
[0042] The layout ratio refers to the percentage of each sub-page in the financial terminal relative to the display screen. The layout ratio can be set according to the characteristics of financial payments. Furthermore, there can be a specific correspondence between device type and layout ratio. For example, an application can configure a one-to-one correspondence between device type and layout ratio. Once the device type is identified, the corresponding layout ratio can be obtained.
[0043] Please refer to Figure 3 In specific application scenarios, such as when the device type is a POS machine: due to the small screen size of traditional POS machines, they can usually only display a single page, such as only displaying the payment page and the product page. Figure 3 The diagram on the left shows either product page 1 or payment page 2; the layout ratio of the payment page and product page is set to 100%, and the display of the payment page or product page is achieved by switching screens. If the device type is a cash register: cash registers typically have a large display screen, so they can display both the payment page and product page simultaneously. For example, the layout ratio of the payment page can be set to 60% and the product page to 40%, or both can be set to 50%. The layout ratio can be determined based on the amount of content displayed on the page. Figure 3The diagram on the right shows the payment page (3) in the bottom right corner, the product page (1) on the left, and the amount page (2) in the top right corner. The payment page can be further divided into an amount page and a payment method selection page. The layout proportions can be customized by the user; for example, the layout can be updated according to the user's custom instructions, or the proportions can be fine-tuned based on the existing layout proportions.
[0044] Step S130: Call the pending development interface according to the device type, and draw the controls of each subpage based on the layout ratio using the pending development interface. Among them, the controls of different device types have at least one difference.
[0045] In this application, based on the characteristics of financial terminals, particularly the differences in their hardware features, payment methods, and applicable scenarios, the controls for different types of financial terminals have at least one distinguishing feature. For example, for a facial recognition payment terminal, its controls must include a facial recognition payment control. Other financial terminals without facial recognition payment functionality, however, do not include a facial recognition payment control. This facial recognition payment control includes a feature that, when clicked by the user, invokes the financial terminal's camera for facial scanning.
[0046] In this application, there is a corresponding relationship between the device type and the interface to be developed. The interface to be developed can be called according to the device type. For example, when the device type is a face payment terminal, an interface that can draw face payment controls is required.
[0047] The controls for each subpage can be drawn in step S130, and then step S140 is performed.
[0048] Step S140: Display the controls on the screen according to the layout ratio to complete the adaptation process.
[0049] According to the layout ratio, the controls drawn in step S130 can be displayed in the corresponding area of the display screen, thus completing the adaptation process of the financial terminal.
[0050] The method of this application obtains the device type of the financial terminal, determines the layout ratio based on the device type, and calls a pending development interface according to the device type. Based on the layout ratio, the controls of each subpage are drawn using the pending development interface. Due to the characteristics of financial terminals, controls for different device types have at least one difference. Therefore, the method of this application can automatically draw controls for each subpage adapted to the device type of the financial terminal, and can also display the controls on the display screen according to the layout ratio. Using the method of this application, for different financial terminals, there is no need to develop different versions of financial applications separately. Adaptation to financial terminals requires only one development effort, which can be applied to different types of financial terminals, improving the applicability of financial applications, avoiding cumbersome development problems, and improving development efficiency.
[0051] In one embodiment of this application, step S110 of this application, the method for obtaining the device type of the financial terminal includes: the main control chip of the financial terminal can obtain the device type by obtaining the specification data of the financial terminal.
[0052] In one embodiment of this application, the method for obtaining the device type of the financial terminal further includes:
[0053] The device listener, mediaListener, is invoked to obtain the device type of the financial terminal.
[0054] The responsive financial application of this application also includes a device listening program called `mediaListener`. `mediaListener`, as a programmatically configured media listener, is used to monitor and detect terminal types, and also to listen for parameters such as keys of devices like POS machines. The listening program can also be bound to the responsive financial application, allowing the application to obtain device types through invocation; that is, when the responsive financial application starts, it invokes the listening program to perform device matching and identification, such as identifying device types including cash registers, financial POS machines, smart POS machines, card readers, facial recognition terminals, and palmprint recognition terminals. Furthermore, the device listening program `mediaListener` can also be pre-installed on various financial terminals, so that device type identification can be achieved by invoking this listening program during financial terminal device type identification.
[0055] In one embodiment of this application, the method for determining the layout ratio according to the device type in step S120 includes steps S210-S240.
[0056] S210. Determine the screen size of the current device and the size of the subpage to be displayed and its corresponding subpage based on the device type; the subpage size includes the length, width or aspect ratio of the page; if the subpage size matches the screen size, then execute S220; if the subpage size does not match the screen size, then execute S230.
[0057] In this context, "matching" means that the screen size can accommodate the subpage. If the page's length is less than or equal to the screen's length, and the page's width is also less than or equal to the screen's width, then the subpage size matches the screen size. For example, if the current device's screen size is 2400×1080, and the subpage to be displayed is 1200×1080, then the subpage's width is the same as the screen width, and its length is less than the screen length. Therefore, the screen size can accommodate the subpage, and the subpage size matches the screen size.
[0058] S220. Obtain the layout percentage of the subpage to be displayed based on the subpage size and screen size; for example, obtain the length and width of the payment page to get the area of the payment page, and then obtain the layout percentage of the payment page based on the area of the payment page and the screen area. Taking the above matched size as an example, the size of the subpage is 1200×1080, the screen size is 2400×1080, and the percentage is 50%.
[0059] S230. Scale the subpage size proportionally until it matches the screen size. Obtain the current scaling ratio and determine the matching size based on the scaling ratio and the subpage size. Calculate the layout percentage of the subpage to be displayed based on the matching size and the screen size. For example, if the payment page's length is greater than the screen's length, calculate the scaling ratio based on this and shrink the payment page to the screen's length. Then, compare the shrunk payment page's area with the screen's area to obtain the payment page's layout percentage. Taking the mismatched size as an example, if the subpage size is 1200×980 and the screen size is 2400×1080, scale the subpage according to their width ratio, updating the subpage size to 1320×1080, resulting in a 55% proportion. Alternatively, only the subpage's width can be scaled, resulting in a subpage size of 1200×1080 and a 50% proportion.
[0060] As described above, by obtaining the device's screen size and the size of the subpage to be displayed and its corresponding subpage, and comparing the screen size with the subpage size, the subpage size can be displayed on the screen at an appropriate size, avoiding problems such as incomplete display of subpage content or unclear display due to a small subpage display area.
[0061] In one embodiment of this application, step S120 further includes steps S310-S340.
[0062] S310. Determine the remaining size of the current device based on the layout percentage of the subpage to be displayed and the screen size.
[0063] The remaining dimensions, i.e., the remaining length and width of the screen, are obtained based on the layout percentage of the payment page and the screen size. When multiple remaining areas exist on the screen, they can be filtered by their respective aspect ratios. For example, if an area's aspect ratio is greater than 1000, it means that the area's length is much greater than its width, making it difficult to display other subpages. In this case, the area is removed, or the already displayed subpages are adjusted to cover it. This process ultimately yields the number of valid areas. Taking the above matching dimensions as an example, if the subpage size is 1200×1080 and the screen size is 2400×1080, the remaining dimensions are 1200×1080.
[0064] S320. Continue to obtain the shared screen subpage and the size of the shared screen subpage of the current device. The shared screen subpage includes the subpages that need to be displayed together with the subpage to be displayed.
[0065] For example, for some financial terminals, the payment page and the payment redirect page need to be displayed together, or the product page and the price page need to be displayed together. In this case, taking the payment page as an example, we can obtain the relevant data of the payment redirect page.
[0066] S330. Determine the layout percentage of the shared-screen subpage based on the shared-screen subpage size and remaining size.
[0067] The layout percentage of the payment redirect page is determined based on the length and width of the payment redirect page and the length and width of the remaining valid screen area. When multiple shared-screen subpages exist, steps S310-S330 are executed repeatedly until the remaining space cannot accommodate more shared-screen subpages, or until all shared-screen subpages are fully displayed. This means the payment page, payment redirect page, and other shared-screen subpages are displayed simultaneously.
[0068] by Figure 3 Taking the diagram on the right as an example, when product page 1 is the subpage to be displayed, for example, if the screen size is 2400×1080 and the size of product page 1 is 1400×1080, then the remaining size of the current device in step S310 is 1000×1080. In step S320, the shared-screen subpages of the current device are obtained. For example, if amount page 2 is a shared-screen subpage with a size of 1000×960, then step S330 can be performed to determine the layout percentage of the shared-screen subpage based on the shared-screen subpage size and the remaining size, which corresponds to 960 / 1080=88%.
[0069] If, in addition to the amount page 2 being used as a shared screen subpage, payment page 3 is also needed as a shared screen subpage, then steps S310-S330 can be repeated. At this point, the remaining size is 1000×120. If payment page 3 is 1000×100, then payment page 3 can be displayed directly on the current device.
[0070] In one embodiment, if after all shared-screen subpages are displayed on the current device, there is still some remaining space on the current device's screen, then the portion of the subpage to be displayed or the shared-screen subpage can be enlarged to achieve a more aesthetically pleasing display and improve the user experience. For example, with... Figure 3 Taking the diagram on the right as an example, when payment page 3 is the second shared-screen subpage and the remaining size is 1000×120, and the size of payment page 3 is 1000×100, payment page 3 can be enlarged, that is, payment page 3 becomes 1000×120 here.
[0071] In another embodiment, to avoid excessive stretching of the payment page 3, the amount page 2 and the payment page 3 can be stretched together, that is, the amount page 2 is 1000×970 here, and the size of the payment page 3 is 1000×110. This can also avoid blank areas remaining on the screen and improve the user experience.
[0072] As described above, by determining the remaining screen size based on the sub-pages to be displayed and the screen dimensions, the layout percentage of multiple shared sub-pages is determined, thereby maximizing screen utilization to display as many sub-pages as possible. This effectively improves the utilization of display space in financial terminals.
[0073] In one embodiment of this application, step S130, which calls the pending development interface according to the device type, further includes steps S410-S420.
[0074] S410. Obtain preset correspondence information, which includes the correspondence between device type and pending development interface.
[0075] S420: Obtain and call the pending development interface corresponding to the device type based on the preset correspondence information.
[0076] As described above, by establishing a correspondence between device types and interfaces to be developed, the corresponding interfaces can be called by pre-setting the correspondence information.
[0077] In one embodiment of this application, the pending development interface in step S130 can utilize the responsive platform of OpenHarmony (open-source HarmonyOS) or the ARKUI (Ark Framework) architecture of HarmonyOS. In this case, the financial terminal of this application can be implemented using either the HarmonyOS system or the OpenHarmony system. Using this solution, only one architecture (such as the ARKUI (Ark Framework) architecture of HarmonyOS or the responsive platform of OpenHarmony) is needed to implement the solution of this application, effectively reducing the storage size of the responsive financial application corresponding to the responsive adaptation method of this application and optimizing space.
[0078] Of course, the pending development interface in this application may also be multiple interfaces that match different device types, and this application does not make specific limitations on this.
[0079] In one embodiment of this application, step S130 involves drawing the controls of each subpage using a pending development interface based on the layout ratio, including steps S510-S530.
[0080] S510. Determine window breakpoints or grid layout based on layout proportions; for example, implement a responsive approach based on OpenHarmony; please refer to... Figure 3 For example, if the device's screen width is 1080vp, the margin width is 24vp, the gutter width is 24vp, and the required number of grids is 4, then the width of each grid = (screen width - Margin × 2 - Gutter × 3) / 4 = 240vp. Table 1 briefly introduces the three responsive capabilities used in responsive financial applications: breakpoints, media queries, and grid layout, taking into account the characteristics of the financial industry.
[0081] Table 1. Responsive Layout Capabilities
[0082]
[0083] S520. Obtain the layout of each subpage based on window breakpoints or grid layout; please refer to... Figure 4 as well as Figure 5This approach allows for adjustments to the layout of subpages using breakpoints, media queries, and grid layouts. The most commonly used feature in responsive layouts is window width. Typically, the window width is divided into different breakpoints. When the window width changes from one breakpoint to another, grid layout capabilities are integrated to modify the page layout, such as adjusting the page content from a single column to a two-column or even a three-column layout to achieve the best display effect. Simultaneously, media query responsiveness is used to determine the device's module composition, such as external PINPADs, built-in PINPADs, external card readers, built-in card readers, built-in 42mm or 58mm printers, etc., and corresponding responsive financial application interfaces are developed based on this information.
[0084] S530: Utilize the pending development interface to draw the controls for each subpage based on its layout. Specifically, leverage HarmonyOS's ARKUI technology to automatically draw the corresponding controls according to the determined layout proportions of each subpage. Figure 3 This includes controls for various subpages, such as input keyboard controls and payment controls. The width of layout components is set as a relative value of "100%" to achieve adaptive scaling with screen size. For example, if the root container "Column" needs to fill the entire device screen, it is set to "100%". For subpages or images with fixed aspect ratios, the aspect ratio of the subpage is locked, while the width is set to a percentage value, thus achieving adaptive scaling.
[0085] The method of drawing controls for each subpage based on the layout ratio using the undetermined development interface can also be implemented using HarmonyOS's ARKUI (Ark Development Framework) architecture or OpenHarmony's (open source HarmonyOS) responsive platform. Since the drawing of controls for each subpage using OpenHarmony's (open source HarmonyOS) responsive platform and HarmonyOS's ARKUI (Ark Development Framework) architecture has been described in relevant technologies, it will not be repeated here.
[0086] As can be seen from the above description, using OpenHarmony's responsive approach to implement subpages and the drawing of controls within subpages reduces the development difficulty.
[0087] In one embodiment of this application, steps S610-S620 are also included.
[0088] S610. Determine the payment types supported by the financial terminal based on the device type. The payment types include the payment capabilities possessed by the financial terminal.
[0089] For example, a cash register with a PINPAD (password key) can make payments via the password key; similarly, a cash register with a camera can make payments via the camera.
[0090] S620. Different financial interfaces are invoked based on payment capabilities to adapt to the payment needs of the financial terminal. For example, if the cash register does not have a PIN key, no related content will be sent to the terminal via the interface. Furthermore, a responsive financial interface is used to implement different financial interface calls, thereby fulfilling different payment requirements. Since the financial interface is also designed based on the specific characteristics of the financial terminal, different financial terminals require different financial transaction methods. In this example, a responsive financial interface is set up to invoke different financial interfaces based on different device types, thus fulfilling different payment requirements. For example, when the detected device is a cash register with a barcode scanner, a responsive financial interface is used to invoke the scanner interface, transmitting the information and data from the scanner to complete the financial transaction process. The UI interface and financial interface are matched according to the detected device type.
[0091] As described above, different financial interfaces are invoked based on the payment capabilities of different device types to adapt to the payment needs of financial terminals and achieve data transmission between different data sources. Furthermore, this allows for sending corresponding data based on device type using only a single responsive financial interface, reducing the need for interface development.
[0092] In one embodiment of this application, step S130, drawing the controls of each subpage using the undetermined development interface based on the layout ratio, further includes step S710.
[0093] S710. Use the pending development interface to draw a payment control that matches the payment capability.
[0094] All pending development interfaces are implemented by calling the responsive UI interface, that is, the responsive UI interface obtains the corresponding relationship information and draws it.
[0095] As can be seen from the above description, the function of different pending development interfaces can be realized through a responsive UI interface, which reduces the development of interfaces.
[0096] In one embodiment of this application, the financial terminal responsive adaptation method described in this embodiment can be pre-installed on various financial terminals as a responsive financial application (APP). The responsive financial application can provide the financial terminal with a UI (User Interface) interface and a financial interface. The UI interface can draw corresponding controls based on the specific financial terminal device type. The UI interface corresponds to the pending development interface in the above embodiment. The financial interface is also set based on the specific characteristics of the financial terminal. Since different financial terminals require different financial transaction methods, the solution of this application can make different financial interface calls according to different device types to achieve different payment needs. For example, when a cash register device with a barcode scanner is detected, the information and data of the scanner will be transmitted through a specific interface to enable the cash register to complete the financial transaction. The UI interface and financial interface are matched according to the detected device type.
[0097] In one embodiment of this application, the financial terminal and the payment terminal are distributedly connected, and the payment terminal includes a display window. The term "distributed" primarily refers to distributed computing. Distributed computing divides a computational problem into many small computational parts, then distributes these parts to many networked computers for parallel processing, and finally combines the results to obtain the final result; distributed storage disperses data across multiple independent machines. The biggest advantage of distributed computing is that it can utilize the computing power of distributed connected computers. The distributed connection in this application is similar; the financial terminal can be distributedly connected to the payment terminal, thereby utilizing the payment terminal's capabilities to process payments. This distributed connection can be achieved using a distributed soft bus.
[0098] A distributed soft bus is a physical bus similar to hardware that is software-based. All devices connected to it are implemented in software form; they can be understood as individual devices. Because software allows for decentralized and distributed deployment, and most importantly, devices within the distributed soft bus can utilize the capabilities of other devices to process requests. For example, when a mobile phone and a computer are in a distributed connection, the phone can use the computer's high computing power to process images on the phone, and the computer can use the phone's high-definition camera to take pictures. When a financial terminal receives a target payment request through a distributed connection, it can search for the payment terminal corresponding to the payment method information from all distributed payment terminals to make the payment. This means the financial terminal can effectively utilize the payment resources of any distributed payment terminal, improving the diversity and applicability of payment methods. The method of this application also includes steps S810-840.
[0099] S810: Obtain the terminal type of the payment terminal based on the distributed soft bus.
[0100] S820. Determine the layout scheme based on the terminal type. The layout scheme includes the layout percentage of each subpage in the payment terminal.
[0101] S830. Call the pending development interface according to the terminal type, and draw the terminal controls of each subpage based on the layout scheme using the pending development interface. Among them, the terminal controls of different terminal types have at least one difference.
[0102] S840: Send the layout scheme, terminal controls for each subpage, and display instructions to the payment terminal; wherein, the display instructions are used to instruct the payment terminal to display the terminal controls in the display window according to the layout scheme, thus completing the adaptation process.
[0103] In other words, the payment terminal only needs to send its own device type to the financial terminal, and the financial terminal will send the corresponding UI layout and interface data to the payment terminal. The payment terminal can then complete the above steps by accepting the UI layout and interface data. That is, when the payment terminal does not have data processing capabilities, it can call on the computing power of the financial terminal to complete the above steps.
[0104] As described above, a distributed soft bus connects the financial terminal to an external payment terminal, allowing the two terminals to share computing power. For example... Figure 6 As shown, it can realize an OpenHarmony financial application APP that matches the screen of different types of financial terminals, displays a suitable interface layout for users, and provides a responsive financial application interface, instead of customizing an application version with the same function for each type of financial terminal.
[0105] Please refer to Figure 7 Another embodiment of this application provides a responsive adaptation system for financial terminals. Figure 6 This illustration shows an architectural diagram of a financial terminal responsive adaptation system 100 provided in an embodiment of this application, which includes a financial terminal 101 and a display screen. In some embodiments, the financial terminal is used for:
[0106] The type of device used to acquire financial terminals;
[0107] The layout ratio is determined based on the device type, and the layout ratio includes the layout percentage of each sub-page in the financial terminal.
[0108] The pending development interface is called according to the device type, and the controls of each subpage are drawn using the pending development interface based on the layout ratio. Among them, the controls of different device types have at least one difference.
[0109] Display the controls on the screen according to the layout ratio to complete the adaptation process.
[0110] The system may also include a payment terminal 102. The payment terminal 102 is connected to the financial terminal 101 via a distributed soft bus. The financial terminal 101 adapts the payment terminal 102, and the payment terminal 102 utilizes the computing power provided by the financial terminal 101 to perform the aforementioned steps. Specifically: for example, if the payment terminal 102 is a cryptographic device without data processing capabilities, and therefore cannot complete adaptive UI layout and interface data processing, the payment terminal 102 completes the UI layout and interface data processing by calling the computing power of the financial terminal 101. During the computing power call, the payment terminal 102 sends its device type to the financial terminal 101, which then generates the corresponding UI layout and interface data based on the device type. The payment terminal 102 then receives the UI layout and interface data.
[0111] The content corresponding to the financial terminal 101 and payment terminal 102 in the financial terminal responsive adaptation system has been disclosed in the above sections and will not be repeated here.
[0112] The beneficial effects of this invention are as follows: by determining the layout ratio based on the device type of the financial terminal, and calling the pending development interface according to the device type of the financial terminal, it is possible to draw the controls of each subpage based on the layout ratio and the pending development interface, and display the controls on the display screen according to the layout ratio. This enables financial applications to be applied to different types of financial terminals with only one development, thereby improving the applicability of financial applications.
[0113] Please refer to Figure 8 Another embodiment provides an electronic device 300, including a memory 301, a processor 302, and a computer program stored on the memory 301 and running on the processor 302. When the processor 302 executes the computer program, it implements the various steps in the above-described financial terminal responsive adaptation method.
[0114] The responsive adaptation method for financial terminals has already been disclosed in the above sections and will not be repeated here.
[0115] In summary, the method of this application obtains the device type of the financial terminal, determines the layout ratio based on the device type, and calls a pending development interface according to the device type. Based on the layout ratio, it uses the pending development interface to draw the controls for each sub-page. Due to the characteristics of financial terminals, controls for different device types have at least one difference. Therefore, the method of this application can automatically draw controls for each sub-page adapted to the device type of the financial terminal, and can also display the controls on the screen according to the layout ratio. Using this method, for different financial terminals, there is no need to develop different versions of financial applications separately. Adaptation to financial terminals only requires one development and can be applied to different types of financial terminals, improving the applicability of financial applications, avoiding cumbersome development problems, and improving development efficiency. Furthermore, this application also develops this method into an application. This application can be adapted to all smart payment terminals, such as cash registers, POS machines, and scanners—all smart payment terminals with screens. After installing this application on any smart payment terminal, the application can responsively provide UI and financial interfaces for that smart payment terminal, enabling normal use of each smart payment terminal. This allows for one-time development, multi-platform application, and high applicability. Furthermore, only a single interface needs to be set up; the interface's responsiveness allows it to send corresponding data based on the device type, while the UI's responsiveness allows it to adapt to different devices. In contrast, existing solutions require a separate application, interface, or UI design for each device, resulting in significant space consumption.
[0116] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention's specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A financial terminal responsive adaptation method, characterized by, A method for a financial terminal, the financial terminal comprising a display screen, the method comprising: obtaining a device type of the financial terminal; determining a layout ratio according to the device type, the layout ratio comprising a layout percentage of each sub-page in the financial terminal; calling a pending development interface according to the device type, and drawing controls of the each sub-page based on the layout ratio by using the pending development interface, wherein there is at least one difference point in the controls of different device types; displaying the controls on the display screen according to the layout ratio, and completing an adaptation process; the determining of the layout ratio according to the device type comprises: determining a screen size of a current device and a sub-page to be displayed and a corresponding sub-page size according to the device type; if the sub-page size matches the screen size, obtaining a layout percentage of the sub-page to be displayed according to the sub-page size and the screen size; if the sub-page size does not match the screen size, scaling the sub-page size proportionally until the sub-page size matches the screen size, obtaining a current scaling ratio, and determining a matching size according to the scaling ratio and the sub-page size, and obtaining a layout percentage of the sub-page to be displayed according to the matching size and the screen size; the method further comprises: determining a remaining size of the current device according to the layout percentage of the sub-page to be displayed and the screen size; continuing to obtain a co-screen sub-page and a co-screen sub-page size of the current device, the co-screen sub-page comprising a sub-page that needs to be co-displayed with the sub-page to be displayed; determining a layout percentage of the co-screen sub-page according to the co-screen sub-page size and the remaining size.
2. The financial terminal responsive adaptation method of claim 1, wherein, the calling of the pending development interface according to the device type comprises: obtaining preset correspondence information, the correspondence information comprising a correspondence between a device type and a pending development interface; obtaining and calling the pending development interface corresponding to the device type according to the preset correspondence information.
3. The method of claim 2, wherein, the drawing of the controls of the each sub-page based on the layout ratio by using the pending development interface comprises: determining a window breakpoint or a grid layout according to the layout ratio; obtaining a layout of the each sub-page according to the window breakpoint or the grid layout; drawing the controls of the each sub-page according to the layout of the each sub-page by using the pending development interface.
4. The method of claim 1, wherein, further comprising: determining a payment type supported by the financial terminal according to the device type, the payment type comprising a payment capability possessed by the financial terminal; calling different financial interfaces according to the payment capability to adapt to payment requirements of the financial terminal.
5. The method of claim 4, wherein, the drawing of the controls of the each sub-page based on the layout ratio by using the pending development interface comprises: drawing payment controls matched with the payment capability by using the pending development interface.
6. The method of claim 1, wherein, the financial terminal is distributedly connected with a payment terminal, the payment terminal comprising a display window; the method further comprises: obtaining a terminal type of the payment terminal based on a distributed software bus; determining a layout scheme according to the terminal type, the layout scheme comprising a layout percentage of each sub-page in the payment terminal; According to the terminal type, a pending development interface is called, and terminal controls of the respective subpages are drawn based on the layout scheme using the pending development interface, wherein there is at least one difference point between terminal controls of different terminal types; The layout scheme, the terminal controls of the respective subpages, and display instructions are sent to the payment terminal; wherein the display instructions are used to instruct the payment terminal to display the terminal controls in the display window according to the layout scheme, and complete the adaptation process.
7. A financial terminal responsive adaptation system characterized by, The financial terminal comprises a display screen, and is used for: Obtaining a device type of the financial terminal; According to the device type, a layout ratio is determined, the layout ratio comprising layout percentages of respective subpages in the financial terminal; According to the device type, a pending development interface is called, and controls of the respective subpages are drawn based on the layout ratio using the pending development interface, wherein there is at least one difference point between controls of different device types; According to the layout ratio, the controls are displayed on the display screen, and the adaptation process is completed; The determination of the layout ratio according to the device type comprises: According to the device type, a screen size of the current device and a to-be-displayed subpage and a corresponding subpage size thereof are determined; If the subpage size matches the screen size, a layout percentage of the to-be-displayed subpage is obtained according to the subpage size and the screen size; If the subpage size does not match the screen size, the subpage size is scaled proportionally until the subpage size matches the screen size, a current scaling ratio is obtained, a matching size is determined according to the scaling ratio and the subpage size, and a layout percentage of the to-be-displayed subpage is obtained according to the matching size and the screen size; The system further comprises: According to the layout percentage of the to-be-displayed subpage and the screen size, a remaining size of the current device is determined; The co-screen subpage and a co-screen subpage size of the current device are continuously obtained, the co-screen subpage comprising subpages that need to be jointly displayed with the to-be-displayed subpage; According to the co-screen subpage size and the remaining size, a layout percentage of the co-screen subpage is determined.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the financial terminal responsive adaptation method according to any one of claims 1-6.
Citation Information
Patent Citations
Full-screen adapting method of display device, display device and storage medium
CN108427546A
Interface display method and electronic device
WO2023179501A1