WO2019019864A1 - Communication system, method and apparatus for embedded self-service terminal - Google Patents

Communication system, method and apparatus for embedded self-service terminal Download PDF

Info

Publication number
WO2019019864A1
WO2019019864A1 PCT/CN2018/093785 CN2018093785W WO2019019864A1 WO 2019019864 A1 WO2019019864 A1 WO 2019019864A1 CN 2018093785 W CN2018093785 W CN 2018093785W WO 2019019864 A1 WO2019019864 A1 WO 2019019864A1
Authority
WO
WIPO (PCT)
Prior art keywords
hardware device
data
operation layer
module
layer
Prior art date
Application number
PCT/CN2018/093785
Other languages
French (fr)
Chinese (zh)
Inventor
潘煜豪
熊飞
黄三朋
吴胜楠
林宇龙
梁建明
Original Assignee
广州广电运通金融电子股份有限公司
广州广电汇通金融服务有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州广电运通金融电子股份有限公司, 广州广电汇通金融服务有限公司 filed Critical 广州广电运通金融电子股份有限公司
Publication of WO2019019864A1 publication Critical patent/WO2019019864A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F19/00Complete banking systems; Coded card-freed arrangements adapted for dispensing or receiving monies or the like and posting such transactions to existing accounts, e.g. automatic teller machines
    • G07F19/20Automatic teller machines [ATMs]
    • G07F19/211Software architecture within ATMs or in relation to the ATM network

