CEN/XFS-based concurrent calling method for card reading composite module

文档序号:1099033 发布日期:2020-09-25 浏览:10次 中文

阅读说明:本技术 一种基于cen/xfs的读卡类复合模块的并发调用方法 (CEN/XFS-based concurrent calling method for card reading composite module ) 是由 余彬 刘艳兰 唐超 赵建青 于 2020-05-22 设计创作,主要内容包括:本发明公开了一种基于CEN/XFS的读卡类复合模块的并发调用方法,在复合模块与应用程序层之间设置复合SP服务和并列的N个子服务,且N个子服务分别与复合模块的N个子模块一一对应;并在N个SP子服务和复合SP服务中引入状态轮询机制和指令中断机制,状态轮询机制通过将当前读卡指令堵塞在介质状态循环检测流程里,只有在检测到介质时才将当前读卡指令直接发给复合SP服务执行,使复合SP服务收到多条并发读卡指令的顺序由用户放介质的顺序决定,解决支持介质状态检测的并发执行问题;指令中断机制则进一步用于解决不支持介质状态检测的并发执行问题,从而使应用程序层发送的当前读卡指令不会因未放入介质而影响到卡片关联业务的办理。(The invention discloses a CEN/XFS-based concurrent calling method for a card-reading composite module, wherein a composite SP service and N parallel sub-services are arranged between a composite module and an application program layer, and the N sub-services are respectively in one-to-one correspondence with the N sub-modules of the composite module; a state polling mechanism and an instruction interruption mechanism are introduced into the N SP sub-services and the composite SP service, the state polling mechanism blocks the current card reading instruction in a medium state circulation detection flow, and the current card reading instruction is directly sent to the composite SP service to be executed only when a medium is detected, so that the sequence of the composite SP service receiving a plurality of concurrent card reading instructions is determined by the sequence of the user placing the medium, and the problem of concurrent execution supporting medium state detection is solved; the instruction interrupt mechanism is further used for solving the problem that concurrent execution of medium state detection is not supported, so that the current card reading instruction sent by the application program layer cannot influence the handling of the card related service because the medium is not put in.)

1. A concurrent calling method of a CEN/XFS-based card reading type composite module is characterized by comprising the following steps:

(1) setting a composite SP service and N parallel sub-services between the composite module and the application program layer, wherein the N sub-services are respectively in one-to-one correspondence with the N sub-modules of the composite module;

(2) the SP sub-service receives a corresponding card reading instruction from an application program layer, and sets a corresponding interrupt starting identifier through the composite SP service; setting a currently received card reading instruction as a current card reading instruction, and setting SP sub-service receiving the current card reading instruction as the current SP sub-service;

(3) judging whether the current SP sub-service supports medium state detection: if so, when the current SP sub-service detects a medium, sending a current card reading instruction to the composite SP service; if not, the current SP sub-service directly sends the current card reading instruction to the composite SP service;

(4) and when the composite SP service receives the current card reading instruction from the SP sub-service, judging whether other card reading instructions exist:

if other card reading instructions exist, judging whether the other card reading instructions are interrupted by the current card reading instruction through an instruction interruption mechanism, if so, executing the current card reading instruction, and if not, executing the current card reading instruction after executing the other card reading instructions;

if no other card reading instruction exists, executing the current card reading instruction;

the composite SP service feeds back an execution result of the current card reading instruction to the SP sub-service;

(5) if the current SP sub-service supports medium state detection, after receiving an execution result, setting a corresponding interrupt closing identifier through the composite SP service, and finishing the execution of the current card reading instruction;

if the current SP sub-service does not support the medium state detection and the execution result of the current card reading instruction is not interrupted, after the execution result is received, setting a corresponding interruption closing identifier through the composite SP service, and finishing the execution of the current card reading instruction;

and if the current SP sub-service does not support the medium state detection and the execution result of the current card reading instruction is interrupted, the current SP sub-service sends the current card reading instruction to the composite SP service again after receiving the execution result.

