Hardware test method, device, equipment, medium and product

By generating application programming interface requests and calling serial peripheral interface functions to drive hardware execution tests, the problems of lag and inconsistency in hardware testing of financial self-service equipment are solved, realizing an efficient and unified hardware testing method and improving testing efficiency and ease of use.

CN120832183APending Publication Date: 2025-10-24CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510909304.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing hardware testing methods for financial self-service devices have lags and inconsistencies, resulting in low testing efficiency, high costs, and difficult maintenance.

Method used

By generating application programming interface requests, calling serial peripheral interface functions to drive hardware to perform test operations, generating and analyzing test data, this provides an efficient and unified testing method that does not rely on business menus.

Benefits of technology

It enables rapid execution of hardware tests without relying on business menus, improving testing efficiency, simplifying operation processes, reducing maintenance costs, and meeting the needs of financial institutions for high efficiency and uniformity in hardware testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832183A_ABST
    Figure CN120832183A_ABST
Patent Text Reader

Abstract

The invention discloses a hardware testing method and device, equipment, a medium and a product, and relates to the technical field of financial equipment, and the method comprises the steps: responding to a recognized hardware testing instruction, and generating an application programming interface request according to the hardware testing instruction; sending the application programming interface request to a service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives at least one target hardware corresponding to the hardware test instruction to execute a test operation through the serial peripheral interface function to generate test data, returning the test data to the hardware test tool; and receiving the test data sent by the service manager, and determining the test result of the at least one piece of target hardware according to the test data, thereby providing a method for executing the hardware test without relying on a service menu, being suitable for testing various types of hardware, and meeting the requirements of financial institutions on high efficiency and uniformity of the hardware test.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of financial equipment, and particularly relates to a hardware testing method and device, equipment, medium and product. BACKGROUND

[0002] With the continuous development of the financial industry, financial self-service equipment such as ATM machines and single return machines play an increasingly important role in the business of banks and other financial institutions. The normal operation of these self-service equipment is of great significance to improve the efficiency of financial services and optimize customer experience.

[0003] At present, the hardware testing of financial self-service equipment mainly relies on two ways: one is to test through specific business menus. The hardware function verification of this method usually needs to be carried out after the business logic is developed and integrated into the equipment, which leads to obvious lag in the testing method, affecting the testing efficiency and effect; the other is to use the test tools provided by each manufacturer for testing, but the test tools provided by different manufacturers are different in style, and the operation mode and interface are also different, which is easy to cause compatibility problems, and is not conducive to use and maintenance.

[0004] Therefore, it is necessary to propose a solution that meets the needs of financial institutions for the efficiency and uniformity of hardware testing.

[0005] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0006] The main purpose of the present application is to provide a hardware testing method, device, equipment, medium and product, which aims to meet the needs of financial institutions for the efficiency and uniformity of hardware testing.

[0007] To achieve the above purpose, the present application provides a hardware testing method, which is applied to a hardware testing tool, and the method comprises the following steps:

[0008] In response to identifying a hardware testing instruction, an application programming interface request is generated according to the hardware testing instruction;

[0009] The application programming interface request is sent to a service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives at least one target hardware corresponding to the hardware testing instruction to perform a testing operation through the serial peripheral interface function, generates testing data, and returns the testing data to the hardware testing tool;

[0010] The testing data sent by the service manager is received, and the testing result of the at least one target hardware is determined according to the testing data.

[0011] In an embodiment, the hardware testing tool comprises an application layer and a software development tool layer, and the step of generating an application programming interface request according to the hardware testing instruction comprises:

[0012] selecting or determining an application programming interface identifier and operation parameters according to the hardware testing instruction through the application layer;

[0013] calling an application programming interface function provided by the software development tool layer according to the application programming interface identifier;

[0014] generating the application programming interface request according to the application programming interface function and the operation parameters.

[0015] In an embodiment, the step of calling an application programming interface function provided by the software development tool layer according to the application programming interface identifier further comprises:

[0016] developing the software development tool layer according to a preset protocol standard, wherein the software development tool layer encapsulates a plurality of application programming interfaces corresponding to operation functions of each hardware module;

[0017] The step of generating an application programming interface request according to the hardware testing instruction in response to identifying the hardware testing instruction further comprises:

[0018] displaying selection controls corresponding to each hardware module on the interactive interface;

[0019] receiving an operation instruction of the selection controls by a user, and generating the hardware testing instruction according to the operation instruction.

[0020] In an embodiment, the step of receiving the test data sent by the service manager and determining the test result of the at least one target hardware according to the test data further comprises:

[0021] receiving the test result of the at least one target hardware sent by the service manager through the application layer, and / or comparing the test result with historical results and / or expected results through the application layer to generate performance change trends and / or fault prediction trends of the at least one target hardware;