Definitions

  • the present invention relates to the field of self-service terminal technologies, and in particular, to a communication system, method and apparatus for an embedded self-service terminal.
  • the embodiment of the invention provides a communication system, method and device for an embedded self-service terminal, which can realize cross-platform, cross-system and cross-platform communication control of the embedded self-service terminal.
  • An aspect of the present invention provides a communication system for an embedded self-service terminal, including:
  • the application layer and the hardware device operation layer are included; the application layer includes an interface matching module, a first serialization module, and a first communication module that are sequentially connected; the hardware device operation layer includes a second communication module and a second serialization module that are sequentially connected. And core processing module;
  • the interface matching module is configured to acquire an API interface of a current target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device;
  • the first serialization module is configured to parse the memory data into bytes. Streaming data;
  • the first communication module and the second communication module are configured to implement sending and receiving of byte stream data between the application layer and the operating layer of the hardware device;
  • the second serialization module is configured to parse the byte stream data
  • the memory processing module is configured to generate a corresponding command according to the received memory data to drive the corresponding hardware device.
  • Another aspect of the present invention provides a communication method for an embedded self-service terminal, including:
  • the hardware device operation layer parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
  • Another aspect of the present invention provides a communication device for an embedded self-service terminal, including:
  • a communication connection unit configured to establish a network connection of an application layer and a hardware device operation layer
  • An interface matching unit configured to acquire an API interface corresponding to the target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device;
  • a data parsing and transmitting unit configured to receive the memory data of the target program through the SPI interface, parse the memory data into byte stream data, and send the byte stream data to the hardware device through the network connection Operation layer
  • the data receiving and processing unit is configured to: the operating layer of the hardware device parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
  • the application layer includes an interface matching module, a first serialization module, and a first communication module that are sequentially connected;
  • the operating layer of the hardware device includes a serial connection a communication module, a second serialization module, and a core processing module; capable of matching an API interface of the current target program to an SPI interface conforming to an operation layer of the hardware device; and further parsing the memory data into byte stream data and transmitting the data to the hardware device.
  • the hardware device operation layer restores the byte stream data to the memory data, and then generates a corresponding command according to the received memory data to drive the corresponding hardware device.
  • the application layer and the hardware device operation layer can implement separate cross-host communication control, which overcomes the defect that the traditional hardware device operation layer is limited to the local communication control.
  • the target program and the hardware device operation layer can run different operating systems, which facilitates compiling and running across operating systems, and reduces the difficulty of post-debugging and application development of the embedded self-service terminal.
  • FIG. 1 is a schematic diagram of a communication system of an embedded self-service terminal according to an embodiment
  • FIG. 2 is a schematic flowchart of a communication method of an embedded self-service terminal according to an embodiment
  • FIG. 3 is a diagram showing an example of a structure definition of memory data issued by a target program of an embodiment
  • FIG. 4 is a schematic structural diagram of a communication device of an embedded self-service terminal according to an embodiment.
  • the communication system of the embedded self-service terminal includes an application layer and a hardware device operation layer.
  • the application layer is used to run a corresponding application, which is also called APP (short for Application Layer), and mainly implements interaction with the user.
  • the hardware device operation layer is a layer that drives a hardware device, and is a manager of a hardware resource, for example, provides operation and status information of a hardware device, and is also called SP (Service Providers), which can provide a SPI (Serial Peripheral Interface). Line Peripheral Interface) Interface.
  • the hardware device operation layer SP can be provided by different vendors.
  • the application layer APP includes an interface matching module, a first serialization module, and a first communication module that are sequentially connected;
  • the hardware device operation layer SP includes a second communication module, a second serialization module, and a core processing module that are sequentially connected.
  • the interface matching module is configured to acquire an API (Application Programming Interface) interface of the current target program, and match the API interface to an SPI interface that conforms to the hardware device operation layer SP;
  • the first serialization module The first communication module and the second communication module are configured to implement sending and receiving of byte stream data between the application layer APP and the hardware device operation layer SP;
  • the second serialization module is configured to parse the byte stream data into the memory data;
  • the core processing module is configured to generate a corresponding command according to the received memory data to drive the corresponding hardware device.
  • the core processing module receives the command sent by the application program through the second communication module, and performs some general processing on the command, such as queuing, canceling, scheduling, and executing the command, and implementing all the devices. General commands and mechanisms, and return results and messages through the second communication module.
  • the communication system based on the above structure, when the target program running in different operating systems needs to call the API interface to operate the hardware device, only the interface matching module is used for interface conversion, and the interface matching module uses the API interface and the corresponding SPI interface.
  • the mapping is performed, and the data is parsed by the first serialization module, and then the request is sent to the corresponding hardware device operation layer SP, and the operation of the hardware device is implemented by the hardware device operation layer SP.
  • the application layer APP and the hardware device operation layer SP can implement separate cross-host communication control, which overcomes the defect that the traditional hardware device operation layer SP is limited to the local communication control.
  • the conventional hardware device operation layer SP is limited to development and operation only in a single operating system (such as windows), which is inconvenient to expand the migration, and the communication system of the embedded self-service terminal based on the above embodiment, the target program and the hardware device operation layer SP can run different operating systems, which is conducive to compiling and running across operating systems, reducing the difficulty of post-debugging and application development of embedded self-service terminals.
  • the interface matching module includes an SPI interface layer and an XFS (Extensions for Financial Services) manager.
  • the SPI interface layer is configured to provide a corresponding SPI interface for the hardware device operation layer SP;
  • the XFS manager is configured to match an API interface corresponding to a target program (eg, a Windows-based application) to an SPI corresponding to the hardware device operation layer SP interface.
  • a target program eg, a Windows-based application
  • the SPI interface layer is configured to provide an SPI interface conforming to the CEN/XFS specification, for receiving a command sent by the XFS manager, sending back a return value, completing a message, an event, or receiving a command sent by the XFS manager. , send back the return value, complete the message.
  • WOSA Windows Open System Architecture
  • WOSA is a software architecture under the Windows operating system.
  • WOSA is an interface that enables Windows-based desktop applications to connect to multiple computing environments without having to rewrite applications for each platform, allowing Windows-based applications to connect to multiple computing environments without having to be per platform Rewrite the application.
  • XFS is part of WOSA for financial extension services and is a software architecture for the financial industry.
  • XFS is also a set of C-based WIN32API, so it is convenient for both application developers and service providers.
  • the driver interface for various financial peripherals is defined by XFS. Applications using this interface can run on any financial device that provides an interface that conforms to this specification, regardless of vendor.
  • the elements of the CEN/XFS standard are the API and corresponding SPI definitions, which allow XFS Mananger to communicate with the hardware device operating layer SP and a series of support for the hardware device operating layer SP. In the XFS implementation, these elements are combined to provide access to financial peripherals for Windows-based applications.
  • a standard set of interfaces defined in the CEN/XFS standard enables interoperability of multi-vendor devices. If an application API successfully communicates with the hardware device operating layer SP, it can run on different types of hardware of the same type. The device operating layer SP (which may be developed by another vendor) does not require any changes; similarly, the hardware device operating layer SP built using SPI can work with a range of different structured applications.
  • the application layer and the hardware device operating layer communicate over a TCP/IP network.
  • the first communication module and the second communication module implement socket data transmission and reception by using a socket method. To achieve cross-host physical communication control.
  • data transmitted in the same host is in-memory data (for example, pointer data), and contains storage information of data types and data.
  • in-memory data for example, pointer data
  • FIG 3. the structure definition of the memory data emitted by the target program is shown in Figure 3.
  • the memory data of the first application layer needs to be specially processed and sent to the receiving end (in this embodiment, the hardware device operation layer). SP), and the receiving end must allocate memory according to the received data and return the allocated memory address information to the core processing module. This is equivalent to local communication from the perspective of the core processing module, thereby reducing the coupling of data processing.
  • the first serialization module and the second serialization module may perform data parsing according to a standard xml format to implement data copy operations across hosts, systems, and platforms.
  • XML eXtensible Markup Language
  • HTML eXtensible Markup Language
  • SGML Standard Generalized Markup Language
  • XML is a cross-platform, content-dependent technology in the Internet environment that is a powerful tool for processing structured document information.
  • XML is a simple data storage language that uses a series of simple tags to describe data, and these tags can be built in a convenient way, so XML is extremely simple and easy to grasp and use.
  • XML The simplicity of XML makes it easy to read and write data in any application, making XML the only common language for data exchange, and different applications basically support XML.
  • the application layer APP and the hardware device operation layer SP can be run in different operating systems, so that the switch can be more flexibly switched.
  • the application layer APP or the hardware device operates the layer SP without affecting the traffic of a certain part thereof.
  • the application layer APP can be run on the Windows operating system host
  • the hardware device operation layer SP can be run on the Linux operating system host; of course, the application layer APP and the hardware device operation layer SP can also exist in the same Windows operating system host at the same time.
  • FIG. 2 is a schematic flowchart of a communication method of an embedded self-service terminal according to an embodiment; as shown in FIG. 2, the communication method of the embedded self-service terminal in this embodiment includes the following steps:
  • the application layer and the hardware device operation layer may be respectively located on different hosts, and establish a TCP/IP connection between the application layer and the hardware device operation layer.
  • the matching of the API interface to the SPI interface of the hardware device operating layer is implemented by the XFS manager and the preset SPI interface layer.
  • the SPI interface layer is configured to provide an SPI interface conforming to the CEN/XFS specification, and is configured to receive a command sent by the XFS manager, send back a return value, complete a message, an event, or receive a command sent by the XFS manager, and send back the command. Return value, completion message.
  • S13 Receive, by the SPI interface, memory data of the target program, and parse the memory data into byte stream data, and send the byte stream data to the hardware device operation layer through the network connection.
  • the byte stream data may be sent to the hardware device operation layer in a socket manner.
  • So-called sockets are often referred to as “sockets", and applications typically make requests to the network or respond to network requests via “sockets.”
  • Socket is used when establishing a network connection. When the connection is successful, both ends of the application will generate a Socket instance, operate the instance, and complete the required session. For a network connection, the sockets are equal and there is no difference, not because of the different levels on the server side or on the client side.
  • connection process between the application layer and the socket of the hardware device operation layer can be divided into three steps: server listening, client request, and connection confirmation.
  • the application layer can serve as a client
  • the hardware device operation layer can serve as a server.
  • Server snooping The server-side socket does not locate a specific client socket, but is in a state of waiting for a connection to monitor the network status in real time.
  • Client request refers to the client's socket to make a connection request
  • the target to be connected is the server-side socket.
  • the client's socket must first describe the socket of the server it is connecting to, indicate the server-side socket's address and port number, and then make a connection request to the server-side socket.
  • Connection confirmation When the server-side socket listens to or receives a connection request from the client socket, it responds to the client socket request, creates a new thread, and puts the server-side socket. The description is sent to the client, and once the client confirms the description, the connection is established.
  • the server-side socket continues to be listening and continues to receive connection requests from other client sockets.
  • the manner in which the memory data is parsed into byte stream data in this step may be: parsing the memory data into byte stream data according to a standard xml format.
  • the data structure is an xml format data, where: GrgSpSerialConfig is the name of the data structure, which is defined for each command; each command includes a command The ID, the length of the command parameter, the type of the command parameter, and the start position of the command. If there are multiple parameters, they can be represented by Block0, Block1, and so on.
  • the specific manner of parsing the memory data into byte stream data may be: firstly, searching for an xml node according to the command ID number, and then acquiring the length of the data and the position of the pointer according to the xml node, and correspondingly according to the type of the pointer The data is combined into a network data stream.
  • the hardware device operation layer parses the received byte stream data into the memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
  • the received byte stream data is parsed into the in-memory data by parsing the received byte stream data into memory data according to a standard xml format. Specifically, the byte stream data of the specified command ID is restored to the memory data, that is, the xml node is first searched according to the command ID number, and then the length of the data is obtained according to the xml node, and the memory is allocated according to the position and type of the pointer. And returning the pointer of the memory to form a return result structure; that is, converting a stream of bytes into data of the xml structure as shown in FIG.
  • the separate cross-host, cross-system and cross-platform communication control is performed through the socket, thereby realizing the separation of the application layer and the operation layer of the hardware device, and also solving the application layer and the hardware.
  • the device operation layer can be run in different operating systems, so that the application layer or hardware device operation layer can be switched more flexibly without affecting the traffic of a certain part of it.
  • the application layer can be run on the Windows operating system host, and the hardware device operation layer runs on the Linux operating system host; or, for example, the application layer and the hardware device operation layer exist simultaneously on the same Windows operating system host.
  • the present invention also provides a communication device for an embedded self-service terminal, which can be used to execute the communication method of the embedded self-service terminal.
  • a communication device for an embedded self-service terminal which can be used to execute the communication method of the embedded self-service terminal.
  • the structural diagram of the embodiment of the communication device of the embedded self-service terminal only the parts related to the embodiment of the present invention are shown.
  • the illustrated structure does not constitute a limitation on the device, and Includes more or fewer components than shown, or combines some components, or different component arrangements.
  • the communication device of the embedded self-service terminal of the present embodiment includes: a communication connection unit 310 and an interface matching unit 320.
  • the modules are detailed as follows:
  • the communication connection unit 310 is configured to establish a network connection between an application layer and a hardware device operation layer;
  • the interface matching unit 320 is configured to acquire an API interface corresponding to the target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device;
  • a data parsing and transmitting unit 330 configured to receive, by using the SPI interface, memory data of a target program, and parse the memory data into byte stream data, and send the byte stream data to the hardware through the network connection Equipment operation layer
  • the data receiving and processing unit 340 is configured to: the hardware device operation layer parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
  • each functional unit is only an example, and the actual application may be considered according to requirements, for example, for the configuration requirements of the corresponding hardware or the convenience of implementation of the software.
  • the above function assignment is performed by different functional units, that is, the internal structure of the communication device of the embedded self-service terminal is divided into different functional modules to complete all or part of the functions described above.
  • Each functional unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

The present invention relates to a communication system, method and apparatus for an embedded self-service terminal. The communication system comprises: an application layer and a hardware device operation layer. The application layer comprises an interface matching module, a first serialization module and a first communication module. The hardware device operation layer comprises a second communication module, a second serialization module and a core processing module. The interface matching module is used for acquiring an API interface of a target program, and matching the API interface to an SPI interface complying with the hardware device operation layer. The first serialization module is used for parsing memory data into byte stream data. The first communication module and the second communication module are used for transceiving the byte stream data between the application layer and the hardware device operation layer. The second serialization module is used for parsing the byte stream data into the memory data. The core processing module is used for generating, according to the memory data, a corresponding command to drive a hardware device. The present invention can realize cross-platform, cross-system and cross-platform communication control on an embedded self-service terminal.

