A card reader adaptation control method, system and medium for a self-service terminal
By using a card reader adaptation control method for self-service terminals, and utilizing editable configuration files and instruction parsing programs, automated adaptation to different card reader models is achieved. This solves the problems of high development difficulty and high maintenance costs caused by frequent card reader updates, thereby improving development efficiency and reducing the maintenance costs of terminal equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR FINANCIAL INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2021-12-21
- Publication Date
- 2026-05-29
Smart Images

Figure CN114356415B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of terminal card reader control technology, and in particular to a card reader adaptation control method, system and medium for self-service terminals. Background Technology
[0002] Currently, when card reader components are updated or new models of card readers are added to self-service terminal equipment, the software developers responsible for the terminal equipment need to redevelop the SDK of the new card reader according to the native product interface of the terminal equipment because the baud rate and communication protocol requirements of various card reader models are different. However, since the card reader is updated and iterated quickly and the update cycle is short during the use of terminal equipment, this will result in high development difficulty, many repetitive developments, low development efficiency, and ultimately consume a lot of manpower costs in the maintenance of terminal equipment. Summary of the Invention
[0003] The present invention mainly addresses the problem that the card reader of current terminal devices is updated and iterated very quickly and the update cycle is very short. This leads to high development difficulty for developers, many repetitive developments, low development efficiency, and ultimately consumes a lot of manpower costs in the maintenance of terminal devices.
[0004] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is: to provide a card reader adaptation control method for self-service terminals, comprising the following steps:
[0005] Initial configuration steps:
[0006] Configure the host terminal, including the card control application, instruction parsing program, and configuration file generation program.
[0007] File generation steps:
[0008] Set a configuration file specification table, and perform a configuration file generation operation based on the configuration file generation program and the configuration file specification table to obtain an editable configuration file;
[0009] Card adapter adaptation steps:
[0010] The system detects changes to the card / machine interface on the host side and performs card / machine adaptation and interaction operations based on the card / machine control application, the instruction parsing program, the editable configuration file, and the changes to the card / machine interface.
[0011] As an improved solution, the host computer stores a hardware detection program;
[0012] The configuration file specification table stores several card model information and several serial communication format specification tables, several control instruction specification tables, several function instruction specification tables, several status code specification tables and several fault code specification tables that each match several card model information.
[0013] The card reader change situation includes a first situation and a second situation; the first situation is that there is a card reader change; the second situation is that there is no card reader change.
[0014] As an improved approach, the configuration file generation operation includes:
[0015] Identify the serial port standard character mapping relationships corresponding to the aforementioned serial port communication format specification tables; identify the control instruction character mapping relationships corresponding to the aforementioned control instruction specification tables; identify the function instruction character mapping relationships corresponding to the aforementioned function instruction specification tables; identify the status code character mapping relationships corresponding to the aforementioned status code specification tables; identify the fault code character mapping relationships corresponding to the aforementioned fault code specification tables.
[0016] The editable configuration file is obtained by importing several serial port specification character mapping relationships, several control instruction character mapping relationships, several function instruction character mapping relationships, several status code character mapping relationships, and several fault code character mapping relationships into the configuration file generation program.
[0017] As an improved solution, the editable configuration file is provided with several first conversion logics, several second conversion logics, several third conversion logics, several fourth conversion logics, and several fifth conversion logics;
[0018] A plurality of first conversion logics are respectively matched with a plurality of serial port specification character mapping relationships; a plurality of second conversion logics are respectively matched with a plurality of control instruction character mapping relationships; a plurality of third conversion logics are respectively matched with a plurality of function instruction character mapping relationships; a plurality of fourth conversion logics are respectively matched with a plurality of status code character mapping relationships; and a plurality of fifth conversion logics are respectively matched with a plurality of fault code character mapping relationships.
[0019] As an improved solution, the step of detecting card-receiver changes on the host side and performing card-receiver adaptation and interaction operations based on the card-receiver control application, the instruction parsing program, the editable configuration file, and the card-receiver changes further includes:
[0020] Obtain the first model information of the first card reader connected to the host; set a detection cycle, and call the hardware detection program every detection cycle to detect the second model information of the first card reader connected to the host; determine whether the second model information matches the first model information; if they do not match, set the card reader change status to the first situation, and set the card reader corresponding to the second model information to the second card reader; if they match, set the card reader change status to the second situation.
[0021] When the card reader changes to the first situation, the card reader adaptation interaction operation is performed based on the card reader control application, the instruction parsing program, the editable configuration file, the second model information, and the second card reader;
[0022] The card reader adaptation and interaction operations include:
[0023] Based on the card controller application, the instruction parsing program, and the editable configuration file, an instruction generation step is executed; a waiting time period is set, and after executing the instruction generation step, a response identification step is executed based on the card controller application, the instruction parsing program, the editable configuration file, and the waiting time period.
[0024] As an improved approach, the instruction generation step includes:
[0025] The card reader control application is invoked to generate a first general instruction; the instruction parsing program is invoked to identify the instruction type of the first general instruction;
[0026] If the instruction type is control type, then the instruction parsing program is invoked to identify the second conversion logic that matches the second model information in the editable configuration file, and the second conversion logic is set as the second conversion logic to be referenced; the instruction parsing program is invoked to identify the first conversion logic that matches the second model information in the editable configuration file, and the first conversion logic is set as the first conversion logic to be referenced;
[0027] The instruction parsing program is invoked to convert the first general instruction into a first dedicated control instruction according to the second reference conversion logic; the instruction parsing program is invoked to set the first serial communication format according to the first reference conversion logic; and the instruction parsing program is invoked to send the first dedicated control instruction to the second card reader according to the first serial communication format.
[0028] As an improved approach, the response identification step includes:
[0029] After sending the first dedicated control command to the second card reader, the first dedicated response command of the second card reader is obtained after the waiting period.
[0030] The instruction parsing program is invoked to identify the first dedicated response instruction according to the first serial communication format, thereby obtaining the second response instruction to be parsed.
[0031] The instruction parsing program is invoked to identify the fourth conversion logic that matches the second model information in the editable configuration file, and the fourth conversion logic is set as the fourth conversion logic to be referenced.
[0032] The instruction parsing program is invoked to convert the second response instruction to be parsed into a first general response instruction according to the fourth reference conversion logic; the instruction parsing program is then invoked to send the first general response instruction to the host.
[0033] As an improved solution, the second conversion logic is based on hexadecimal character settings; the third conversion logic is based on character expression settings; and the fourth and fifth conversion logics are both based on double numeric characters and double alphabetic characters.
[0034] The present invention also provides a card reader adapter control system for self-service terminals, comprising:
[0035] Initial configuration module, configuration file generation module, and card adapter module;
[0036] The initial configuration module is used to configure the host terminal, and configure the card control application, instruction parsing program and configuration file generation program on the host terminal;
[0037] The configuration file generation module is used to set the configuration file specification table, and to perform configuration file generation operations based on the configuration file generation program and the configuration file specification table to obtain an editable configuration file;
[0038] The card reader adaptation module is used to detect changes in the card reader on the host side, and to perform card reader adaptation interactive operations based on the card reader control application, the instruction parsing program, the editable configuration file, and the changes in the card reader.
[0039] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the self-service terminal card reader adaptation control method.
[0040] The beneficial effects of this invention are:
[0041] 1. The self-service terminal card reader adaptation control method described in this invention can convert and process control commands for different card readers on the terminal device through an editable and updatable configuration file. When facing different card readers, the terminal device can automatically adapt to the card reader without repeatedly developing new SDKs, reducing the development difficulty and time for developers, lowering the maintenance cost of the terminal device, making up for the shortcomings of the prior art, and has certain application value.
[0042] 2. The self-service terminal card reader adaptation control system described in this invention can achieve the conversion and processing of control commands for different card readers on the terminal device through the cooperation of the initial configuration module, the configuration file generation module, and the card reader adaptation module. This is accomplished by using an editable and updatable configuration file. When faced with different card readers, the terminal device can automatically adapt to the card reader without repeatedly developing new SDKs, reducing the development difficulty and time for developers, lowering the maintenance cost of the terminal device, making up for the shortcomings of the prior art, and has certain application value.
[0043] 3. The computer-readable storage medium of the present invention enables the initial configuration module, configuration file generation module, and card reader adaptation module to work together, thereby enabling the conversion and processing of control instructions for different card readers on the terminal device through an editable and updateable configuration file. When facing different models of card readers, the terminal device can automatically adapt to card readers without repeatedly developing new SDKs, reducing the development difficulty and time for developers, lowering the maintenance cost of the terminal device, and effectively improving the operability of the card reader adaptation control method for self-service terminals. Attached Figure Description
[0044] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0045] Figure 1 This is a flowchart of the self-service terminal card reader adaptation control method described in Embodiment 1 of the present invention;
[0046] Figure 2 This is a schematic flowchart of the self-service terminal card reader adaptation control method described in Embodiment 1 of the present invention;
[0047] Figure 3 This refers to the serial communication format specification table described in Embodiment 1 of the present invention;
[0048] Figure 4 This is the control instruction specification table described in Embodiment 1 of the present invention;
[0049] Figure 5 This is the function instruction specification table described in Embodiment 1 of the present invention;
[0050] Figure 6 This refers to the status code specification table described in Embodiment 1 of the present invention;
[0051] Figure 7 This refers to the fault code specification table described in Embodiment 1 of the present invention;
[0052] Figure 8 This is an architecture diagram of the self-service terminal card reader adaptation control system described in Embodiment 2 of the present invention. Detailed Implementation
[0053] The preferred embodiments of the present invention will now be described in detail with reference to 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 providing a clearer and more explicit definition of the scope of protection of the present invention.
[0054] In the description of this invention, it should be noted that the embodiments described in this invention are only some embodiments of this invention, not all embodiments; based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0055] In the description of this invention, it should be noted that the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0056] In the description of this invention, it should be noted that SDK is a software development kit.
[0057] Example 1
[0058] This embodiment provides a card reader adaptation control method for self-service terminals, such as... Figures 1 to 7 As shown, it includes the following steps:
[0059] S100, initial configuration steps, specifically including:
[0060] S110. Configure the host terminal, and configure the card control application, instruction parsing program and configuration file generation program on the host terminal;
[0061] Specifically, the host is equipped with a hardware detection program; in this embodiment, the host is the host of the self-service terminal device; the card control application is an application program on the self-service terminal that performs interactive control between the host and the card reader; the instruction parsing program is a program used to convert and parse general instructions and special instructions according to the subsequent configuration file specification table; the configuration file generation program is a configuration file development tool used by the system during the development process; specifically, step S100 is the configuration step for basic data, which lays the groundwork for subsequent steps S200 and S300.
[0062] S200, the document generation steps specifically include:
[0063] S210. Set the configuration file specification table, and perform a configuration file generation operation based on the configuration file generation program and the configuration file specification table to obtain an editable configuration file;
[0064] Specifically, the configuration file specification table stores several card model information and several serial communication format specification tables, several control instruction specification tables, several function instruction specification tables, several status code specification tables and several fault code specification tables that each match several card model information.
[0065] Specifically, the configuration file generation process includes:
[0066] The system identifies several serial port communication format specification tables and their corresponding serial port specification character mapping relationships; it also identifies several control instruction specification tables and their corresponding control instruction character mapping relationships; it further identifies several function instruction specification tables and their corresponding function instruction character mapping relationships; it identifies several status code specification tables and their corresponding status code character mapping relationships; and it identifies several fault code specification tables and their corresponding fault code character mapping relationships. In this embodiment, the serial port communication format specification tables are as follows: Figure 3 As shown, the control instruction specification table is as follows: Figure 4 As shown, the function instruction specification table is as follows: Figure 5 As shown, the status code specification table is as follows: Figure 6 As shown, the fault code specification table is as follows: Figure 7 As shown; subsequently, several serial port specification character mapping relationships, several control instruction character mapping relationships, several function instruction character mapping relationships, several status code character mapping relationships, and several fault code character mapping relationships are imported into the configuration file generation program to obtain the editable configuration file;
[0067] Correspondingly, the editable configuration file contains several first conversion logics, several second conversion logics, several third conversion logics, several fourth conversion logics, and several fifth conversion logics; each logic corresponds to several card model; therefore, this method can update and iterate the editable configuration file according to the card model, only requiring the reconstruction of the corresponding specification table and its input into the configuration file generation program, further improving the applicability and scalability of this method; correspondingly, in this embodiment, several first conversion logics are matched with several serial port specification character mapping relationships, several second conversion logics are matched with several control instruction character mapping relationships, several third conversion logics are matched with several function instruction character mapping relationships, several fourth conversion logics are matched with several status code character mapping relationships, and several fifth conversion logics are matched with several fault code character mapping relationships.
[0068] S300 and SIM card adaptation steps, specifically including:
[0069] S310. Detect the card change status on the host side, and perform card adaptation interaction operation based on the card control application, the instruction parsing program, the editable configuration file and the card change status;
[0070] Specifically, the card change situation includes a first situation and a second situation; the first situation is that there is a card change; the second situation is that there is no card change.
[0071] Specifically, the system obtains the first model information of the first card reader connected to the current host, which is the card reader already connected to the host. A detection cycle is set; in this embodiment, the detection cycle is one week (24*5 hours). Every detection cycle, the hardware detection program on the host is called to detect the second model information of the card reader connected to the host. It is determined whether the second model information matches the first model information. If they do not match, it indicates that the card reader has changed and the model information is different. Therefore, the card reader change is determined to be the first case, meaning that the host has changed its card reader, and the card reader corresponding to the second model information is set as the second card reader. If they match, the card reader change is determined to be the second case, meaning that the host has not changed its card reader. When the card reader change is the first case, the adaptation interaction between the card reader and the host needs to be updated. Therefore, based on the editable configuration file, the second model information, and the second card reader, a card reader adaptation interaction operation is performed.
[0072] Specifically, the principle of the card-machine adaptation and interaction operation is as follows: First, the host terminal generates general card-machine control commands based on the editable configuration file. Then, through the cooperation between the command parsing program and the editable configuration file, the general commands are converted into card-machine-specific commands. After sending the card-machine-specific commands, the host waits for the card-machine response. Subsequently, through the cooperation between the command parsing program and the editable configuration file, the card-machine response commands are parsed back into general commands for the host terminal to recognize. Finally, the host terminal is adapted to any model of card-machine without the need for reconfiguration of the card-machine SDK, making it extremely intelligent.
[0073] Therefore, specifically, the card reader adaptation and interaction operation includes:
[0074] First, an instruction generation step is executed based on the card reader control application, the instruction parsing program, and the editable configuration file. A waiting time period is then set; in this embodiment, the waiting time period is 10 seconds, specifically set according to the card reader's response efficiency to the host. Higher response efficiency results in a shorter waiting time period. Therefore, after executing the instruction generation step, a response identification step is executed based on the card reader control application, the instruction parsing program, the editable configuration file, and the waiting time period.
[0075] Specifically, the instruction generation steps include:
[0076] The card controller control application is invoked to generate a first general instruction for the second card controller. For example, a mapping relationship of several serial port specification characters represents the correspondence between the host-side serial port specification and several serial port specification characters. This first general instruction is an instruction generated based on the host-side serial port specification, used for host-side identification. Furthermore, a single instruction can be mapped to several dedicated instructions for different card controllers based on several conversion logics in the programmable configuration file. Therefore, the instruction parsing program is invoked to identify the instruction type of the first general instruction. If the instruction type is control type, the instruction parsing program is invoked to identify the second conversion logic matching the second model information in the editable configuration file and set... The second conversion logic is a second reference conversion logic; the instruction parsing program is invoked to convert the first general instruction into a first dedicated control instruction according to the second reference conversion logic; the instruction parsing program is invoked to identify the first conversion logic matching the second model information in the editable configuration file, and set the first conversion logic as the first reference conversion logic; the instruction parsing program is invoked to set the first serial port communication format according to the first reference conversion logic; the instruction parsing program is invoked to send the first dedicated control instruction to the second card reader according to the first serial port communication format; after receiving the first dedicated control instruction, the second card reader will identify and process it, and respond accordingly;
[0077] Specifically, the response identification steps include:
[0078] After sending the first dedicated control command to the second card reader, after the waiting period, the host obtains the first dedicated response command of the second card reader. The command parsing program is called to identify the first dedicated response command according to the first serial communication format to obtain the second response command to be parsed. Therefore, the command parsing program is called to identify the fourth conversion logic matching the second model information in the editable configuration file and set the fourth conversion logic as the fourth reference conversion logic. The command parsing program is called to convert the second response command to be parsed into a first general response command according to the fourth reference conversion logic. At this time, the first general response command is a command that the host can recognize. The command parsing program is called to send the first general response command to the host.
[0079] Correspondingly, when executing the instruction generation step, if other instruction types are involved, adaptive adjustments are made. For example, when the instruction type is a function type, a third conversion logic matching the second model information is identified in the editable configuration file, and this third conversion logic is set as the third reference conversion logic; the above card-machine adaptation interaction operation is performed based on the third reference conversion logic. When the instruction type is a status identification type, a fourth conversion logic matching the second model information is identified in the editable configuration file, and this fourth conversion logic is set as the fourth reference conversion logic; the above card-machine adaptation interaction operation is performed based on the fourth reference conversion logic. When the instruction type is a fault identification type, a fifth conversion logic matching the second model information is identified in the editable configuration file, and this fifth conversion logic is set as the fifth reference conversion logic; the above card-machine adaptation interaction operation is performed based on the fifth reference conversion logic.
[0080] Correspondingly, in this embodiment, the second conversion logic is based on hexadecimal characters, the third conversion logic is based on character expressions, and the fourth and fifth conversion logics are both based on double-digit characters and double-letter characters; the standard characters corresponding to the specific conversion logics are shown in [link to specific conversion logic]. Figures 3-7 The specific information in the relevant specification tables in this method is shown in the table.
[0081] Example 2
[0082] This embodiment is based on the same inventive concept as the card reader adaptation control method for self-service terminals described in Embodiment 1, and provides a card reader adaptation control system for self-service terminals, such as... Figure 8 As shown, it includes: an initial configuration module, a configuration file generation module, and a card-to-device adaptation module;
[0083] In the self-service terminal card reader adaptation control system, the initial configuration module is used to configure the host terminal, and configure the card reader control application, instruction parsing program and configuration file generation program on the host terminal; specifically, the host terminal is configured with a hardware detection program.
[0084] In the self-service terminal card reader adaptation control system, the configuration file generation module is used to set the configuration file specification table, and to perform the configuration file generation operation based on the configuration file generation program and the configuration file specification table to obtain an editable configuration file;
[0085] Specifically, the configuration file specification table stores several card model information and several serial communication format specification tables, several control instruction specification tables, several function instruction specification tables, several status code specification tables and several fault code specification tables that each match several card model information.
[0086] Specifically, the configuration file generation operation includes: the configuration file generation module identifying several serial port standard character mapping relationships corresponding to several serial port communication format specification tables; the configuration file generation module identifying several control instruction character mapping relationships corresponding to several control instruction specification tables; the configuration file generation module identifying several function instruction character mapping relationships corresponding to several function instruction specification tables; the configuration file generation module identifying several status code character mapping relationships corresponding to several status code specification tables; the configuration file generation module identifying several fault code character mapping relationships corresponding to several fault code specification tables; and the configuration file generation module importing the several serial port standard character mapping relationships, several control instruction character mapping relationships, several function instruction character mapping relationships, several status code character mapping relationships, and several fault code character mapping relationships into the configuration file generation program to obtain the editable configuration file.
[0087] In the self-service terminal card reader adaptation control system, the card reader adaptation module is used to detect changes in the card reader on the host side, and to perform card reader adaptation interactive operations based on the card reader control application, the instruction parsing program, the editable configuration file, and the changes in the card reader.
[0088] Specifically, the card change situation includes a first situation and a second situation; the first situation is that there is a card change; the second situation is that there is no card change.
[0089] Specifically, the card-to-device adaptation module obtains the first model information of the first card-to-device connected to the host; the card-to-device adaptation module sets a detection cycle, and every detection cycle, the card-to-device adaptation module calls the hardware detection program to detect the second model information of the first card-to-device connected to the host; the card-to-device adaptation module determines whether the second model information matches the first model information; if they do not match, the card-to-device adaptation module sets the card-to-device change status to the first status, and sets the card-to-device corresponding to the second model information as the second card-to-device; if they match, the card-to-device adaptation module sets the card-to-device change status to the second status; when the card-to-device change status is the first status, the card-to-device adaptation module performs the card-to-device adaptation interaction operation based on the card-to-device control application, the instruction parsing program, the editable configuration file, the second model information, and the second card-to-device;
[0090] Specifically, the card-to-device adaptation interaction operation includes: the card-to-device adaptation module performing an instruction generation step based on the card-to-device control application, the instruction parsing program, and the editable configuration file; the card-to-device adaptation module setting a waiting time period, and after performing the instruction generation step, the card-to-device adaptation module performing a response identification step based on the card-to-device control application, the instruction parsing program, the editable configuration file, and the waiting time period.
[0091] Specifically, the instruction generation steps include: the card reader adaptation module calling the card reader control application to generate a first general instruction; calling the instruction parsing program to identify the instruction type of the first general instruction; if the instruction type is control type, the card reader adaptation module calling the instruction parsing program to identify a second conversion logic matching the second model information in the editable configuration file, and the card reader adaptation module setting the second conversion logic as a second reference conversion logic; the card reader adaptation module calling the instruction parsing program to identify a first conversion logic matching the second model information in the editable configuration file, and the card reader adaptation module setting the first conversion logic as a first reference conversion logic; the card reader adaptation module calling the instruction parsing program to convert the first general instruction into a first dedicated control instruction according to the second reference conversion logic; the card reader adaptation module calling the instruction parsing program to set a first serial communication format according to the first reference conversion logic; and the card reader adaptation module calling the instruction parsing program to send the first dedicated control instruction to the second card reader according to the first serial communication format.
[0092] Specifically, the response identification step includes: after the card reader adaptation module sends the first dedicated control command to the second card reader, it obtains the first dedicated response command of the second card reader after the waiting period; the card reader adaptation module calls the command parsing program to identify the first dedicated response command according to the first serial communication format to obtain the second response command to be parsed; the card reader adaptation module calls the command parsing program to identify the fourth conversion logic matching the second model information in the editable configuration file, and the card reader adaptation module sets the fourth conversion logic as the fourth reference conversion logic; the card reader adaptation module calls the command parsing program to convert the second response command to be parsed into a first general response command according to the fourth reference conversion logic; the card reader adaptation module calls the command parsing program to send the first general response command to the host.
[0093] Example 3
[0094] This embodiment provides a computer-readable storage medium, including:
[0095] The storage medium is used to store computer software instructions used to implement the self-service terminal card reader adaptation control method described in Embodiment 1 above. It includes a program for executing the program set for the self-service terminal card reader adaptation control method. Specifically, the executable program can be built into the self-service terminal card reader adaptation control system described in Embodiment 2. In this way, the self-service terminal card reader adaptation control system can implement the self-service terminal card reader adaptation control method described in Embodiment 1 by executing the built-in executable program.
[0096] Furthermore, the computer-readable storage medium in this embodiment can be any combination of one or more readable storage media, wherein the readable storage medium includes an electrical, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
[0097] Unlike existing technologies, the self-service terminal card reader adaptation control method, system, and medium proposed in this application can convert and process control commands for different card readers on the terminal device based on an editable and updatable configuration file. When facing different card readers, the terminal device can automatically adapt to card readers without repeatedly developing new SDKs. This system provides effective technical support for this method, ultimately reducing the development difficulty and time for developers, lowering the maintenance cost of terminal devices, making up for the shortcomings of existing technologies, and has certain application value.
[0098] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0099] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware to implement the program, which can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0100] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A card reader adaptation control method for self-service terminals, characterized in that, Includes the following steps: Initial configuration steps: Configure the host terminal, including the card control application, instruction parsing program, and configuration file generation program. File generation steps: Set a configuration file specification table, and perform a configuration file generation operation based on the configuration file generation program and the configuration file specification table to obtain an editable configuration file; Card adapter adaptation steps: The system detects changes to the card reader on the host side and performs card reader adaptation and interaction operations based on the card reader control application, the instruction parsing program, the editable configuration file, and the changes to the card reader. The host computer stores a hardware detection program; the configuration file specification table stores several card model information and several serial communication format specification tables, several control instruction specification tables, several function instruction specification tables, several status code specification tables, and several fault code specification tables that each of the several card model information is matched with; the card change situation includes a first situation and a second situation; the first situation is that there is a card change; the second situation is that there is no card change. The configuration file generation operation includes: identifying several serial port standard character mapping relationships corresponding to several of the serial port communication format specification tables; Identify the character mapping relationships of several control instruction specifications corresponding to several control instruction specification tables; identify the character mapping relationships of several function instruction specifications corresponding to several function instruction specification tables; identify the character mapping relationships of several status codes corresponding to several status code specification tables; identify the character mapping relationships of several fault codes corresponding to several fault code specification tables; import the character mapping relationships of several serial port specification tables, several control instruction character mapping relationships, several function instruction character mapping relationships, several status code character mapping relationships, and several fault code character mapping relationships into the configuration file generation program to obtain the editable configuration file; The editable configuration file contains several first conversion logics, several second conversion logics, several third conversion logics, several fourth conversion logics, and several fifth conversion logics. A plurality of first conversion logics are respectively matched with a plurality of serial port specification character mapping relationships; a plurality of second conversion logics are respectively matched with a plurality of control instruction character mapping relationships; a plurality of third conversion logics are respectively matched with a plurality of function instruction character mapping relationships; a plurality of fourth conversion logics are respectively matched with a plurality of status code character mapping relationships; and a plurality of fifth conversion logics are respectively matched with a plurality of fault code character mapping relationships.
2. The self-service terminal card reader adaptation control method according to claim 1, characterized in that: The step of detecting changes in the SIM card on the host side and performing SIM card adaptation and interaction operations based on the SIM card control application, the instruction parsing program, the editable configuration file, and the changes in the SIM card further includes: Obtain the first model information of the first card reader connected to the host; set a detection cycle, and call the hardware detection program every detection cycle to detect the second model information of the first card reader connected to the host; determine whether the second model information matches the first model information; if they do not match, set the card reader change status to the first situation, and set the card reader corresponding to the second model information to the second card reader; if they match, set the card reader change status to the second situation. When the card reader changes to the first situation, the card reader adaptation interaction operation is performed based on the card reader control application, the instruction parsing program, the editable configuration file, the second model information, and the second card reader; The card reader adaptation and interaction operations include: Based on the card controller application, the instruction parsing program, and the editable configuration file, an instruction generation step is executed; a waiting time period is set, and after executing the instruction generation step, a response identification step is executed based on the card controller application, the instruction parsing program, the editable configuration file, and the waiting time period.
3. The self-service terminal card reader adaptation control method according to claim 2, characterized in that: The instruction generation step includes: The card reader control application is invoked to generate a first general instruction; the instruction parsing program is invoked to identify the instruction type of the first general instruction; If the instruction type is control type, then the instruction parsing program is invoked to identify the second conversion logic that matches the second model information in the editable configuration file, and the second conversion logic is set as the second conversion logic to be referenced; the instruction parsing program is invoked to identify the first conversion logic that matches the second model information in the editable configuration file, and the first conversion logic is set as the first conversion logic to be referenced; The instruction parsing program is invoked to convert the first general instruction into a first dedicated control instruction according to the second reference conversion logic; the instruction parsing program is invoked to set the first serial communication format according to the first reference conversion logic; and the instruction parsing program is invoked to send the first dedicated control instruction to the second card reader according to the first serial communication format.
4. The self-service terminal card reader adaptation control method according to claim 3, characterized in that: The response identification step includes: After sending the first dedicated control command to the second card reader, the first dedicated response command of the second card reader is obtained after the waiting period. The instruction parsing program is invoked to identify the first dedicated response instruction according to the first serial communication format, thereby obtaining the second response instruction to be parsed. The instruction parsing program is invoked to identify the fourth conversion logic that matches the second model information in the editable configuration file, and the fourth conversion logic is set as the fourth conversion logic to be referenced. The instruction parsing program is invoked to convert the second response instruction to be parsed into a first general response instruction according to the fourth reference conversion logic; the instruction parsing program is then invoked to send the first general response instruction to the host.
5. The self-service terminal card reader adaptation control method according to claim 4, characterized in that: The second conversion logic is based on hexadecimal character settings; the third conversion logic is based on character expression settings; the fourth and fifth conversion logics are both based on double numeric characters and double alphabetic characters.
6. A self-service terminal card reader adaptation control system based on the self-service terminal card reader adaptation control method according to any one of claims 1 to 5, characterized in that, include: Initial configuration module, configuration file generation module, and card adapter module; The initial configuration module is used to configure the host terminal, and configure the card control application, instruction parsing program and configuration file generation program on the host terminal; The configuration file generation module is used to set the configuration file specification table, and to perform configuration file generation operations based on the configuration file generation program and the configuration file specification table to obtain an editable configuration file; The card reader adaptation module is used to detect changes in the card reader on the host side, and to perform card reader adaptation interactive operations based on the card reader control application, the instruction parsing program, the editable configuration file, and the changes in the card reader.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the self-service terminal card reader adaptation control method according to any one of claims 1 to 5.