[0022] displaying at least one of the test result, the performance change trends and the fault prediction trends of the at least one target hardware through the interactive interface, and / or generating updated hardware testing instructions according to at least one of the test result, the performance change trends and the fault prediction trends of the at least one target hardware.

[0023] Furthermore, to achieve the above object, the application further provides a hardware testing method, which is applied to a service manager and comprises the following steps of:

[0024] receiving an application programming interface request sent by a hardware testing tool, wherein the application programming interface request is generated by the hardware testing tool in response to identifying a hardware testing instruction;

[0025] calling a serial peripheral interface function based on the application programming interface request and driving at least one target hardware corresponding to the hardware testing instruction to perform a testing operation through the serial peripheral interface function, and generating testing data;

[0026] returning the testing data to the hardware testing tool, so that the hardware testing tool determines a testing result of the at least one target hardware according to the testing data.

[0027] In an embodiment, the step of calling the serial peripheral interface function based on the application programming interface request and driving the at least one target hardware corresponding to the hardware testing instruction to perform the testing operation through the serial peripheral interface function comprises the following steps of:

[0028] verifying the legality of the application programming interface request;

[0029] if the legality verification of the application programming interface request is passed, determining a device driver corresponding to the application programming interface request and calling a serial peripheral interface function of the device driver;

[0030] sending the serial peripheral interface function to the device driver, so that the device driver drives the at least one target hardware corresponding to the hardware testing instruction to perform the testing operation according to the serial peripheral interface function.

[0031] Furthermore, to achieve the above object, the application further provides a hardware testing device, which comprises the following components:

[0032] a response module, configured to generate an application programming interface request according to a hardware testing instruction in response to identifying the hardware testing instruction;

[0033] an execution module, configured to send the application programming interface request to a service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request and drives at least one target hardware corresponding to the hardware testing instruction to perform a testing operation through the serial peripheral interface function, generates testing data, and returns the testing data to the hardware testing tool;

[0034] determining module configured to receive the test data sent by the service manager and determine the test result of the at least one target hardware according to the test data.

[0035] In addition, to achieve the above object, the present application further provides a hardware testing device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the hardware testing method as described above.

[0036] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the hardware testing method as described above.

[0037] In addition, to achieve the above object, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the hardware testing method as described above.

[0038] The one or more technical solutions provided by the present application have at least the following technical effects:

[0039] By responding to the identification of the hardware testing instruction, generating an application programming interface request according to the hardware testing instruction; sending the application programming interface request to the service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives at least one target hardware corresponding to the hardware testing instruction to perform a test operation through the serial peripheral interface function, generates test data, and returns the test data to the hardware testing tool; receiving the test data sent by the service manager, and determining the test result of the at least one target hardware according to the test data, a hardware testing method without relying on a business menu is provided, which avoids the lag of hardware testing by using a business menu, and improves the efficiency of hardware testing; by generating an application programming interface request according to a hardware testing instruction, a general test method suitable for various types of hardware is provided, which facilitates the use and maintenance of the hardware testing tool, and meets the efficient and unified needs of financial institutions for hardware testing. BRIEF DESCRIPTION OF DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings can also provide further understanding of the prior art for those of ordinary skill in the art without any creative effort.

[0042] Figure 1 The flowchart provided for the hardware test method embodiment one of the present application;

[0043] Figure 2 The system architecture diagram provided in the embodiments of the present application;

[0044] Figure 3 The flowchart provided for the hardware test method embodiment two of the present application;

[0045] Figure 4 The flowchart provided for the hardware test method embodiment three of the present application;

[0046] Figure 5 The result return diagram according to the embodiment of the present application;

[0047] Figure 6 The flowchart provided for the hardware test method embodiment four of the present application;

[0048] Figure 7 The overall flowchart of the hardware test method according to the embodiment of the present application;

[0049] Figure 8 The module structure diagram of the hardware test device according to the embodiment of the present application;

[0050] Figure 9 The device structure diagram of the hardware running environment involved in the hardware test method according to the embodiment of the present application.

[0051] The purpose implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.

[0053] The technical terms involved in the embodiments of the present application:

[0054] API: Application Programming Interface, application programming interface;

[0055] SPI: Serial Peripheral Interface, serial peripheral interface;

[0056] SDK: Software Development Kit, software development kit;

[0057] XFS: eXtended Financial Services, financial services interface standard;

[0058] WOSA: Windows Open System Architecture, Windows open system architecture.

[0059] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings and specific embodiments.

[0060] The main solution of the embodiment of the present application is: in response to identifying the hardware test instruction, an application programming interface request is generated according to the hardware test instruction; the application programming interface request is sent to the service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives at least one target hardware corresponding to the hardware test instruction to perform a test operation through the serial peripheral interface function, generates test data, and returns the test data to the hardware test tool; receiving the test data sent by the service manager, and determining the test result of the at least one target hardware according to the test data, a method for executing hardware test without relying on business menu is provided, which avoids the lag of executing hardware test by using business menu, improves the efficiency of hardware test; by generating an application programming interface request according to a hardware test instruction, a general test method suitable for various hardware is provided, which facilitates the use and maintenance of hardware test tools, and meets the needs of financial institutions for efficient and unified hardware testing.