Description

嵌入式自助终端的通信系统、方法及装置Communication system, method and device for embedded self-service terminal 技术领域Technical field
本发明涉及自助终端技术领域,特别是涉及嵌入式自助终端的通信系统、方法及装置。The present invention relates to the field of self-service terminal technologies, and in particular, to a communication system, method and apparatus for an embedded self-service terminal.
背景技术Background technique
随着嵌入式技术的发展,目前已有越来越多的自助终端采用嵌入式方式开发,例如基于嵌入式方式开发的ATM(Automatic Teller Machine,自动取款机)设备。然而,由于嵌入式设备配置较低,或嵌入式自助终端的操作系统对界面开发支持不够完善,不适合较复杂的UI(User Interface,用户界面)程序开发,因此采用嵌入式方式开发的设备,普遍存在后期调试以及上层应用软件开发难度较大的问题。With the development of embedded technology, more and more self-service terminals have been developed in embedded mode, such as ATM (Automatic Teller Machine) equipment developed based on embedded mode. However, due to the low configuration of the embedded device, or the operating system of the embedded self-service terminal is not perfect for interface development and is not suitable for the development of a complicated UI (User Interface) program, the device developed by the embedded method is There are widespread problems in post-commissioning and the difficulty of developing upper-layer application software.
发明内容Summary of the invention
本发明实施例提供了嵌入式自助终端的通信系统、方法及装置,能够实现嵌入式自助终端的跨平台、跨系统和跨平台的通信控制。The embodiment of the invention provides a communication system, method and device for an embedded self-service terminal, which can realize cross-platform, cross-system and cross-platform communication control of the embedded self-service terminal.
本发明一方面提供嵌入式自助终端的通信系统,包括:An aspect of the present invention provides a communication system for an embedded self-service terminal, including:
包括应用层和硬件设备操作层;应用层包括依次连接的接口匹配模块、第一序列化模块和第一通讯模块;所述硬件设备操作层包括依次连接的第二通讯模块、第二序列化模块和核心处理模块;The application layer and the hardware device operation layer are included; the application layer includes an interface matching module, a first serialization module, and a first communication module that are sequentially connected; the hardware device operation layer includes a second communication module and a second serialization module that are sequentially connected. And core processing module;
所述接口匹配模块用于获取当前目标程序的API接口,并将所述API接口匹配到符合所述硬件设备操作层的SPI接口;所述第一序列化模块用于将内存数据解析为字节流数据;所述第一通讯模块、第二通讯模块用于实现所述应用 层和硬件设备操作层之间字节流数据的收发;所述第二序列化模块用于将字节流数据解析为内存数据;所述核心处理模块用于根据接收到内存数据生成相应的命令,以驱动相应的硬件设备。The interface matching module is configured to acquire an API interface of a current target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device; the first serialization module is configured to parse the memory data into bytes. Streaming data; the first communication module and the second communication module are configured to implement sending and receiving of byte stream data between the application layer and the operating layer of the hardware device; and the second serialization module is configured to parse the byte stream data The memory processing module is configured to generate a corresponding command according to the received memory data to drive the corresponding hardware device.
本发明另一方面提供一种嵌入式自助终端的通信方法,包括:Another aspect of the present invention provides a communication method for an embedded self-service terminal, including:
建立应用层和硬件设备操作层的网络连接;Establish a network connection between the application layer and the hardware device operation layer;
获取目标程序对应的API接口,并将所述API接口匹配到符合所述硬件设备操作层的SPI接口;Obtaining an API interface corresponding to the target program, and matching the API interface to an SPI interface that conforms to an operation layer of the hardware device;
通过所述SPI接口接收目标程序的内存数据,并将所述内存数据解析为字节流数据,并将所述字节流数据通过所述网络连接发送至硬件设备操作层;Receiving, by the SPI interface, memory data of the target program, and parsing the memory data into byte stream data, and sending the byte stream data to the hardware device operation layer through the network connection;
所述硬件设备操作层将接收到的字节流数据解析为内存数据,并根据得到的内存数据生成相应的命令,以驱动相应的硬件设备。The hardware device operation layer parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
本发明另一方面提供一种嵌入式自助终端的通信装置,包括:Another aspect of the present invention provides a communication device for an embedded self-service terminal, including:
通信连接单元,用于建立应用层和硬件设备操作层的网络连接;a communication connection unit, configured to establish a network connection of an application layer and a hardware device operation layer;
接口匹配单元,用于获取目标程序对应的API接口,并将所述API接口匹配到符合所述硬件设备操作层的SPI接口;An interface matching unit, configured to acquire an API interface corresponding to the target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device;
数据解析及发送单元,用于通过所述SPI接口接收目标程序的内存数据,并将所述内存数据解析为字节流数据,并将所述字节流数据通过所述网络连接发送至硬件设备操作层;a data parsing and transmitting unit, configured to receive the memory data of the target program through the SPI interface, parse the memory data into byte stream data, and send the byte stream data to the hardware device through the network connection Operation layer
数据接收及处理单元,用于所述硬件设备操作层将接收到的字节流数据解析为内存数据,并根据得到的内存数据生成相应的命令,以驱动相应的硬件设备。The data receiving and processing unit is configured to: the operating layer of the hardware device parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
基于上述实施例提供的嵌入式自助终端的通信系统、方法及装置,应用层包括依次连接的接口匹配模块、第一序列化模块和第一通讯模块;所述硬件设 备操作层包括依次连接的第二通讯模块、第二序列化模块和核心处理模块;能够将当前目标程序的API接口匹配到符合所述硬件设备操作层的SPI接口;进而将内存数据解析为字节流数据并发送至硬件设备操作层;硬件设备操作层将字节流数据还原为内存数据,进而根据接收到内存数据生成相应的命令,以驱动相应的硬件设备。使得应用层和硬件设备操作层可实现分离式跨主机的通信控制,克服了传统硬件设备操作层局限于在本机通信控制的缺陷。另外,目标程序和硬件设备操作层可运行不同的操作系统,有利于实现跨操作系统进行编译和运行,降低了嵌入式自助终端的后期调试和应用程序开发的难度。The communication system, method, and device for the embedded self-service terminal provided by the foregoing embodiment, the application layer includes an interface matching module, a first serialization module, and a first communication module that are sequentially connected; the operating layer of the hardware device includes a serial connection a communication module, a second serialization module, and a core processing module; capable of matching an API interface of the current target program to an SPI interface conforming to an operation layer of the hardware device; and further parsing the memory data into byte stream data and transmitting the data to the hardware device The operation layer; the hardware device operation layer restores the byte stream data to the memory data, and then generates a corresponding command according to the received memory data to drive the corresponding hardware device. The application layer and the hardware device operation layer can implement separate cross-host communication control, which overcomes the defect that the traditional hardware device operation layer is limited to the local communication control. In addition, the target program and the hardware device operation layer can run different operating systems, which facilitates compiling and running across operating systems, and reduces the difficulty of post-debugging and application development of the embedded self-service terminal.
附图说明DRAWINGS
图1为一实施例的嵌入式自助终端的通信系统的示意图;1 is a schematic diagram of a communication system of an embedded self-service terminal according to an embodiment;
图2为一实施例的嵌入式自助终端的通信方法的示意性流程图;2 is a schematic flowchart of a communication method of an embedded self-service terminal according to an embodiment;
图3为一实施例的目标程序发出的内存数据的结构定义示例图;3 is a diagram showing an example of a structure definition of memory data issued by a target program of an embodiment;
图4为一实施例的嵌入式自助终端的通信装置的示意性结构图。4 is a schematic structural diagram of a communication device of an embedded self-service terminal according to an embodiment.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
图1为实现本发明实施例嵌入式自助终端的通信系统的示意图;所述嵌入式自助终端的通信系统包括应用层和硬件设备操作层。所述应用层用于运行相应的应用程序,也称作APP(Application Layer的简称),主要实现和用户的交互。所述硬件设备操作层是驱动硬件设备的层,是硬件资源的管理者,例如提 供硬件设备的操作和状态信息等,也称作SP(Service Providers),其能够提供SPI(Serial Peripheral Interface,串行外设接口)接口。硬件设备操作层SP可由不同的厂商提供。1 is a schematic diagram of a communication system for implementing an embedded self-service terminal according to an embodiment of the present invention; the communication system of the embedded self-service terminal includes an application layer and a hardware device operation layer. The application layer is used to run a corresponding application, which is also called APP (short for Application Layer), and mainly implements interaction with the user. The hardware device operation layer is a layer that drives a hardware device, and is a manager of a hardware resource, for example, provides operation and status information of a hardware device, and is also called SP (Service Providers), which can provide a SPI (Serial Peripheral Interface). Line Peripheral Interface) Interface. The hardware device operation layer SP can be provided by different vendors.
本实施例中,应用层APP包括依次连接的接口匹配模块、第一序列化模块和第一通讯模块;硬件设备操作层SP包括依次连接的第二通讯模块、第二序列化模块和核心处理模块。所述接口匹配模块用于获取当前目标程序的API(Application Programming Interface,应用程序编程接口)接口,并将所述API接口匹配到符合硬件设备操作层SP的SPI接口;所述第一序列化模块用于将内存数据解析为字节流数据(即网络数据流);所述第一通讯模块、第二通讯模块用于实现应用层APP和硬件设备操作层SP之间字节流数据的收发;所述第二序列化模块用于将字节流数据解析为内存数据;所述核心处理模块用于根据接收到内存数据生成相应的命令以驱动相应的硬件设备。比如:所述核心处理模块通过第二通讯模块接收到应用程序发送来的命令,对所述命令做一些通用处理,例如对命令进行排队、取消、调度、执行等工作,并实现一些所有设备的通用命令和机制,并将结果和消息通过第二通讯模块返回。In this embodiment, the application layer APP includes an interface matching module, a first serialization module, and a first communication module that are sequentially connected; the hardware device operation layer SP includes a second communication module, a second serialization module, and a core processing module that are sequentially connected. . The interface matching module is configured to acquire an API (Application Programming Interface) interface of the current target program, and match the API interface to an SPI interface that conforms to the hardware device operation layer SP; the first serialization module The first communication module and the second communication module are configured to implement sending and receiving of byte stream data between the application layer APP and the hardware device operation layer SP; The second serialization module is configured to parse the byte stream data into the memory data; the core processing module is configured to generate a corresponding command according to the received memory data to drive the corresponding hardware device. For example, the core processing module receives the command sent by the application program through the second communication module, and performs some general processing on the command, such as queuing, canceling, scheduling, and executing the command, and implementing all the devices. General commands and mechanisms, and return results and messages through the second communication module.
基于上述结构的通信系统,当运行在不同操作系统中的目标程序需调用API接口来操作硬件设备时,只需通过所述接口匹配模块进行接口转换,接口匹配模块将API接口和相应的SPI接口进行映射,并通过第一序列化模块进行数据解析,然后发送请求到相应的硬件设备操作层SP,进而通过硬件设备操作层SP实现对硬件设备的操作。基于序列化模块以及通讯模块,使得应用层APP和硬件设备操作层SP可实现分离式跨主机的通信控制,克服了传统硬件设备操作层SP局限于在本机通信控制的缺陷。另外,传统的硬件设备操作层SP局限于只在单一操作系统(如windows)开发和运行,不便于扩展移植,而基于上述实施 例的嵌入式自助终端的通信系统,目标程序和硬件设备操作层SP可运行不同的操作系统,有利于实现跨操作系统进行编译和运行,降低了嵌入式自助终端的后期调试和应用程序开发的难度。The communication system based on the above structure, when the target program running in different operating systems needs to call the API interface to operate the hardware device, only the interface matching module is used for interface conversion, and the interface matching module uses the API interface and the corresponding SPI interface. The mapping is performed, and the data is parsed by the first serialization module, and then the request is sent to the corresponding hardware device operation layer SP, and the operation of the hardware device is implemented by the hardware device operation layer SP. Based on the serialization module and the communication module, the application layer APP and the hardware device operation layer SP can implement separate cross-host communication control, which overcomes the defect that the traditional hardware device operation layer SP is limited to the local communication control. In addition, the conventional hardware device operation layer SP is limited to development and operation only in a single operating system (such as windows), which is inconvenient to expand the migration, and the communication system of the embedded self-service terminal based on the above embodiment, the target program and the hardware device operation layer SP can run different operating systems, which is conducive to compiling and running across operating systems, reducing the difficulty of post-debugging and application development of embedded self-service terminals.
在一优选实施例中,所述接口匹配模块包括SPI接口层和XFS(Extensions for Financial Services,扩展金融服务)管理器。所述SPI接口层用于为硬件设备操作层SP提供相应的SPI接口;所述XFS管理器用于将目标程序(例如基于Windows的应用程序)对应的API接口匹配到硬件设备操作层SP对应的SPI接口。In a preferred embodiment, the interface matching module includes an SPI interface layer and an XFS (Extensions for Financial Services) manager. The SPI interface layer is configured to provide a corresponding SPI interface for the hardware device operation layer SP; the XFS manager is configured to match an API interface corresponding to a target program (eg, a Windows-based application) to an SPI corresponding to the hardware device operation layer SP interface.
优选的,所述SPI接口层用于提供符合CEN/XFS规范的SPI接口,用于接收XFS管理器下发的命令,发回返回值、完成消息、事件;或者接收XFS管理器下发的命令,发回返回值、完成消息。Preferably, the SPI interface layer is configured to provide an SPI interface conforming to the CEN/XFS specification, for receiving a command sent by the XFS manager, sending back a return value, completing a message, an event, or receiving a command sent by the XFS manager. , send back the return value, complete the message.
下面为理解XFS管理器作进一步的说明。WOSA(Windows Open System Architecture,Windows开放式系统架构)是一种在Windows操作系统下的软件架构。实质上WOSA是使基于Windows的桌面应用程序不需为每个平台重写应用程序就能连接到多计算环境的接口,允许基于Windows的应用程序连接到多种计算环境,而不用为每个平台重写应用程序。而XFS就是WOSA中用于金融扩展服务的部分,是针对金融行业提出的一种软件架构。XFS也是一套基于C的WIN32API,因此既方便应用开发者,又方便服务提供者的技术规范。通过XFS定义了各类金融外围设备的驱动接口,采用这个接口的应用程序,可以运行在任何能够提供符合这个规范的接口的金融设备上,而不论是哪家厂商。因此基于所述接口匹配模块,能够实现应用层APP和硬件设备操作层SP的分离。CEN/XFS标准的要素在于API和对应SPI的定义,让XFS Mananger用来与硬件设备操作层SP通信,和对硬件设备操作层SP一系列的支持。在XFS的实现 中,这些要素组合起来,为基于Windows的应用提供对金融外设的访问。CEN/XFS标准中定义一套标准的接口可实现多厂商的设备的互用性,如果一个应用API成功地实现与硬件设备操作层SP的通信,它将可以运行在相同类型的不同构造的硬件设备操作层SP(可能是另外一个厂商开发的)上,而不用做任何改动;同样地,使用SPI构建的硬件设备操作层SP能够和一系列不同结构的应用一同工作。The following is a further explanation for understanding the XFS Manager. WOSA (Windows Open System Architecture) is a software architecture under the Windows operating system. Essentially WOSA is an interface that enables Windows-based desktop applications to connect to multiple computing environments without having to rewrite applications for each platform, allowing Windows-based applications to connect to multiple computing environments without having to be per platform Rewrite the application. XFS is part of WOSA for financial extension services and is a software architecture for the financial industry. XFS is also a set of C-based WIN32API, so it is convenient for both application developers and service providers. The driver interface for various financial peripherals is defined by XFS. Applications using this interface can run on any financial device that provides an interface that conforms to this specification, regardless of vendor. Therefore, based on the interface matching module, separation of the application layer APP and the hardware device operation layer SP can be implemented. The elements of the CEN/XFS standard are the API and corresponding SPI definitions, which allow XFS Mananger to communicate with the hardware device operating layer SP and a series of support for the hardware device operating layer SP. In the XFS implementation, these elements are combined to provide access to financial peripherals for Windows-based applications. A standard set of interfaces defined in the CEN/XFS standard enables interoperability of multi-vendor devices. If an application API successfully communicates with the hardware device operating layer SP, it can run on different types of hardware of the same type. The device operating layer SP (which may be developed by another vendor) does not require any changes; similarly, the hardware device operating layer SP built using SPI can work with a range of different structured applications.
在一优选实施例中,应用层和硬件设备操作层通过TCP/IP方式网络通信。所述第一通讯模块、第二通讯模块采用socket方式实现字节流数据的收发。以实现跨主机的体通信控制。In a preferred embodiment, the application layer and the hardware device operating layer communicate over a TCP/IP network. The first communication module and the second communication module implement socket data transmission and reception by using a socket method. To achieve cross-host physical communication control.
一般在同一主机中进行传输的数据为内存数据(例如指针数据),包含有数据类型和数据的存储信息。例如,目标程序发出的内存数据的结构定义如图3所示。而在网络传送过程中通常采用的是字节流数据,因此在跨主机的场景下,需对先应用层的内存数据做特殊的处理再发送至接收端(本实施例中即硬件设备操作层SP),而接收端必须根据接收到的数据分配内存,并把分配的内存地址信息返回给核心处理模块。这样从核心处理模块的角度来看,就相当于本地通信,以此减少了数据处理的耦合性。优选的,为了实现跨主机通信控制,上述第一序列化模块、第二序列化模块可按照标准xml格式进行数据解析,以实现跨主机、跨系统和跨平台的数据复制操作。XML(eXtensible Markup Language)即可扩展标记语言,它与HTML一样,都是SGML(Standard Generalized Markup Language,标准通用标记语言)。XML是Internet环境中跨平台的,依赖于内容的技术,是当前处理结构化文档信息的有力工具。XML是一种简单的数据存储语言,使用一系列简单的标记描述数据,而这些标记可以用方便的方式建立,因此XML极其简单易于掌握和使用。XML的简单使其易于在任何应用程序中读 写数据,这使XML很快成为数据交换的唯一公共语言,不同的应用软件基本都支持XML。在本实施例中,这意味着硬件设备操作层SP层可以更容易的与Windows、Mac OS、Linux以及其他平台下产生的信息结合,然后可以很容易加载XML数据到程序中并分析,并以XML格式输出结果。Generally, data transmitted in the same host is in-memory data (for example, pointer data), and contains storage information of data types and data. For example, the structure definition of the memory data emitted by the target program is shown in Figure 3. In the case of a cross-host scenario, the memory data of the first application layer needs to be specially processed and sent to the receiving end (in this embodiment, the hardware device operation layer). SP), and the receiving end must allocate memory according to the received data and return the allocated memory address information to the core processing module. This is equivalent to local communication from the perspective of the core processing module, thereby reducing the coupling of data processing. Preferably, in order to implement cross-host communication control, the first serialization module and the second serialization module may perform data parsing according to a standard xml format to implement data copy operations across hosts, systems, and platforms. XML (eXtensible Markup Language) can be used to extend the markup language. Like HTML, it is SGML (Standard Generalized Markup Language). XML is a cross-platform, content-dependent technology in the Internet environment that is a powerful tool for processing structured document information. XML is a simple data storage language that uses a series of simple tags to describe data, and these tags can be built in a convenient way, so XML is extremely simple and easy to grasp and use. The simplicity of XML makes it easy to read and write data in any application, making XML the only common language for data exchange, and different applications basically support XML. In this embodiment, this means that the hardware device operation layer SP layer can be more easily combined with information generated under Windows, Mac OS, Linux, and other platforms, and then the XML data can be easily loaded into the program and analyzed, and The output is in XML format.
基于上述第一序列化模块和第一通讯模块、第二通讯模块和第二序列化模块,使得应用层APP和硬件设备操作层SP可以运行在不同的操作系统里,这样就可以更灵活地切换应用层APP或硬件设备操作层SP,而又不会影响其某个部分的业务流。例如可以实现应用层APP运行在Windows操作系统主机,硬件设备操作层SP可以运行在Linux操作系统主机;当然应用层APP和硬件设备操作层SP也可同时存在于同一台Windows操作系统主机中。Based on the first serialization module and the first communication module, the second communication module, and the second serialization module, the application layer APP and the hardware device operation layer SP can be run in different operating systems, so that the switch can be more flexibly switched. The application layer APP or the hardware device operates the layer SP without affecting the traffic of a certain part thereof. For example, the application layer APP can be run on the Windows operating system host, and the hardware device operation layer SP can be run on the Linux operating system host; of course, the application layer APP and the hardware device operation layer SP can also exist in the same Windows operating system host at the same time.
结合图1及上述对嵌入式自助终端的通信系统的说明,以下对嵌入式自助终端的通信方法的实施例进行说明。With reference to FIG. 1 and the above description of the communication system of the embedded self-service terminal, an embodiment of the communication method of the embedded self-service terminal will be described below.
图2为一实施例的嵌入式自助终端的通信方法的示意性流程图;如图2所示,本实施例中的嵌入式自助终端的通信方法包括步骤:2 is a schematic flowchart of a communication method of an embedded self-service terminal according to an embodiment; as shown in FIG. 2, the communication method of the embedded self-service terminal in this embodiment includes the following steps:
S11,建立应用层和硬件设备操作层的网络连接。S11. Establish a network connection between the application layer and the operation layer of the hardware device.
本实施中,应用层和硬件设备操作层可分别位于不同的主机,建立应用层和硬件设备操作层的TCP/IP连接。In this implementation, the application layer and the hardware device operation layer may be respectively located on different hosts, and establish a TCP/IP connection between the application layer and the hardware device operation layer.
S12,获取当前目标程序对应的API接口,并将所述API接口匹配到符合所述硬件设备操作层的SPI接口。S12. Acquire an API interface corresponding to the current target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device.
在一优选实施例中,可通过XFS管理器以及预设的SPI接口层实现API接口到硬件设备操作层的SPI接口的匹配。所述SPI接口层用于提供符合CEN/XFS规范的SPI接口,用于接收XFS管理器下发的命令,发回返回值、完成消息、事件;或者接收XFS管理器下发的命令,发回返回值、完成消息。In a preferred embodiment, the matching of the API interface to the SPI interface of the hardware device operating layer is implemented by the XFS manager and the preset SPI interface layer. The SPI interface layer is configured to provide an SPI interface conforming to the CEN/XFS specification, and is configured to receive a command sent by the XFS manager, send back a return value, complete a message, an event, or receive a command sent by the XFS manager, and send back the command. Return value, completion message.
S13,通过所述SPI接口接收目标程序的内存数据,并将所述内存数据解析为字节流数据,将所述字节流数据通过所述网络连接发送至硬件设备操作层。S13. Receive, by the SPI interface, memory data of the target program, and parse the memory data into byte stream data, and send the byte stream data to the hardware device operation layer through the network connection.
在一优选实施例中,可采用socket方式所述字节流数据发送至硬件设备操作层。所谓socket通常也称作"套接字",应用程序通常通过"套接字"向网络发出请求或者应答网络请求。Socket是建立网络连接时使用的。在连接成功时,应用程序两端都会产生一个Socket实例,操作这个实例,完成所需的会话。对于一个网络连接来说,套接字是平等的,并没有差别,不因为在服务器端或在客户端而产生不同级别。In a preferred embodiment, the byte stream data may be sent to the hardware device operation layer in a socket manner. So-called sockets are often referred to as "sockets", and applications typically make requests to the network or respond to network requests via "sockets." Socket is used when establishing a network connection. When the connection is successful, both ends of the application will generate a Socket instance, operate the instance, and complete the required session. For a network connection, the sockets are equal and there is no difference, not because of the different levels on the server side or on the client side.
在一优选实施例中,应用层和硬件设备操作层的套接字之间的连接过程可以分为三个步骤:服务器监听,客户端请求以及连接确认。其中,应用层可作为客户端,硬件设备操作层可作为服务器端。In a preferred embodiment, the connection process between the application layer and the socket of the hardware device operation layer can be divided into three steps: server listening, client request, and connection confirmation. The application layer can serve as a client, and the hardware device operation layer can serve as a server.
服务器监听:是服务器端套接字并不定位具体的客户端套接字,而是处于等待连接的状态,实时监控网络状态。客户端请求:是指由客户端的套接字提出连接请求,要连接的目标是服务器端的套接字。为此,客户端的套接字必须首先描述它要连接的服务器的套接字,指出服务器端套接字的地址和端口号,然后就向服务器端套接字提出连接请求。连接确认:是指当服务器端套接字监听到或者说接收到客户端套接字的连接请求,它就响应客户端套接字的请求,建立一个新的线程,把服务器端套接字的描述发给客户端,一旦客户端确认了此描述,连接就建立好了。而服务器端套接字继续处于监听状态,继续接收其他客户端套接字的连接请求。Server snooping: The server-side socket does not locate a specific client socket, but is in a state of waiting for a connection to monitor the network status in real time. Client request: refers to the client's socket to make a connection request, the target to be connected is the server-side socket. To do this, the client's socket must first describe the socket of the server it is connecting to, indicate the server-side socket's address and port number, and then make a connection request to the server-side socket. Connection confirmation: When the server-side socket listens to or receives a connection request from the client socket, it responds to the client socket request, creates a new thread, and puts the server-side socket. The description is sent to the client, and once the client confirms the description, the connection is established. The server-side socket continues to be listening and continues to receive connection requests from other client sockets.
在一优选实施例中,本步骤中将所述内存数据解析为字节流数据的方式可为:按照标准xml格式将所述内存数据解析为字节流数据。In a preferred embodiment, the manner in which the memory data is parsed into byte stream data in this step may be: parsing the memory data into byte stream data according to a standard xml format.
假设目标程序发出的内存数据的结构定义如图3所示,该数据结构为一个 xml格式的数据,其中:GrgSpSerialConfig为该数据结构的名称,里面为每个命令的定义;每个命令分别包括命令ID、命令参数的长度、命令参数的类型、命令的起始位置,如果有多个参数时,可以分别用Block0、Block1等表示。将所述内存数据解析为字节流数据的具体方式可为:首先根据命令ID号查找xml节点,然后再根据xml节点,获取数据的长度和指针的位置,并根据指针的类型,把指针对应的数据组合到网络数据流中。Assume that the structure definition of the memory data issued by the target program is as shown in Figure 3. The data structure is an xml format data, where: GrgSpSerialConfig is the name of the data structure, which is defined for each command; each command includes a command The ID, the length of the command parameter, the type of the command parameter, and the start position of the command. If there are multiple parameters, they can be represented by Block0, Block1, and so on. The specific manner of parsing the memory data into byte stream data may be: firstly, searching for an xml node according to the command ID number, and then acquiring the length of the data and the position of the pointer according to the xml node, and correspondingly according to the type of the pointer The data is combined into a network data stream.
S14,硬件设备操作层将接收到的字节流数据解析为内存数据,并根据得到的内存数据生成相应的命令,以驱动相应的硬件设备。S14. The hardware device operation layer parses the received byte stream data into the memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
在一优选实施例中,将接收到的字节流数据解析为内存数据的方式可为:按照标准xml格式将接收到的字节流数据解析为内存数据。具体可为:将指定命令ID的字节流数据还原为内存数据,也就是首先根据命令ID号查找xml节点,然后再根据xml节点,获取数据的长度,并根据指针的位置和类型,分配内存,并把内存的指针返回,组成返回结果结构体;即,将一串字节流转换成如图3所示xml结构的数据。In a preferred embodiment, the received byte stream data is parsed into the in-memory data by parsing the received byte stream data into memory data according to a standard xml format. Specifically, the byte stream data of the specified command ID is restored to the memory data, that is, the xml node is first searched according to the command ID number, and then the length of the data is obtained according to the xml node, and the memory is allocated according to the position and type of the pointer. And returning the pointer of the memory to form a return result structure; that is, converting a stream of bytes into data of the xml structure as shown in FIG.
通过步骤S13以及S14,就可以实现跨主机、跨系统和跨平台的数据复制操作。Through steps S13 and S14, data copy operations across hosts, systems, and platforms can be implemented.
通过上述实施例的嵌入式自助终端的通信方法,通过socket进行分离式跨主机、跨系统和跨平台的通信控制,实现了应用层和硬件设备操作层的分离,同时也解决了应用层和硬件设备操作层可以运行在不同的操作系统里,这样就可以更灵活地切换应用层或硬件设备操作层,而又不会影响其某个部分的业务流。例如根据上述的框架结构,可以实现应用层运行在Windows操作系统主机,硬件设备操作层运行在Linux操作系统主机;或者例如应用层和硬件设备操作层同时存在于同一台Windows操作系统主机。Through the communication method of the embedded self-service terminal in the above embodiment, the separate cross-host, cross-system and cross-platform communication control is performed through the socket, thereby realizing the separation of the application layer and the operation layer of the hardware device, and also solving the application layer and the hardware. The device operation layer can be run in different operating systems, so that the application layer or hardware device operation layer can be switched more flexibly without affecting the traffic of a certain part of it. For example, according to the above framework structure, the application layer can be run on the Windows operating system host, and the hardware device operation layer runs on the Linux operating system host; or, for example, the application layer and the hardware device operation layer exist simultaneously on the same Windows operating system host.
需要说明的是,对于前述的各方法实施例,为了简便描述,将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。此外,还可对上述实施例进行任意组合,得到其他的实施例。It should be noted that, for the foregoing method embodiments, for the sake of brevity, they are all described as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence, because In accordance with the present invention, certain steps may be performed in other sequences or concurrently. Further, any combination of the above embodiments can be made, and other embodiments can be obtained.
基于与上述实施例中的嵌入式自助终端通信方法相同的思想,本发明还提供嵌入式自助终端的通信装置,该装置可用于执行上述嵌入式自助终端的通信方法。为了便于说明,嵌入式自助终端的通信装置实施例的结构示意图中,仅仅示出了与本发明实施例相关的部分,本领域技术人员可以理解,图示结构并不构成对装置的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Based on the same idea as the embedded self-service terminal communication method in the above embodiment, the present invention also provides a communication device for an embedded self-service terminal, which can be used to execute the communication method of the embedded self-service terminal. For the convenience of the description, in the structural diagram of the embodiment of the communication device of the embedded self-service terminal, only the parts related to the embodiment of the present invention are shown. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and Includes more or fewer components than shown, or combines some components, or different component arrangements.
图4为本发明一实施例的嵌入式自助终端的通信装置的示意性结构图;如图4所示,本实施例的嵌入式自助终端的通信装置包括:通信连接单元310、接口匹配单元320、数据解析及发送单元330、数据接收及处理单元340。各模块详述如下:4 is a schematic structural diagram of a communication device of an embedded self-service terminal according to an embodiment of the present invention; as shown in FIG. 4, the communication device of the embedded self-service terminal of the present embodiment includes: a communication connection unit 310 and an interface matching unit 320. The data analysis and transmission unit 330 and the data reception and processing unit 340. The modules are detailed as follows:
所述通信连接单元310,用于建立应用层和硬件设备操作层的网络连接;The communication connection unit 310 is configured to establish a network connection between an application layer and a hardware device operation layer;
所述接口匹配单元320,用于获取目标程序对应的API接口,并将所述API接口匹配到符合所述硬件设备操作层的SPI接口;The interface matching unit 320 is configured to acquire an API interface corresponding to the target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device;
数据解析及发送单元330,用于通过所述SPI接口接收目标程序的内存数据,并将所述内存数据解析为字节流数据,并将所述字节流数据通过所述网络连接发送至硬件设备操作层;a data parsing and transmitting unit 330, configured to receive, by using the SPI interface, memory data of a target program, and parse the memory data into byte stream data, and send the byte stream data to the hardware through the network connection Equipment operation layer
所述数据接收及处理单元340,用于所述硬件设备操作层将接收到的字节流数据解析为内存数据,并根据得到的内存数据生成相应的命令,以驱动相应的硬件设备。The data receiving and processing unit 340 is configured to: the hardware device operation layer parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
需要说明的是,上述示例的嵌入式自助终端的通信装置的实施方式中,各单元之间的信息交互、执行过程等内容,由于与本发明前述方法实施例基于同一构思,其带来的技术效果与本发明前述方法实施例相同,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。It should be noted that, in the implementation manner of the communication device of the embedded self-service terminal of the above example, the information exchange, the execution process, and the like between the units are based on the same concept as the foregoing method embodiment of the present invention. The effect is the same as the foregoing method embodiment of the present invention. For details, refer to the description in the method embodiment of the present invention, and details are not described herein again.
此外,上述示例的嵌入式自助终端的通信装置的实施方式中,各功能单元的逻辑划分仅是举例说明,实际应用中可以根据需要,例如出于相应硬件的配置要求或者软件的实现的便利考虑,将上述功能分配由不同的功能单元完成,即将所述嵌入式自助终端的通信装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。其中各功能单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, in the implementation manner of the communication device of the embedded self-service terminal of the above example, the logical division of each functional unit is only an example, and the actual application may be considered according to requirements, for example, for the configuration requirements of the corresponding hardware or the convenience of implementation of the software. The above function assignment is performed by different functional units, that is, the internal structure of the communication device of the embedded self-service terminal is divided into different functional modules to complete all or part of the functions described above. Each functional unit can be implemented in the form of hardware or in the form of a software functional unit.
本领域普通技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,作为独立的产品销售或使用。所述程序在执行时,可执行如上述各方法的实施例的全部或部分步骤。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。It will be understood by those skilled in the art that all or part of the processes in the above embodiments may be implemented by a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium as Independent product sales or use. The program, when executed, may perform all or part of the steps of an embodiment of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are all focused, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
以上所述实施例仅表达了本发明的几种实施方式,不能理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-described embodiments are merely illustrative of several embodiments of the invention and are not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (10)

  1. 一种嵌入式自助终端的通信系统,其特征在于,包括应用层和硬件设备操作层;应用层包括依次连接的接口匹配模块、第一序列化模块和第一通讯模块;所述硬件设备操作层包括依次连接的第二通讯模块、第二序列化模块和核心处理模块;An embedded self-service terminal communication system, comprising: an application layer and a hardware device operation layer; the application layer comprises an interface matching module, a first serialization module and a first communication module connected in sequence; the hardware device operation layer The second communication module, the second serialization module and the core processing module are sequentially connected;
    所述接口匹配模块用于获取目标程序的API接口,并将所述API接口匹配到符合所述硬件设备操作层的SPI接口;所述第一序列化模块用于将内存数据解析为字节流数据;所述第一通讯模块、第二通讯模块用于实现应用层和硬件设备操作层之间字节流数据的收发;所述第二序列化模块用于将字节流数据解析为内存数据;所述核心处理模块用于根据接收到内存数据生成相应的命令以驱动硬件设备。The interface matching module is configured to acquire an API interface of the target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device; the first serialization module is configured to parse the memory data into a byte stream. The first communication module and the second communication module are configured to implement sending and receiving of byte stream data between the application layer and the hardware device operation layer; and the second serialization module is configured to parse the byte stream data into the memory data. The core processing module is configured to generate a corresponding command according to the received memory data to drive the hardware device.
  2. 根据权利要求1所述的嵌入式自助终端的通信系统,其特征在于,所述接口匹配模块包括SPI接口层和XFS管理器;The embedded self-service terminal communication system according to claim 1, wherein the interface matching module comprises an SPI interface layer and an XFS manager;
    所述SPI接口层用于为硬件设备操作层提供相应的SPI接口;所述XFS管理器用于将目标程序对应的API接口匹配到硬件设备操作层对应的SPI接口。The SPI interface layer is configured to provide a corresponding SPI interface for the hardware device operation layer; the XFS manager is configured to match the API interface corresponding to the target program to the SPI interface corresponding to the operation layer of the hardware device.
  3. 根据权利要求2所述的嵌入式自助终端的通信系统,其特征在于,所述SPI接口层用于提供符合CEN/XFS规范的SPI接口。The communication system of the embedded self-service terminal according to claim 2, wherein the SPI interface layer is configured to provide an SPI interface conforming to the CEN/XFS specification.
  4. 根据权利要求1至3中任一所述的嵌入式自助终端的通信系统,其特征在于,所述第一通讯模块、第二通讯模块采用socket方式实现字节流数据的收发。The communication system of the embedded self-service terminal according to any one of claims 1 to 3, wherein the first communication module and the second communication module implement byte transceiver data transmission and reception by using a socket method.
  5. 根据权利要求1至3中任一所述的嵌入式自助终端的通信系统,其特征在于,所述第一序列化模块、第二序列化模块均按照标准xml格式进行数据解析。The communication system of the embedded self-service terminal according to any one of claims 1 to 3, wherein the first serialization module and the second serialization module perform data analysis according to a standard xml format.
  6. 一种嵌入式自助终端的通信方法,其特征在于,包括:A communication method for an embedded self-service terminal, comprising:
    建立应用层和硬件设备操作层的网络连接;Establish a network connection between the application layer and the hardware device operation layer;
    获取目标程序对应的API接口,并将所述API接口匹配到符合所述硬件设备操作层的SPI接口;Obtaining an API interface corresponding to the target program, and matching the API interface to an SPI interface that conforms to an operation layer of the hardware device;
    通过所述SPI接口接收目标程序的内存数据,并将所述内存数据解析为字节流数据,并将所述字节流数据通过所述网络连接发送至硬件设备操作层;Receiving, by the SPI interface, memory data of the target program, and parsing the memory data into byte stream data, and sending the byte stream data to the hardware device operation layer through the network connection;
    所述硬件设备操作层将接收到的字节流数据解析为内存数据,并根据得到的内存数据生成相应的命令,以驱动相应的硬件设备。The hardware device operation layer parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
  7. 根据权利要求6所述的嵌入式自助终端的通信方法,其特征在于,建立应用层和硬件设备操作层的网络连接,具体包括:建立应用层和硬件设备操作层的TCP/IP连接。The communication method of the embedded self-service terminal according to claim 6, wherein the establishing a network connection between the application layer and the operation layer of the hardware device comprises: establishing a TCP/IP connection of the application layer and the operation layer of the hardware device.
  8. 根据权利要求7所述的嵌入式自助终端的通信方法,其特征在于,将所述字节流数据通过所述网络连接发送至硬件设备操作层,具体包括:The communication method of the embedded self-service terminal according to claim 7, wherein the sending of the byte stream data to the operation layer of the hardware device by using the network connection comprises:
    通过所述网络连接将所述字节流数据按照socket方式发送至硬件设备操作层。The byte stream data is sent to the hardware device operation layer in a socket manner through the network connection.
  9. 根据权利要求6所述的嵌入式自助终端的通信方法,其特征在于,将所述内存数据解析为字节流数据,具体包括:按照标准xml格式将所述内存数据解析为字节流数据;The communication method of the embedded self-service terminal according to claim 6, wherein the parsing the memory data into byte stream data comprises: parsing the memory data into byte stream data according to a standard xml format;
    将接收到的字节流数据解析为内存数据,具体包括:按照标准xml格式将接收到的字节流数据解析为内存数据。Parsing the received byte stream data into memory data includes: parsing the received byte stream data into memory data according to a standard xml format.
  10. 一种嵌入式自助终端的通信装置,其特征在于,包括:A communication device for an embedded self-service terminal, comprising:
    通信连接单元,用于建立应用层和硬件设备操作层的网络连接;a communication connection unit, configured to establish a network connection of an application layer and a hardware device operation layer;
    接口匹配单元,用于获取目标程序对应的API接口,并将所述API接口匹 配到符合所述硬件设备操作层的SPI接口;An interface matching unit, configured to acquire an API interface corresponding to the target program, and match the API interface to an SPI interface that conforms to an operation layer of the hardware device;
    数据解析及发送单元,用于通过所述SPI接口接收目标程序的内存数据,并将所述内存数据解析为字节流数据,并将所述字节流数据通过所述网络连接发送至硬件设备操作层;a data parsing and transmitting unit, configured to receive the memory data of the target program through the SPI interface, parse the memory data into byte stream data, and send the byte stream data to the hardware device through the network connection Operation layer
    数据接收及处理单元,用于所述硬件设备操作层将接收到的字节流数据解析为内存数据,并根据得到的内存数据生成相应的命令,以驱动相应的硬件设备。And a data receiving and processing unit, configured to: the hardware device operation layer parses the received byte stream data into memory data, and generates a corresponding command according to the obtained memory data to drive the corresponding hardware device.