2. The method according to claim 1, wherein the instruction interrupt mechanism determines whether other card reading instructions are interrupted by the current card reading instruction, if so, the current card reading instruction is executed, and if not, the current card reading instruction is executed after the other card reading instructions are executed, which specifically includes:

if the current card reading instruction support is interrupted, acquiring the interruption identification states and the corresponding medium states of other card reading instructions, and when the interruption identification states of the other card reading instructions are true and corresponding media exist, executing the other card reading instructions by the composite SP service, otherwise, executing the current card reading instruction by the composite SP service;

and if the current card reading instruction does not support interruption, the composite SP service executes the current card reading instruction.

3. The method of claim 2, wherein at least 1 of the N SP sub-services supports medium state detection.

4. The method according to claim 1, wherein the other card reading instruction refers to a card reading instruction which is received from an application layer and sent to the composite SP service before other SP sub-services except the current SP sub-service are executed.

5. The method of claim 1, wherein whether the current card reading command and other card reading commands support being interrupted is preset according to the property of the corresponding sub-module.

6. The method of claim 1, wherein the N SP subservices comprise: the contact SP sub-service, the non-contact SP sub-service and the card swiping SP sub-service, the corresponding N sub-modules comprise: the card reader comprises a contact card reading module, a non-contact card reading module and a card swiping module.

7. The method of claim 1, wherein each SP sub-service establishes a connection with the application layer through a standard SP API interface, each SP sub-service establishes a connection with the composite SP service through a standard SP API interface, and wherein the N SP sub-services are independent processes.

Technical Field

The invention relates to the technical field of financial self-service equipment, in particular to a CEN/XFS-based concurrent calling method for a card-reading composite module.

Background

WOSA (Windows Open System Architecture) is a software Architecture under the Windows operating System proposed by Microsoft corporation. WOSA/XFS (Windows Open System architecture/Extensions for Financial Services), also known as CEN/XFS protocol, is an extended Financial service based on WOSA, is a software architecture proposed by Microsoft for global Financial industry software, and is modified correspondingly to the global Financial industry on the basis of the WOSA software architecture.

The CEN/XFS protocol provides a set of standard and uniform protocols for the technical field of financial self-service equipment, is a universal and public protocol, and is widely used in the technical field of financial self-service equipment. The popularization of the CEN/XFS protocol facilitates communication between applications and devices.

In the conventional financial self-service equipment, each module has an independent hardware communication interface, as shown in a conventional structure in a solid line frame in fig. 1, communication between the modules is not affected. However, with the rapid development of portable devices in recent years, financial business devices have been developed to be portable, and many portable terminal devices have appeared. In order to meet the service requirements, the integration degree of the hardware modules is higher and higher, and a plurality of hardware modules defined as similar interfaces in the CEN/XFS protocol (the CEN/XFS protocol defines corresponding interfaces for different types of equipment modules, for example, the card reading module adopts the IDC type, the card issuing module adopts the CRD type, the printing module adopts the PTR type, and the like) are gradually merged into a similar composite module sharing a communication port, as shown in a composite structure in a dashed box in fig. 1.

The CEN/XFS protocol solves the calling of different types of composite modules to a certain extent, but does not have a good solution for the concurrent calling of the functions of all the component modules in the same type of composite modules, so that the upper layer application cannot complete the concurrent calling of the functions of the same type of composite modules. Therefore, in the prior art, concurrent calling of each component module of the similar composite module needs to be handled by a manufacturer of each component module. In this document, the heterogeneous composite module refers to a mapping from the composite module to a heterogeneous interface, for example, the card reader/writer device may be mapped to a functional interface of the card reader module (IDC class) and the card sender module (CRD class), and the call of the card reader/writer function is realized by applying an interface corresponding to the CEN/XFS protocol IDC class and the CRD class. The similar composite module is used for mapping the composite module to the similar interface, for example, the card reading composite module can realize the functions of a plurality of card reading modules such as a contact card reader, a non-contact card reader and a card reader, and the functions are mapped to the functional interface of IDC.