[0061] In the present embodiment, for the convenience of description, the following hardware test device is taken as the execution subject.

[0062] With the continuous development of the financial industry, financial self-service equipment such as ATM machines and single return machines play an increasingly important role in the business of banks and other financial institutions. The normal operation of these self-service equipment is of great significance to improve the efficiency of financial services and optimize customer experience. However, there are some problems to be solved in the field of hardware testing of financial self-service equipment.

[0063] At present, the hardware testing of financial self-service equipment mainly relies on two ways: one is to test through specific business menu; the other is to use the test tools provided by each manufacturer. Both of these two ways have obvious defects and deficiencies.

[0064] (1) The lag of business menu test:

[0065] In the business menu testing of financial self-service devices, hardware function verification usually needs to be conducted after the business logic development is completed and integrated into the device. This testing method has obvious lag. Once hardware problems are found in the business menu testing stage, manufacturers need to be contacted for repair, which not only consumes a lot of time, but also makes the repair time difficult to control, seriously affecting the online progress of the device and the development of business.

[0066] In addition, business menu testing needs to simulate actual business processes to verify hardware functions. This process often needs to be repeatedly verified multiple times, and the number and process are complex and lengthy, consuming a lot of time and manpower. For example, when testing the card reader function, it needs to verify whether the card reader works normally through a complete business process (such as inserting a card, entering a password, selecting a service, etc.). This complex process greatly increases the testing cost and time.

[0067] (2) Inconsistency of manufacturer testing tools

[0068] Different manufacturers provide testing tools with different styles, and the operation methods and interfaces are not the same. This inconsistency brings great inconvenience to the maintenance and management of financial institutions' devices. Financial institutions need to learn and use different testing tools for different manufacturers' devices, increasing the maintenance cost and difficulty.

[0069] The update and maintenance of manufacturer testing tools also lack unified standards and specifications, which can easily lead to compatibility problems and version conflicts, further affecting the stability and reliability of the device.

[0070] In view of the defects of the existing testing methods, financial institutions urgently need a more efficient, convenient and unified hardware testing tool. Such a tool should be able to verify the function of hardware independently of the business system, discover hardware problems in advance, and ensure that the hardware can be used normally in device applications, providing protection for subsequent business access. At the same time, such a tool should also have the following characteristics:

[0071] Efficiency: It can quickly complete hardware function and stability testing, greatly saving testing time and improving testing efficiency.

[0072] Uniformity: Provide a unified testing interface and operation method, suitable for multiple hardware modules and different manufacturers' devices, convenient for use and maintenance.

[0073] Compatibility: Follow existing industry standards and protocols, such as the WOSA protocol, to ensure compatibility with existing financial self-service devices, facilitating integration and expansion.

[0074] Ease of use: Provide an intuitive visual operation interface to reduce the complexity of testing operations and improve user experience.

[0075] Therefore, the present application provides a solution to provide an efficient financial self-service device hardware testing tool to solve the problems existing in the prior art and meet the needs of financial institutions for efficiency, uniformity and ease of use of hardware testing.

[0076] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a hardware testing device, etc. that can realize the above functions. The following will take the hardware testing device as an example to describe the present embodiment and each of the following embodiments.

[0077] Based on this, the present embodiment provides a hardware testing method, which will be described below with reference to Figure 1 , Figure 1 The present embodiment provides a hardware testing method, which will be described below with reference to

[0078] In the present embodiment, the hardware testing method comprises steps S10-S30:

[0079] Step S10, in response to identifying the hardware testing instruction, generating an application programming interface request according to the hardware testing instruction;

[0080] For example, a financial self-service device such as an ATM machine, a single back machine, etc. usually contains various hardware modules, such as a card reader, a camera, a barcode scanner, an identity card recognition module, a printer and a password keyboard, etc. The testing of each hardware module plays an important role in the normal use of the device.

[0081] For example, the present embodiment provides a hardware testing tool, which comprises an application layer and a software development tool layer. The application layer is connected with an interactive interface and can generate a hardware testing instruction according to the operation instruction of the user on the interactive interface.

[0082] For example, the step of generating an application programming interface request according to the hardware testing instruction in response to identifying the hardware testing instruction further comprises:

[0083] Displaying the selection control corresponding to each hardware module on the interactive interface;

[0084] Receiving the operation instruction of the user on the selection control and generating the hardware testing instruction according to the operation instruction.