PCT/CN2018/093785 2017-07-26 2018-06-29 Communication system, method and apparatus for embedded self-service terminal WO2019019864A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710617743.7A CN107493266B (en) 2017-07-26 2017-07-26 Communication system, method and device of embedded self-service terminal
CN201710617743.7 2017-07-26

Publications (1)

Publication Number Publication Date
WO2019019864A1 true WO2019019864A1 (en) 2019-01-31

Family

ID=60644895

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093785 WO2019019864A1 (en) 2017-07-26 2018-06-29 Communication system, method and apparatus for embedded self-service terminal

Country Status (2)

Country Link
CN (1) CN107493266B (en)
WO (1) WO2019019864A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110929248A (en) * 2019-11-22 2020-03-27 中电长城(长沙)信息技术有限公司 CEN/XFS SP implementation method and device based on security authorization and financial self-service equipment

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493266B (en) * 2017-07-26 2020-07-28 广州广电运通金融电子股份有限公司 Communication system, method and device of embedded self-service terminal
CN109254761A (en) * 2018-09-30 2019-01-22 苏州浪潮智能软件有限公司 New Hardware method of interface under a kind of CEN-XFS framework
CN109461248A (en) * 2018-10-26 2019-03-12 苏州浪潮智能软件有限公司 A method of driving function is realized based on wholesale currency circulator
CN109309727A (en) * 2018-10-26 2019-02-05 苏州浪潮智能软件有限公司 A kind of SP remote access implementation method
CN111752840B (en) * 2020-06-28 2023-08-08 中电长城(长沙)信息技术有限公司 Cross-system financial self-service equipment SP automatic test method, equipment and medium
CN111800763B (en) * 2020-06-30 2022-11-29 展讯通信(上海)有限公司 Intelligent device and communication system and method of AP module and WCN module thereof
CN113238803A (en) * 2021-05-11 2021-08-10 建信金融科技有限责任公司 Application management method, device, equipment and storage medium
CN116541107A (en) * 2023-06-26 2023-08-04 平安银行股份有限公司 Peripheral calling method, device, terminal and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040167867A1 (en) * 2003-02-20 2004-08-26 Bea Systems, Inc. Virtual content repository application program interface
CN104375841A (en) * 2014-12-03 2015-02-25 广州广电运通金融电子股份有限公司 Structure and implementation method based on CEN/XFS standard of linux system
CN106250126A (en) * 2016-07-26 2016-12-21 武汉深之度科技有限公司 XFS under a kind of linux system realizes system and method
CN107493266A (en) * 2017-07-26 2017-12-19 广州广电运通金融电子股份有限公司 Communication system, the method and device of built-in self-help terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102427417A (en) * 2011-12-08 2012-04-25 北京工业大学 System and method for remotely controlling Internet of things access equipment
CN102571939A (en) * 2011-12-26 2012-07-11 广州市玄武无线科技有限公司 Cross-platform communication method and system
CN103186608B (en) * 2011-12-30 2017-08-08 北京谊安医疗系统股份有限公司 The method and apparatus that a kind of queue serializes formula processing data
US8874967B2 (en) * 2012-03-30 2014-10-28 Ncr Corporation Managing code-tracing data
CN106293966B (en) * 2016-08-03 2019-10-18 武汉深之度科技有限公司 The AP layers of communication means and LFS system with SP layers in a kind of LFS system
CN106602361A (en) * 2016-11-16 2017-04-26 深圳市丰巨泰科电子有限公司 Intelligent socket system based on WeChat official account control

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040167867A1 (en) * 2003-02-20 2004-08-26 Bea Systems, Inc. Virtual content repository application program interface
CN104375841A (en) * 2014-12-03 2015-02-25 广州广电运通金融电子股份有限公司 Structure and implementation method based on CEN/XFS standard of linux system
CN106250126A (en) * 2016-07-26 2016-12-21 武汉深之度科技有限公司 XFS under a kind of linux system realizes system and method
CN107493266A (en) * 2017-07-26 2017-12-19 广州广电运通金融电子股份有限公司 Communication system, the method and device of built-in self-help terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110929248A (en) * 2019-11-22 2020-03-27 中电长城(长沙)信息技术有限公司 CEN/XFS SP implementation method and device based on security authorization and financial self-service equipment
CN110929248B (en) * 2019-11-22 2023-08-08 中电长城(长沙)信息技术有限公司 CEN/XFS SP implementation method and device based on security authorization and financial self-service equipment