The appearance of the composite module enables the financial self-service equipment to be portable to a great extent, but how to ensure that the upper-layer application is seamlessly switched from the traditional financial self-service equipment to the financial self-service equipment with the composite module and complete the calling of the upper-layer application of the financial self-service equipment to the functional interfaces of all the component modules in the composite module to realize a business scene is a problem to be solved urgently at present.

Disclosure of Invention

Aiming at the technical problem that the upper application of the financial self-service equipment cannot run normally due to the fact that the upper application of the same type of composite modules cannot be called in a concurrent mode, the invention provides a CEN/XFS-based concurrent calling method for card reading composite modules, and the normal running of the upper application of the financial self-service equipment is guaranteed.

In order to achieve the technical purpose, the invention adopts the following technical scheme:

a concurrent calling method of a CEN/XFS-based card reading type composite module comprises the following steps:

(1) setting a composite SP service and N parallel sub-services between the composite module and the application program layer, wherein the N sub-services are respectively in one-to-one correspondence with the N sub-modules of the composite module;

(2) the SP sub-service receives a corresponding card reading instruction from an application program layer, and sets a corresponding interrupt starting identifier through the composite SP service; setting a currently received card reading instruction as a current card reading instruction, and setting SP sub-service receiving the current card reading instruction as the current SP sub-service;

(3) judging whether the current SP sub-service supports medium state detection: if so, when the current SP sub-service detects a medium, sending a current card reading instruction to the composite SP service; if not, the current SP sub-service directly sends the current card reading instruction to the composite SP service;

(4) and when the composite SP service receives the current card reading instruction from the SP sub-service, judging whether other card reading instructions exist:

if other card reading instructions exist, judging whether the other card reading instructions are interrupted by the current card reading instruction through an instruction interruption mechanism, if so, executing the current card reading instruction, and if not, executing the current card reading instruction after executing the other card reading instructions;

if no other card reading instruction exists, executing the current card reading instruction;

the composite SP service feeds back an execution result of the current card reading instruction to the SP sub-service;

(5) if the current SP sub-service supports medium state detection, after receiving an execution result, setting a corresponding interrupt closing identifier through the composite SP service, and finishing the execution of the current card reading instruction;

if the current SP sub-service does not support the medium state detection and the execution result of the current card reading instruction is not interrupted, after the execution result is received, setting a corresponding interruption closing identifier through the composite SP service, and finishing the execution of the current card reading instruction;

and if the current SP sub-service does not support the medium state detection and the execution result of the current card reading instruction is interrupted, the current SP sub-service sends the current card reading instruction to the composite SP service again after receiving the execution result.

Under the scene with concurrent function requirements, if the current SP sub-service supports medium state detection, when a user does not put a medium (the medium is specifically a card in the invention), the current card reading instruction is blocked in a medium state circulation detection flow, and the current card reading instruction cannot be directly sent to the composite SP service to be executed, so that the sequence of the composite SP service receiving a plurality of concurrent card reading instructions is determined by the medium putting sequence of the user, the problem of concurrent execution of the plurality of card reading instructions by a card reading composite module is effectively solved, and the transaction of card related services cannot be influenced by the fact that the current card reading instruction sent by an application program layer is not put the medium.

Under the scene without concurrent function requirements, the composite SP service can also independently provide the function call of the card reading composite module for the application program layer.

In a more preferred technical solution, the determining, by the instruction interrupt mechanism, whether the other card reading instruction is interrupted by the current card reading instruction, if so, executing the current card reading instruction, and if not, executing the current card reading instruction after executing the other card reading instruction, specifically including:

if the current card reading instruction support is interrupted, acquiring the interruption identification states and the corresponding medium states of other card reading instructions, and when the interruption identification states of the other card reading instructions are true and corresponding media exist, executing the other card reading instructions by the composite SP service, otherwise, executing the current card reading instruction by the composite SP service;

and if the current card reading instruction does not support interruption, the composite SP service executes the current card reading instruction.

If the current SP sub-service does not support the medium state detection and other SP sub-services support the medium state detection, even if the current SP sub-service directly sends the current card reading instruction to the composite SP service under the condition of unknown medium state, the composite SP service comprehensively judges whether to preferentially execute other card reading instructions or the current card reading instruction according to the following points: whether the current card reading instruction supports the interrupted card reading instruction, and the interruption identification state and the medium state of the card reading instruction sent by other SP sub-services. And if other card reading instructions are preferentially executed, the current SP sub-service resends the current card reading instruction to the composite SP in the next polling according to the execution result fed back to the current card reading instruction by the composite SP service.

In a more preferred technical solution, at least 1 of the N SP sub-services supports medium status detection.

In a more preferred technical solution, the other card reading instruction refers to a card reading instruction which is received from an application layer before the other SP sub-services except the current SP sub-service, and is sent to the composite SP service and is not executed.

In a more preferable technical scheme, whether the current card reading instruction and other card reading instructions support interruption or not is preset according to the property of the corresponding sub-module.

In a more preferred embodiment, the N SP sub-services include: the contact SP sub-service, the non-contact SP sub-service and the card swiping SP sub-service, the corresponding N sub-modules comprise: the card reader comprises a contact card reading module, a non-contact card reading module and a card swiping module.

In a more preferable technical scheme, each SP sub-service is connected with an application program layer through a standard SP API interface, each SP sub-service is connected with a composite SP service through the standard SP API interface, and N SP sub-services are mutually independent processes.

The technical scheme does not need to modify a standard SP API interface layer and an XFS management layer, can be compatible with the application process of the traditional financial self-service business, can realize seamless switching of application, and is suitable for various operating systems such as Windows, Linux and the like.

Advantageous effects

The effective effects of the invention include:

under the scene with concurrent function requirements, if the current SP sub-service supports medium state detection, when a user does not put a medium (the medium is specifically a card in the invention), the current card reading instruction is blocked in a medium state circulation detection flow, and the current card reading instruction cannot be directly sent to the composite SP service to be executed, so that the sequence of the composite SP service receiving a plurality of concurrent card reading instructions is determined by the medium putting sequence of the user, the problem of concurrent execution of the plurality of card reading instructions by a card reading composite module is effectively solved, and the transaction of card related services cannot be influenced by the fact that the current card reading instruction sent by an application program layer is not put the medium. Under the scene without concurrent function requirements, the composite SP service can also independently provide the function call of the card reading composite module for the application program layer.

If the current SP sub-service does not support the medium state detection and other SP sub-services support the medium state detection, even if the current SP sub-service directly sends the current card reading instruction to the composite SP service under the condition of unknown medium state, the composite SP service comprehensively judges whether to preferentially execute other card reading instructions or the current card reading instruction according to the following points: whether the current card reading command supports the interrupted card reading command, and the interruption identification state and the medium state of the card reading command sent by other SP sub-services. And if other card reading instructions are preferentially executed, the current SP sub-service resends the current card reading instruction to the composite SP in the next polling according to the execution result fed back to the current card reading instruction by the composite SP service.

The method does not need to modify a standard SP API interface layer and an XFS management layer, can be compatible with the application process of the traditional financial self-service business, can realize seamless switching of application, and is suitable for various operating systems such as Windows, Linux and the like.

Drawings

FIG. 1 is a schematic diagram of a financial self-service device system;

FIG. 2 is a schematic diagram of a composite SP service configuration;

fig. 3 is a schematic structural diagram of a concurrent call system according to an embodiment of the present invention;

FIG. 4 is a flow chart of a status polling mechanism according to an embodiment of the present invention;