[0085] For example, the present embodiment provides a hardware testing tool, which comprises an application layer and a software development tool layer. The application layer is connected with an interactive interface and can generate a hardware testing instruction according to the operation instruction of the user on the interactive interface. Figure 2 , Figure 2 The present embodiment provides a system architecture, which will be described below with reference to Figure 2As shown, the interactive interface displays the test functions that the hardware test tool can perform, such as barcode scanning, single print, batch print test, password keyboard test, and face test, etc. The user can also directly select the name of the hardware, such as the card reader, camera, and printer, to perform the test.

[0086] For example, when the user selects the hardware module (such as a card reader or a printer) to be tested through the interactive interface (such as a graphical user interface or a command line interface), the application layer generates a hardware test instruction according to the user's selection. The instruction contains the type of test (such as a function test or a performance test) and the identification of the target hardware module. The application layer then generates an API request according to these information by calling the API function encapsulated in the SDK. The purpose of generating the API request is to convert the hardware test instruction initiated by the user into a standardized request format, so as to be able to communicate with the underlying hardware through the software interface.

[0087] In step S20, the application programming interface request is sent to the service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives at least one target hardware corresponding to the hardware test instruction to perform a test operation through the serial peripheral interface function, generates test data, and returns the test data to the hardware test tool.

[0088] For example, the API request generated by the application layer passes through the service manager and the device driver, and finally reaches the SPI function. The SPI function is responsible for converting the API request into an instruction that the hardware can understand, and driving the hardware to perform a test operation to generate test data.

[0089] For example, in the embodiment of the present application, the SDK is developed in compliance with the WOSA protocol standard, and the API function is provided through the encapsulated SDK. The XFS service manager is the middle layer, which is responsible for mapping the API request of the application layer to the SPI function of the underlying hardware. It verifies the legality of the request and forwards the request to the corresponding SP layer. The SP layer is the service providing layer, which directly communicates with the hardware device. It implements the SPI interface, which is responsible for converting the request of the application layer into a specific hardware operation. The SP layer communicates with the hardware device through the hardware interface (such as serial port, USB, etc.), and performs specific hardware operations (such as reading card, printing, etc.). After the hardware device completes the operation, it returns the test data to the SP layer. The SP layer returns the test data to the XFS manager through the SPI function.

[0090] In step S30, the test data sent by the service manager is received, and the test result of the at least one target hardware is determined according to the test data.

[0091] For example, the step of determining the test result of the at least one target hardware according to the test data comprises:

[0092] The test data is returned to the service manager by the device driver for packet conversion and / or information extraction of the test data by the service manager to obtain the test result of the at least one target hardware.

[0093] For example, the XFS service manager and the SP layer communicate through the Windows message mechanism. After processing the request, the SP layer sends a completion message to the XFS service manager, including the request sequence number, status code and other related information.

[0094] For example, the XFS service manager unpacks these information and returns them to the application layer to complete the entire test process. Through this layered architecture, the hardware testing of the financial self-service device can be efficiently and flexibly performed, while ensuring the maintainability and scalability of the system.

[0095] For example, the device driver returns the test data to the XFS service manager, and the XFS service manager performs packet conversion and / or information extraction on the test data to obtain the test result of the target hardware. Packet conversion includes converting the test data into a data format that can be directly read by the application layer, and information extraction includes extracting key information from the test data, such as card numbers, balances and user information read by the card reader. The test result can be a simple judgment of whether the hardware is working properly or detailed performance indicators. The application layer can also generate visual analysis charts based on the test result to help maintenance personnel quickly locate problems.

[0096] The embodiment provides a method for executing hardware testing without relying on a business menu, avoiding the lag of executing hardware testing through a business menu, improving the efficiency of hardware testing, generating an application programming interface request according to a hardware testing instruction, sending the application programming interface request to a service manager, calling a serial peripheral interface function based on the application programming interface request, driving at least one target hardware corresponding to the hardware testing instruction to perform a test operation through the serial peripheral interface function, generating test data, returning the test data to the hardware testing tool, receiving the test data sent by the service manager, determining the test result of the at least one target hardware according to the test data, and providing a general test method suitable for various types of hardware, facilitating the use and maintenance of the hardware testing tool, and meeting the efficiency and uniformity requirements of hardware testing of financial institutions.

[0097] Based on the first embodiment of the present application, the second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar contents as the above-mentioned first embodiment can be referred to the above description, and the subsequent description will not be repeated.

[0098] On this basis, please refer to Figure 3 , step S10 includes steps S101-S103:

[0099] Step S101, selecting or determining the application programming interface identifier and operation parameters according to the hardware test instruction through the application layer;

[0100] Step S102, calling the application programming interface function provided by the software development tool layer according to the application programming interface identifier;

[0101] Step S103, generating the application programming interface request according to the application programming interface function and the operation parameters.

[0102] Illustratively, the step of calling the application programming interface function provided by the software development tool layer according to the application programming interface identifier further includes:

[0103] Developing the software development tool layer according to a preset protocol standard, wherein the software development tool layer encapsulates a plurality of application programming interfaces, and the plurality of application programming interfaces correspond to the operation functions of each hardware module.

[0104] Illustratively, before calling the API function, the SDK layer needs to be developed according to the preset protocol standard. The SDK layer encapsulates a plurality of API functions, and these functions correspond to the operation functions of each hardware module. This process is the basis for efficient and standardized communication between the application layer and the hardware module, ensuring the compatibility and scalability of the system.

[0105] Illustratively, in the embodiment of the present application, the SDK layer is developed according to a preset protocol standard (such as WOSA / XFS protocol), and the API function is encapsulated. These API functions encapsulate the specific operation logic of the hardware module, so that the application layer can operate the hardware module by calling the API function.

[0106] Exemplarily, the encapsulation of the SDK can be directly according to the preset protocol standard, encapsulating the API function, or using a code generation template to automatically generate the encapsulation code of the API function according to the interface parameter information, or dynamically generating the encapsulation of the API function according to the runtime protocol standard. By developing the SDK layer according to the preset protocol standard and encapsulating a plurality of API functions, the application layer can interact with different hardware modules in a unified manner. This not only improves the compatibility and scalability of the system, but also simplifies the development work of the application layer and reduces the development cost. In addition, through the combination of dynamic encapsulation and template encapsulation, the system can adapt to changes in the protocol standard, ensuring long-term stability and flexibility.

[0107] Exemplarily, the application layer receives the hardware test instructions input by the user, and selects or determines the corresponding API identifier and operation parameters according to these instructions. This process is the basis of API request generation, ensuring that the application layer can accurately call the API functions provided by the SDK layer.

[0108] Exemplarily, the application programming interface identifier (API identifier) is a code or name used to uniquely identify the API function, helping the application layer to call the correct API function. The application layer parses the hardware test instructions input by the user to extract information about the target hardware module and the test type. According to this information, the application layer selects or determines the corresponding API identifier from the preset API function library, and extracts the operation parameters.

[0109] Exemplarily, the application programming interface function (API function) is a specific function provided by the SDK layer, used to implement specific hardware operations. The application layer looks up and calls the corresponding API function from the SDK layer according to the API identifier. The API function encapsulates the specific logic of the underlying hardware operation, enabling the application layer to interact with different hardware modules in a unified manner. For example, in a financial self-service device, the application layer calls the corresponding API function ReadCardTest() from the SDK layer according to the API identifier ReadCardTest. This function encapsulates the specific logic of the card reader test, enabling the application layer to complete complex hardware test operations through simple function calls.

[0110] The embodiment is based on the above scheme, and specifically based on the application layer selecting or determining the application programming interface identifier and the operation parameter according to the hardware test instruction; calling the application programming interface function provided by the software development tool layer according to the application programming interface identifier; and generating the application programming interface request according to the application programming interface function and the operation parameter. Through encapsulating multiple API functions, the application layer can interact with different hardware modules in a unified manner, and then complete complex hardware test operations through simple function calling, thereby meeting the efficiency and uniformity requirements of the financial institution on hardware testing.

[0111] Based on any one of the preceding embodiments, the third embodiment of the present application is proposed. In the third embodiment of the present application, the same or similar contents as any one of the preceding embodiments can be referred to the foregoing description, and will not be described hereinafter. On this basis, please refer to Figure 4 , after step S30, steps S401-S403 are further included:

[0112] In step S401, the test result of at least one target hardware transmitted by the service manager is received through the application layer, and / or the test result is compared with historical results and / or expected results through the application layer to generate performance change trend and / or fault prediction trend of the at least one target hardware.

[0113] Refer to Figure 5 , Figure 5 The schematic diagram is returned according to the result shown in the embodiment of the present application, as shown in Figure 5 , after the card reader hardware performs the test operation (for example, the card reading operation), the test data is generated and returned to the device driver, the device driver returns the test data to the XFS service manager through SPI, the XFS service manager receives the return result of the device driver, and analyzes the data or error information. The XFS service manager returns the processed result to the application layer through the API.

[0114] For example, after the application layer receives the card reading result, the subsequent processing is performed according to the data, such as verifying the user identity, performing transaction, etc. If the card reading fails, the application layer performs corresponding error processing according to the error information, for example, prompting the user to reinsert the card.

[0115] For example, after the application layer receives the test result, the current test result can be compared with the historical result or the expected result through the data comparison algorithm to generate the performance change trend and the fault prediction trend, and then stored or displayed to the user through the interface. For example, in the financial self-service device, after the application layer receives the test result of the card reader, the test result is compared with the historical result, it is found that the card reading speed gradually decreases, the performance change trend is generated, and the possible fault time is predicted.