Also Published As

Publication number Publication date
CN107493266B (en) 2020-07-28
CN107493266A (en) 2017-12-19

Similar Documents

Publication Publication Date Title
WO2019019864A1 (en) Communication system, method and apparatus for embedded self-service terminal
EP2622484B1 (en) Debugger launch and attach on compute clusters
EP0613274B1 (en) Socket structure for concurrent multiple protocol access
JP3853592B2 (en) Distributed web application server
US7130881B2 (en) Remote execution model for distributed application launch and control
US6115744A (en) Client object API and gateway to enable OLTP via the internet
US6584499B1 (en) Methods and apparatus for performing mass operations on a plurality of managed devices on a network
US8140688B2 (en) Method and system for establishing connections between nodes in a communication network
US10140121B2 (en) Sending a command with client information to allow any remote server to communicate directly with client
US7451197B2 (en) Method, system, and article of manufacture for network protocols
US20070282964A1 (en) Method and apparatus for processing remote shell commands
US9154580B2 (en) Connection management in a computer networking environment
US20070094402A1 (en) Method, process and system for sharing data in a heterogeneous storage network
US20030055862A1 (en) Methods, systems, and articles of manufacture for managing systems using operation objects
JP2007066307A (en) High availability heterogeneous cluster manager
WO2022032984A1 (en) Mqtt protocol simulation method and simulation device
CN108804313B (en) Method and device for remotely debugging program and server
US6738817B1 (en) System and method for enabling graphic applications in an interactive programming model
WO2021239157A1 (en) Application debugging method and apparatus, and device and medium
JPH07117929B2 (en) Connectionless session oriented protocol first message generation system and method
US7769828B2 (en) System for provisioning time sharing option (TSO) and interactive productivity system facility (ISPF) services in a network environment
US9178960B2 (en) Recovering resource connections
US8086760B1 (en) Managing communications connections with data storage systems
US7103889B2 (en) Method, system, and article of manufacture for agent processing
EP2015190A1 (en) Technique of controlling communication of installed apparatus with outside by means of proxy server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18838433

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18838433

Country of ref document: EP

Kind code of ref document: A1