FIG. 5 is a flowchart of an instruction interrupt mechanism according to an embodiment of the present invention;

fig. 6 is a flowchart illustrating a process of sending 3 card reading commands simultaneously by an application layer according to an embodiment of the present invention.

Detailed Description

The following describes embodiments of the present invention in detail, which are developed based on the technical solutions of the present invention, and give detailed implementation manners and specific operation procedures to further explain the technical solutions of the present invention.

The relationship between the layers of the conventional financial self-service equipment system, as shown in fig. 1, includes: an application program layer, a standard SPAPI interface layer, an XFS management layer, a device SP service and a hardware module. The application program layer realizes each business process of the financial self-service equipment through function combination of each module; the XFS management layer refers to a management control layer such as a handle, a request ID, message distribution, memory management and the like in the scheduling process of a management program and is responsible for calling an equipment SP service program customized by a corresponding manufacturer; the device SP service is a service program which receives an execution instruction from an application program layer through a standard SP API interface layer, completes the specific operation of the device and returns an execution result.

In the prior art, the composite SP service can complete direct call of a composite hardware module and classification derivation of functions of each sub-module, and mainly comprises a logic layer and a driver layer, as shown in fig. 2. The logic layer realizes the functional logic of each submodule in the composite module. The sub-modules refer to all functional modules forming the composite module, such as a card reading composite module, including a contact card reading sub-module, a non-contact card reading sub-module, a card swiping sub-module and the like. The driver layer implements direct operation of the hardware device. The composite SP service supports immediate response of the information instruction, but does not support immediate response of the execution instruction, and needs sequential execution, and can respond after the last execution instruction is completed. Because the card reading instruction is an execution instruction, if the contact logic object of the composite SP service receives the card reading instruction A, and then the non-contact logic object of the composite SP service receives the card reading instruction B, when a user puts in a non-contact card, the composite SP service does not immediately respond to and execute the card reading instruction of the non-contact card, but needs the user to insert the contact card, and can respond to the card reading of the non-contact card after the reading of the contact card is completed. The blocking phenomenon of the card reading instruction can cause the service of the application program layer to be incapable of operating normally.

In the embodiment of the present invention, the hardware module is a card-reading composite module obtained by combining a contact card-reading sub-module, a non-card-reading sub-module and a card-swiping sub-module, in the method of the present embodiment, the device SP service is first set as 3 parallel and independent SP sub-services, i.e., a composite SP service, a contact card-reading SP sub-service, a non-card-reading SP sub-service and a card-swiping SP sub-service, as shown in fig. 3, so as to solve the aforementioned problem of card-reading instruction blocking. The contact card reading SP sub-service, the non-contact card reading SP sub-service and the card swiping SP sub-service are respectively in one-to-one correspondence with the contact card reading sub-module, the non-contact card reading sub-module and the card swiping sub-module.

After the composite SP service and the 3 parallel sub-services are set between the composite module and the application layer, each SP sub-service may receive a card reading instruction from the application layer at any time, so to implement the concurrent call of the application layer to the card reading composite module, the method of this embodiment introduces a status polling mechanism and an instruction interruption mechanism into the composite SP service and the 3 parallel sub-services, and the specific implementation process includes:

(2) the SP sub-service receives a corresponding card reading instruction from the application program layer, and sets a corresponding interrupt starting identifier through the composite SP service; and setting the currently received card reading instruction as the current card reading instruction, and setting the SP sub-service receiving the current card reading instruction as the current SP sub-service.

(3) Judging whether the current SP sub-service supports medium state detection: if so, when the current SP sub-service detects a medium, sending a current card reading instruction to the composite SP service; and if not, the current SP sub-service directly sends the current card reading instruction to the composite SP service.

(4) And when the composite SP service receives the current card reading instruction from the SP sub-service, judging whether other card reading instructions exist:

if the composite SP service judges that other card reading instructions exist at present, further judging whether the other card reading instructions are interrupted by the current card reading instruction:

if the current card reading instruction support is interrupted, acquiring the interruption identification states and the corresponding medium states of other card reading instructions, and when the interruption identification states of the other card reading instructions are true and corresponding media exist, executing the other card reading instructions by the composite SP service, otherwise, executing the current card reading instruction by the composite SP service;

if the current card reading instruction does not support interruption, the composite SP service executes the current card reading instruction;

if the composite SP service judges that no other card reading instruction exists at present, executing the current card reading instruction;

and the composite SP service feeds back the execution result of the current card reading instruction to the SP sub-service.

In this embodiment, in order to solve the problem of concurrent call of the application program layer to the composite module, the composite SP service may receive a card reading instruction for another sub-module when the card reading instruction for a certain sub-module is not executed, so that in this embodiment, it is assumed that any card reading instruction received at present latest is a current card reading instruction, the card reading instruction not executed at present is another card reading instruction, and each current card reading instruction is processed according to the method of this embodiment, thereby implementing concurrent call of the application program layer to the card reading composite module.

(5) If the current SP sub-service supports medium state detection, after receiving an execution result, setting a corresponding interrupt closing identifier through the composite SP service, and finishing the execution of the current card reading instruction;

if the current SP sub-service does not support the medium state detection and the execution result of the current card reading instruction is not interrupted, after the execution result is received, setting a corresponding interruption closing identifier through the composite SP service, and finishing the execution of the current card reading instruction;

and if the current SP sub-service does not support the medium state detection and the execution result of the current card reading instruction is interrupted, the current SP sub-service sends the current card reading instruction to the composite SP service again after receiving the execution result.

The essence of the implementation process of the method in the above embodiment is to introduce a status polling mechanism and an instruction interrupt mechanism into the N SP sub-services and the composite SP service, where the status polling mechanism is used to solve the problem of supporting concurrent execution of the media status detection module, and the instruction interrupt mechanism is used to solve the problem of not supporting concurrent execution of the media status detection module, as shown in fig. 3.

The status polling mechanism shown in fig. 4 includes the following processes:

step A1: the SP sub-service receives the card reading instruction of the application, sends an interruption starting identifier A to the composite SP service, sends the instruction as an information instruction, can be immediately responded by the composite SP service, and is set to a device driving object;

step A2: judging whether the sub-object supports the medium state detection, if so, executing the step A3, otherwise, executing the step A5;

step A3: initiating an instruction for acquiring the state information of the sub-object to the composite SP service, and judging whether the user puts the card on the sub-module or not according to a feedback result;

step A4: if the user puts the card, executing the step A5, otherwise, executing the step A3;

step A5: sending a card reading instruction A to the composite SP service;

step A6: after receiving the card reading instruction A, the composite SP service judges whether other execution instructions (B \ C \ D) exist at present.

Step A7: if yes, judging whether the current executed instruction is interrupted by the card reading instruction A through an instruction interruption mechanism, otherwise, executing the step A9;

step A8: if the current execution instruction is interrupted, start to execute step A9; otherwise, the execution of the current instruction is completed first, and then step a9 is executed;

step A9: and executing the card reading instruction A, and feeding back an execution result to the SP sub-service.

Step A10: judging whether the sub-object supports medium state detection, if so, sending an interrupt closing identifier to the composite SP service, and completing instruction return; otherwise, executing step A11;

step A11: and judging whether the execution result of the feedback is an interruption or not, and if so, executing the step A5. Otherwise, sending an interrupt closing identifier to the composite SP service, and completing instruction return.

It can be seen from step A3 and step a4 of the status polling mechanism flow that when the client does not put the card, all the card reading instructions are blocked in the status detection flow, and the card reading instructions are not issued to the composite SP service, and the order in which the composite SP service receives the card reading instructions is determined by the card putting order of the user, so that the transaction of the card-related service is not affected.