[0116] In step S402, at least one of the test result, the performance change trend and the failure prediction trend of the at least one target hardware is displayed through the interactive interface, and / or an updated hardware test instruction is generated according to at least one of the test result, the performance change trend and the failure prediction trend of the at least one target hardware.

[0117] For example, the interactive interface can display the test result, the performance change trend and the failure prediction trend in a graphical or textual manner. The user can generate a new test instruction according to the information to further verify the hardware state, and the hardware test tool can also automatically generate a new test instruction to adjust the test parameters or scheme, and then perform a subsequent test process.

[0118] In the embodiment, the application layer receives the test result of the at least one target hardware sent by the service manager, and / or compares the test result with historical results and / or expected results through the application layer to generate a performance change trend and / or a failure prediction trend of the at least one target hardware. At least one of the test result, the performance change trend and the failure prediction trend of the at least one target hardware is displayed through the interactive interface, and / or an updated hardware test instruction is generated according to at least one of the test result, the performance change trend and the failure prediction trend of the at least one target hardware. The graphical or textual display of the interactive interface provides intuitive feedback for the user, and the test scheme is further improved to improve the accuracy of hardware testing.

[0119] Based on any one of the preceding embodiments of the present application, the fourth embodiment of the present application is proposed. In the fourth embodiment of the present application, the same or similar contents as any one of the preceding embodiments can be referred to the foregoing description, and will not be described hereinafter. On this basis, please refer to Figure 6 The method is applied to a service manager, and the hardware test method further includes steps A10-A20.

[0120] In step A10, an application programming interface request sent by a hardware test tool is received, wherein the application programming interface request is generated by the hardware test tool according to a hardware test instruction in response to the identification of the hardware test instruction.

[0121] In step A20, a serial peripheral interface function is called based on the application programming interface request, and the hardware test instruction is driven to perform a test operation on at least one target hardware corresponding to the hardware test instruction through the serial peripheral interface function to generate test data.

[0122] In step A30, the test data is returned to the hardware test tool, so that the hardware test tool determines a test result of the at least one target hardware according to the test data.

[0123] Exemplarily, the hardware testing tool provided in the embodiments of the present application can interact with the service manager, which comprises an application layer and a software development tool layer. The application layer is connected with an interactive interface, and can generate hardware testing instructions according to the operation instructions of the user on the interactive interface.

[0124] Exemplarily, the XFS service manager receives the API calling request from the application layer, verifies the parameters and the authority of the request, and ensures the legality of the API calling request, so as to ensure the security and stability of the system. In the case of passing the verification, the service manager is positioned to the corresponding device driver according to the device type of the API calling request.

[0125] Exemplarily, the calling logic is illustrated by taking the card reader as an example in the embodiments of the present application. First, the tool layer provides an external visual operation interface (interactive interface), such as the card reading operation. The ReadCard interface provided by the inline encapsulated SDK is called. The ReadCard interface inside the SDK layer is implemented by the API function: (1) opening module: corresponding to an API function, opening module entry, device initialization; (2) reading card: based on the initialization of the first step, corresponding to an API function, reading the information in the card; (3) returning the card number after reading the card successfully: based on the card information read in the second step, the information is returned to the ReadCard. The XFS service manager provides the mapping function from the API function to the SPI function, and defines the operation of each device module.

[0126] Exemplarily, the service manager determines the corresponding device driver according to the information in the API request, and calls the SPI function thereof. The SPI function encapsulates the specific logic of communicating with the hardware device, so that the service manager can interact with different hardware devices in a unified manner. The service manager sends the SPI function to the device driver, and the device driver drives the target hardware to perform the testing operation according to the SPI function, and generates the testing data.

[0127] Exemplarily, the example functions of each hardware module that can be executed by the hardware testing tool in the embodiments of the present application are as follows:

[0128] Card reader: opening module, card suction, card reading, card ejection, card reader reset, card returner reset, batch card reading;

[0129] Identity card: opening module, card suction, card reading, card ejection, reset;

[0130] Camera: opening module, photographing, closing camera;

[0131] Barcode: opening module, code scanning and identification, closing code scanning;

[0132] Printer: open module, select page number printing, select template printing, batch printing.

[0133] The card reader reading function is taken as an example in the embodiments of the present application for illustration, with reference to Figure 7 , Figure 7 The whole flowchart of the hardware testing method shown in the embodiments of the present application is shown in FIG. 1, and specifically:

[0134] (1) Application layer calls API function; when the application layer needs to read card information, an API function provided by WOSA / XFS is called, for example, XFS_READCARD. The card reading request is sent through the API, including necessary parameters such as the card type (magnetic stripe card, smart card, etc.) and the reading mode;

[0135] (2) XFS service manager processes API request; the XFS service manager receives the API call request from the application, verifies the parameters and permissions of the request, and ensures that the request is legal. According to the device type of the request, the service manager is positioned to the corresponding device driver;

