Simulation debugging method, system and equipment of bill module SP and medium
By developing simulated dynamic libraries and simulated bill configurations, debugging of bill module SP without real bills is realized, solving the problem of unspecified specification details and safety hazards, and improving debugging efficiency and scope of application.
Patent Information
- Application Number
- CN202410818156.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-11-08
AI Technical Summary
In the prior art, the bill module does not stipulate the details in the application of financial smart terminals, which leads to different project requirements that require different debugging, and there are security risks in the outgoing of blank bills, which makes it impossible to obtain real bills for effective debugging.
Develop a simulation dynamic library, provide the same interface as the real library, conduct interface testing through the simulation library and simulated bill configuration, use simulated data to verify the false results, and use white paper as simulated bills to achieve the operation without real bills. debug.
It realizes SP debugging without tickets, saves on-site debugging time, improves debugging efficiency and scope of application, and ensures security.
Smart Images

Figure CN118916259A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation test technology. Specifically, the present invention is applied to the field of financial intelligent terminals, and in particular to a simulation debugging method, system, device and medium for a bill module SP. Background Art
[0002] At present, the bill module is increasingly used in financial intelligent terminals, and SP is also increasingly used. Although SP follows the interface specification of the WOSA-XFS protocol, the specification does not specify some details, such as what authentication data to return and in what format to return data. The requirements of different projects will be different, and SP needs to be debugged for different projects. However, due to the security risks of the outbound transmission of blank bills, banks are more cautious about this, resulting in many projects being unable to obtain real bills during company debugging and unable to conduct effective debugging.
[0003] In summary, the existing solutions have the following defects: 1. The specification does not specify the details, resulting in the need to debug SP at different times for different project requirements; 2. The circulation of blank invoices poses a security risk, which prevents the company from obtaining real invoices for debugging. Summary of the invention
[0004] The object of the present invention is to provide a simulation debugging method, system, device and medium for a bill module SP, so as to solve all or one of the above problems existing in the prior art.
[0005] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows: In one aspect, the present invention provides a simulation debugging method for a bill module SP, comprising the following steps: Develop a simulation dynamic library, configure the simulation library and the simulation bill based on the simulation dynamic library; and perform interface testing based on the simulation library and the simulation bill.
[0006] As an improved solution, the development of the simulation dynamic library includes: The simulated dynamic library is developed and configured to provide the same interface as the real library.
[0007] As an improved solution, the interface calling logic of the simulated dynamic library includes: For action operations, call the interface provided by the bill module manufacturer; For counterfeit detection data, the simulated data is hard-coded into the dynamic library according to the format of the data returned by the manufacturer; For cases where exceptions need to be simulated, the simulation library is set to read the configuration file in real time.
[0008] As an improved solution, the simulation library and simulation bill configuration include: Configure the device library loaded by SP as described in Simulate Dynamic Library.
[0009] As an improved solution, the simulation library and simulation bill configuration further include: White paper is cut into the same size as an actual bill to serve as the simulated bill.
[0010] As an improved solution, the interface test includes: Use XFSTest or test software to call the corresponding interface to perform case testing; For action operations, the verification is performed based on actual on-site phenomena; For verification of the authentication results, the expected results are obtained based on the simulated data and then checked against the results returned by the SP; For verification of device status exception cases, modify the configuration file to check whether the returned result is consistent with the expected result.
[0011] As an improved solution, The interface test further comprises: In response to the verification results being consistent, it is determined that the SP processing is normal.
[0012] On the other hand, the present invention also provides a simulation debugging system for a bill module SP, comprising: Simulation library development module, used to: develop simulation dynamic library; A simulation library configuration module, used to: configure the simulation library based on the simulation dynamic library; A bill simulation module, used to: simulate bill configuration based on the simulation dynamic library; The interface testing module is used to perform interface testing based on the simulation library and the simulation bill.
[0013] On the other hand, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the simulation debugging method of the ticket module SP are implemented.
[0014] On the other hand, the present invention further provides a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the simulation debugging method of the ticket module SP by running the program stored in the memory.
[0015] The beneficial effects of the technical solution of the present invention are: 1. The simulation debugging method of the bill module SP described in the present invention can implement a simulation debugging solution, and then implement SP debugging without bills; after getting the real bills on site, use the real library for verification, saving on-site debugging time and improving debugging efficiency and scope of application.
[0016] 2. The simulation debugging system of the bill module SP described in the present invention can realize the simulation debugging method of the bill module SP described in the present invention through the mutual cooperation of system modules.
[0017] 3. The computer-readable storage medium described in the present invention can realize the cooperation of the guiding system module, thereby realizing the simulation debugging method of the ticket module SP described in the present invention, and the computer-readable storage medium described in the present invention also effectively improves the operability of the simulation debugging method of the ticket module SP.
[0018] 4. The computer device described in the present invention can store and execute the computer-readable storage medium, thereby realizing the simulation debugging method of the ticket module SP described in the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 It is a flowchart of the simulation debugging method of the bill module SP described in Example 1 of the present invention; Figure 2 It is a detailed flowchart of the simulation debugging method of the bill module SP described in Example 1 of the present invention; Figure 3 Schematic diagram of the architecture of the simulation debugging system of the bill module SP according to Embodiment 2 of the present invention; Figure 4 is a schematic diagram of the structure of the computer device described in Example 4 of the present invention; The symbols in the accompanying drawings are explained as follows: 1501, processor; 1502, communication interface; 1503, memory; 1504, communication bus. DETAILED DESCRIPTION
[0021] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0022] In the description of the present invention, it should be noted that the embodiments described in the present invention are only part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0023] The terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0024] In the description of the present invention, it should be noted that deposit slips, checks, etc. are commonly used bills in daily life. In the past, the handling of bill business required manual handling at the counter. With the development of information technology, the degree of intelligence of financial terminal equipment is getting higher and higher, and the bill module is gradually applied to financial intelligent terminals. Now, the financial terminal equipment of many banks includes a bill module. As a part of the financial terminal equipment, the SP of the bill module complies with the WOSA-XFS protocol specification. SP (Service Provider), in simple terms, is a device driver that complies with the WOSA-XFS protocol specification. Example 1
[0025] This embodiment provides a simulation debugging method of a ticket module SP, such as Figure 1 and Figure 2 As shown, the following steps are included: The core function of the present invention is to debug the bill module SP based on simulation, so as to avoid the problem that the SP cannot be debugged when there is no real bill. The specific steps are as follows: S100, simulation library development: Specifically, we develop simulated dynamic libraries that provide the same interfaces as real libraries and implement different types of interfaces; Specifically, the simulated dynamic library interface is consistent with the interface provided by the real library, but differs in terms of interface implementation; Specifically, the interface implementation of the simulated dynamic library includes three types of processing logic, as follows: (I) For action operations (such as ticket absorption, box storage, ticket return and collection), the interface provided by the ticket module manufacturer is called without any special processing; (ii) For authentication data, simulated data is hard-coded into the dynamic library in the format of the data returned by the manufacturer; the content of the simulated data is written in a form that does not actually exist and is not obtained by reading the configuration file. It is only used to verify whether the SP processing flow is normal to prevent misuse of this virtual library and cause security risks; (III) For cases where certain abnormalities need to be simulated (such as equipment offline, ticket box full, etc.), a simulation library is set up to read the configuration file in real time; if the content in the configuration file does not exist, the configuration file returned by the manufacturer interface is used, and the simulation test effect is achieved through manual modification; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.
[0026] S200, simulation library configuration: Specifically, configure the device library loaded by SP according to the above-mentioned simulated dynamic library; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.
[0027] S300, bill simulation: Specifically, to simulate a real bill, white paper is cut into the same width and height as the actual bill to serve as a simulated bill; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.
[0028] S400, interface test: Specifically, through XFSTest or the test software provided by the application, call the corresponding interface to perform case testing; Specifically, for the verification of action operations (such as ticket absorption, ticket return, and recycling), the verification is judged based on the actual on-site phenomena; Specifically, for the verification of the authentication result, the expected result is obtained based on the simulated data and checked with the result returned by the SP; Specifically, for verification of abnormal cases such as device status, the configuration file is modified to verify whether the returned results are consistent with expectations; Specifically, if the above verifications are consistent, it means that the SP processing is normal; Specifically, if there are inconsistencies in the above verification, you need to check the code to find the problem and achieve the debugging purpose; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.
[0029] In summary, through this simulated dynamic library, SP debugging can be achieved without tickets; after getting the real tickets on site, the real library can be used for verification, saving on-site debugging time and improving debugging efficiency and scope of application. Example 2
[0030] This embodiment is based on the same inventive concept as the simulation debugging method of a bill module SP described in Embodiment 1, and provides a simulation debugging system for a bill module SP, such as Figure 3 As shown, including: The simulation library development module is used to develop simulation dynamic libraries. The dynamic libraries provide the same interfaces as the real libraries and implement different types of interfaces. The simulation dynamic library interfaces are consistent with the interfaces provided by the real libraries, but they differ in interface implementation. The interface implementation of the simulation dynamic library includes three types of processing logic, as follows: (I) For action operations (such as ticket absorption, box storage, ticket return and collection), the interface provided by the ticket module manufacturer is called without any special processing; (ii) For authentication data, simulated data is hard-coded into the dynamic library in the format of the data returned by the manufacturer; the content of the simulated data is written in a form that does not actually exist and is not obtained by reading the configuration file. It is only used to verify whether the SP processing flow is normal to prevent misuse of this virtual library and cause security risks; (III) For cases where certain abnormalities need to be simulated (such as equipment offline, ticket box full, etc.), a simulation library is set up to read the configuration file in real time; if the content in the configuration file does not exist, the configuration file returned by the manufacturer interface is used, and the simulation test effect is achieved through manual modification; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.
[0031] The simulation library configuration module is used to: configure the device library loaded by SP according to the above simulation dynamic library; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.
[0032] The bill simulation module is used to: simulate the real bill, cut the white paper into the same width and height as the actual bill, and use it as a simulated bill; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention.
[0033] The interface test module is used to: call the corresponding interface through XFSTest or the test software provided by the application to perform case tests; for the verification of action operations (such as ticket absorption, ticket return, and recycling), the verification is based on the actual on-site phenomena; for the verification of the counterfeit detection results, the expected results are obtained based on the simulated data and verified with the results returned by the SP; for the verification of abnormal cases such as device status, the configuration file is modified to verify whether the returned results are consistent with the expectations; if the above verifications are consistent, it means that the SP processing is normal; if there are inconsistencies in the above verifications, it is necessary to check the code to troubleshoot the problem and achieve the debugging purpose; It should be noted that the above examples are only for explaining the present invention and cannot limit the protection scope of the present invention. Example 3
[0034] This embodiment provides a computer-readable storage medium, including: The storage medium is used to store computer software instructions used to implement the simulation debugging method of the ticket module SP described in the above-mentioned embodiment 1, which includes a program for executing the above-mentioned simulation debugging method for the ticket module SP; specifically, the executable program can be built into the simulation debugging system of the ticket module SP described in embodiment 2, so that the simulation debugging system of the ticket module SP can implement the simulation debugging method of the ticket module SP described in embodiment 1 by executing the built-in executable program.
[0035] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof. Example 4
[0036] This embodiment provides an electronic device, such as Figure 4 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0037] Memory 1503, used for storing computer programs; The processor 1501 is used to implement the steps of the simulation debugging method of the ticket module SP described in the above embodiment 1 when executing the computer program stored in the memory 1503.
[0038] As an embodiment of the present invention, the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0039] As an implementation mode of the present invention, the communication interface is used for communication between the above-mentioned terminal and other devices.
[0040] As an embodiment of the present invention, the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0041] As an embodiment of the present invention, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0042] Different from the prior art, the present application provides a simulation debugging method, system, device and medium for a bill module SP, which can realize SP debugging without bills; after obtaining the real bills on site, the real library is used for verification, which saves on-site debugging time and improves debugging efficiency and scope of application.
[0043] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0044] It should also be understood that in the embodiments of this document, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects before and after are in an "or" relationship.
[0045] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.
[0046] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0047] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0048] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.
[0049] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
[0050] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0051] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A simulation debugging method for a bill module SP, characterized in that: The following steps are involved: Develop a simulation dynamic library, and perform simulation library and simulation bill configuration based on the simulation dynamic library; Interface testing is performed based on the simulation library and the simulation ticket.
2. The simulation debugging method of the bill module SP according to claim 1, characterized in that: The development simulation dynamic library comprises: The simulated dynamic library is developed and configured to provide the same interface as the real library.
3. The simulation debugging method of the bill module SP according to claim 1, characterized in that: The interface calling logic of the simulated dynamic library includes: For action operations, call the interface provided by the bill module manufacturer; For counterfeit detection data, the simulated data is hard-coded into the dynamic library according to the format of the data returned by the manufacturer; For cases where exceptions need to be simulated, the simulation library is set to read the configuration file in real time.
4. The simulation debugging method of the bill module SP according to claim 1, characterized in that: The simulation library and simulation bill configuration include: Configure the device library loaded by SP as described in Simulate Dynamic Library.
5. The simulation debugging method of the bill module SP according to claim 1, characterized in that: The simulation library and simulation bill configuration also include: White paper is cut into the same size as an actual bill to serve as the simulated bill.
6. The simulation debugging method of the bill module SP according to claim 1, characterized in that: The interface test includes: Use XFSTest or test software to call the corresponding interface to perform case testing; For action operations, the verification is performed based on actual on-site phenomena; For verification of the authentication results, the expected results are obtained based on the simulated data and then checked against the results returned by the SP; For verification of device status exception cases, modify the configuration file to check whether the returned result is consistent with the expected result.
7. The simulation debugging method of the bill module SP according to claim 6, characterized in that: The interface test further comprises: In response to the verification results being consistent, it is determined that the SP processing is normal.
8. A simulation debugging system for a bill module SP, characterized in that: include: Simulation library development module, used to: develop simulation dynamic library; A simulation library configuration module, used to: configure the simulation library based on the simulation dynamic library; A bill simulation module, used to: simulate bill configuration based on the simulation dynamic library; The interface testing module is used to perform interface testing based on the simulation library and the simulation bill.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the simulation debugging method of the ticket module SP according to any one of claims 1 to 7 are implemented.
10. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the simulation debugging method of the ticket module SP according to any one of claims 1 to 7 by running the program stored in the memory.