The instruction interrupt mechanism flow shown in fig. 5 is:

step B1: and the SP sub-service A receives the card reading instruction, does not support medium state detection, and directly sends the card reading instruction A to the composite SP service.

Step B2: the composite SP service receives the card reading instruction A, and judges whether the instruction is allowed to be interrupted or not according to the capacity set by the logic object of each submodule. If so, go to step B3. Otherwise, step B5 is performed. The setting of the capacity according to the logical object of each sub-module can be determined according to the module characteristics, for example, the card reading instruction of the non-card reading sub-module is received by the composite SP service, and the capacity is set to be not allowed to be interrupted; the card reading command of the card swiping sub-module is received by the composite SP service, and the capability is set to be allowed to be interrupted.

Step B3: and acquiring the state of the interrupt identifier (B \ C \ D) and the state of the medium of the child object (B \ C \ D). The state of the interrupt identifier (B \ C \ D) is set by the instruction of other SP sub-services (B \ C \ D).

Step B4: by the judgment of the acquisition information, when the interrupt start flag is true and the corresponding medium state exists, step B7 is executed. Otherwise, step 5 is executed.

Step B5: and executing the card reading action of the sub-object A.

Step B6: and judging whether the card reading action is finished, and if so, executing the step B7. Otherwise, step B5 is performed.

Step B7: and after receiving the execution result fed back by the composite SP service, the SP sub-service A judges whether the instruction is interrupted. If the interrupt is detected, executing step B1; otherwise, the execution of the instruction is completed.

It is assumed that the SP sub-service a does not support media state detection and that the SP sub-services B/C/D each support media state detection. The implementation process of the method of the embodiment can be obtained, before the user does not put the media into the SP sub-service a, the card reading instruction a of the SP sub-service a is directly sent to the composite SP service program after the interruption starting identifier is sent; the SP sub-service B/C/D firstly sends an interrupt starting identifier to the composite SP service, then enters a medium state polling detection stage, waits for a user to put in a corresponding medium, and then sends a card reading instruction B/C/D to a composite SP service program.

Assuming that the current SP sub-service B receives the card reading instruction B latest, and the composite SP service has the card reading instruction A at the moment, namely the card reading instruction B is the current card reading instruction, and the card reading instruction A is other card reading instructions; at this time, the SP sub-service B will send the interrupt identifier to the composite SP service program, and then enter the media state polling detection stage to wait for the user to put in the corresponding media. And after the user puts the medium to which the user responds, the composite SP service program interrupts the currently executed card reading instruction A according to the feedback of the interrupt identifier B and the medium state B so as to respond to the card reading instruction B. The SP sub-service A receives the card reading instruction of the card reading instruction A from the composite SP service, if the card reading instruction is interrupted, the SP sub-service A will resend the card reading instruction A to the composite SP service in the next polling, and the card reading is continued. The card reading instruction B is executed before the card reading instruction A is sent again, and card information of the medium put by the user is fed back to the application program layer.

In the corresponding embodiment shown in fig. 6, it is assumed that the application layer simultaneously sends the card reading instruction to each sub-service of the composite module, and the application layer sends all the card reading instructions to the corresponding SP sub-services through the SP API interface layer. The SP sub-service provides a standard SP API interface through the composite SP service to complete the function call of the equipment. And polling and monitoring the state of the medium by the 3 SP sub-services, and if the medium exists, sending a card reading instruction to the composite SP service through a standard SP API (application program interface). And after receiving the card reading instruction, the composite SP service completes the card reading action of the corresponding sub-module. The media which are detected preferentially complete card reading, namely, no matter which sequence the application program calls the card reading instruction of each sub-module object, the media which is put in by the user first is read preferentially.

The above embodiments are preferred embodiments of the present application, and those skilled in the art can make various changes or modifications without departing from the general concept of the present application, and such changes or modifications should fall within the scope of the claims of the present application.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种电子信息读卡器识别装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!