[0136] (3) XFS service manager calls SPI function; the service manager calls the related function of the device driver through SPI (service providing interface), for example, SPI_READCARD. The SPI function is responsible for converting the API request into a command that can be understood by the device driver, and sending it to the device driver;

[0137] (4) Device driver interacts with hardware: after receiving the SPI call request, the device driver communicates with the card reader hardware, and sends the card reading command to the card reader. The card reader performs the reading operation and obtains the card data. If an error occurs during the card reading process (such as the card is not inserted, the card is damaged, etc.), the driver will capture the error information and prepare to return to the service manager;

[0138] (5) Return card reading result: after the card reader completes the operation, the card data or error information read by the card reader is returned to the device driver. The device driver returns the result to the XFS service manager through SPI;

[0139] (6) XFS service manager processes returned result: the service manager receives the returned result of the device driver and analyzes the data or error information. The service manager returns the processed result to the application through the API. Message conversion and information extraction;

[0140] (7) Application layer processes returned result: after receiving the card reading result, the application processes the data for subsequent processing, such as verifying the user's identity, conducting transactions, etc. If the card reading fails, the application layer processes the error according to the error information, for example, prompting the user to reinsert the card.

[0141] The unified device hardware test tool provided by the embodiment of the application accelerates the device hardware function and stability test speed, saves test time, and makes hardware verification no longer dependent on business, so that hardware can be verified separately, normal use of hardware in device application is ensured in advance, and subsequent business access is guaranteed.

[0142] The embodiment provides the method for executing hardware test without relying on business menu, avoids the lag of executing hardware test by using business menu, improves the hardware test efficiency, generates the application programming interface request according to the hardware test instruction, provides the general test method suitable for various hardware, facilitates the use and maintenance of the hardware test tool, and meets the efficiency and uniformity requirements of the financial institution on hardware test.

[0143] It should be noted that the above examples are only used for understanding the application and do not constitute a limitation on the hardware test method of the application. More forms of simple transformation based on the technical concept are within the protection scope of the application.

[0144] The application further provides a hardware test device, please refer to Figure 8 , the hardware test device comprises:

[0145] The response module 10 is configured to generate an application programming interface request according to the hardware test instruction in response to identifying the hardware test instruction;

[0146] The execution module 20 is configured to call a serial peripheral interface function based on the application programming interface request, and drive at least one target hardware corresponding to the hardware test instruction to perform a test operation through the serial peripheral interface function, and generate test data.

[0147] The determination module 30 is configured to determine a test result of the at least one target hardware according to the test data.

[0148] The hardware testing device provided in this application, employing the hardware testing method of the aforementioned embodiment, can solve the technical problems of hardware testing. Compared with the prior art, the beneficial effects of the hardware testing device provided in this application are the same as those of the hardware testing method provided in the aforementioned embodiment, and the other technical features of the hardware testing device are the same as those disclosed in the aforementioned embodiment method, and are not further described here.

[0149] The present application provides a hardware testing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the hardware testing method in the above-mentioned embodiment one.

[0150] Reference below Figure 9 , which shows a schematic diagram of the structure of a hardware test device suitable for implementing the embodiments of the present application. The hardware test device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The hardware testing device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0151] like Figure 9As shown, the hardware testing device can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory 1002 or programs loaded from a storage device 1003 into a random access memory 1004. Various programs and data required for the operation of the hardware testing device are also stored in the random access memory 1004. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other by a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the hardware testing device to communicate with other devices wirelessly or by wire to exchange data. Although the hardware testing device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.

[0152] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.

[0153] The hardware testing device provided by the present application adopts the hardware testing method in the above-mentioned embodiments, and can solve the technical problem of hardware testing. Compared with the prior art, the hardware testing device provided by the present application has the same beneficial effects as the hardware testing method provided by the above-mentioned embodiments, and other technical features in the hardware testing device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0154] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0155] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0156] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer programs) for performing the hardware testing method in the above embodiments.

[0157] The computer readable storage medium provided by the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination of the above.

[0158] The above computer readable storage medium can be contained in the hardware testing device; or can exist separately without being assembled into the hardware testing device.

[0159] The computer readable storage medium carries one or more programs, when the one or more programs are executed by the hardware test device, the hardware test device is caused to: generate an application programming interface request according to the hardware test instruction in response to identifying the hardware test instruction; send the application programming interface request to the service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives at least one target hardware corresponding to the hardware test instruction to perform a test operation through the serial peripheral interface function, generates test data, and returns the test data to the hardware test tool; receive the test data sent by the service manager, and determine a test result of the at least one target hardware according to the test data, thereby providing a method for performing hardware test without relying on a business menu, avoiding the lag of performing hardware test by using the business menu, and improving the efficiency of hardware test; and by generating an application programming interface request according to a hardware test instruction, a general test method suitable for various types of hardware is provided, the use and maintenance of the hardware test tool are facilitated, and the needs of financial institutions for efficient and unified hardware test are met.

[0160] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0161] The flow and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flow and block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may be executed in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0162] The modules involved in the embodiments of the present application can be implemented in software or in hardware. In some cases, the names of the modules do not limit the modules themselves.

[0163] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the hardware testing method described above, and can solve the technical problem of hardware testing. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the hardware testing method provided by the above-mentioned embodiments, which will not be repeated here.

[0164] The present application also provides a computer program product, comprising a computer program, which is executed by a processor to implement the steps of the hardware testing method as described above.

[0165] The computer program product provided by the present application can solve the technical problem of hardware testing. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the hardware testing method provided by the above-mentioned embodiments, which will not be repeated here.

[0166] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. A hardware testing method, characterized by, The method is applied to a hardware test tool, and the method comprises: in response to identifying a hardware test instruction, generating an application programming interface request according to the hardware test instruction; sending the application programming interface request to a service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives at least one target hardware corresponding to the hardware test instruction to perform a test operation through the serial peripheral interface function, generates test data, and returns the test data to the hardware test tool; receiving the test data sent by the service manager, and determining a test result of the at least one target hardware according to the test data.

2. The hardware testing method of claim 1, wherein, The hardware test tool comprises an application layer and a software development tool layer, and the step of generating an application programming interface request according to the hardware test instruction comprises: selecting or determining an application programming interface identifier and operation parameters according to the hardware test instruction through the application layer; calling an application programming interface function provided by the software development tool layer according to the application programming interface identifier; generating the application programming interface request according to the application programming interface function and the operation parameters.

3. The hardware testing method of claim 2, wherein, The step of calling the application programming interface function provided by the software development tool layer according to the application programming interface identifier further comprises: developing the software development tool layer according to a preset protocol standard, wherein the software development tool layer encapsulates a plurality of application programming interfaces, and the plurality of application programming interfaces correspond to operation functions of hardware modules; The step of generating an application programming interface request according to the hardware test instruction in response to identifying the hardware test instruction further comprises: displaying selection controls corresponding to the hardware modules on an interactive interface; receiving an operation instruction of a user for the selection controls, and generating the hardware test instruction according to the operation instruction.

4. The hardware testing method of claim 3, wherein, The step of receiving the test data sent by the service manager and determining the test result of the at least one target hardware according to the test data further comprises: receiving the test result of the at least one target hardware sent by the service manager through the application layer, and / or comparing the test result with historical results and / or expected results through the application layer to generate performance change trends and / or fault prediction trends of the at least one target hardware; displaying at least one of the test result, the performance change trends and the fault prediction trends of the at least one target hardware through the interactive interface, and / or generating updated hardware test instructions according to at least one of the test result, the performance change trends and the fault prediction trends of the at least one target hardware.

5. A hardware testing method, characterized by, The method is applied to a service manager, and the method comprises: receiving an application programming interface request sent by a hardware test tool, wherein the application programming interface request is generated by the hardware test tool in response to identifying a hardware test instruction according to the hardware test instruction; The serial peripheral interface function is called based on the application programming interface request, and the serial peripheral interface function is used to drive the at least one target hardware corresponding to the hardware test instruction to perform a test operation, and test data is generated; The test data is returned to the hardware test tool, so that the hardware test tool determines a test result of the at least one target hardware according to the test data.

6. The hardware testing method of claim 2, wherein, The step of calling the serial peripheral interface function based on the application programming interface request and driving the at least one target hardware corresponding to the hardware test instruction to perform a test operation by using the serial peripheral interface function includes: Verifying the legality of the application programming interface request; If the legality of the application programming interface request is verified, a device driver corresponding to the application programming interface request is determined, and a serial peripheral interface function of the device driver is called; The serial peripheral interface function is sent to the device driver, so that the device driver drives the at least one target hardware corresponding to the hardware test instruction to perform a test operation according to the serial peripheral interface function.

7. A hardware testing apparatus, characterized by, The device is applied to a hardware test tool, and the device includes: A response module is configured to generate an application programming interface request according to a hardware test instruction in response to identifying the hardware test instruction; An execution module is configured to send the application programming interface request to a service manager, so that the service manager calls a serial peripheral interface function based on the application programming interface request, and drives the at least one target hardware corresponding to the hardware test instruction to perform a test operation by using the serial peripheral interface function, generates test data, and returns the test data to the hardware test tool; A determination module is configured to receive the test data sent by the service manager, and determine a test result of the at least one target hardware according to the test data.

8. A hardware testing device, characterized by The device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the hardware test method in any one of claims 1 to 6.

9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program. The computer program is executed by the processor to implement the steps of the hardware test method in any one of claims 1 to 6.

10. A computer program product, characterised in that, The computer program product includes a computer program, and the computer program is executed by the processor to implement the steps of the hardware test method in any one of claims 1 to 6.