WO2024041304A1 - Pos机中双cpu的通信方法、装置、系统及介质 - Google Patents

Pos机中双cpu的通信方法、装置、系统及介质 Download PDF

Info

Publication number
WO2024041304A1
WO2024041304A1 PCT/CN2023/109680 CN2023109680W WO2024041304A1 WO 2024041304 A1 WO2024041304 A1 WO 2024041304A1 CN 2023109680 W CN2023109680 W CN 2023109680W WO 2024041304 A1 WO2024041304 A1 WO 2024041304A1
Authority
WO
WIPO (PCT)
Prior art keywords
file system
remote file
target service
operation interface
server
Prior art date
Application number
PCT/CN2023/109680
Other languages
English (en)
French (fr)
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 WO2024041304A1 publication Critical patent/WO2024041304A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • G06F15/17306Intercommunication techniques
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07GREGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
    • G07G1/00Cash registers
    • G07G1/12Cash registers electronically operated

Definitions

  • This application belongs to the technical field of POS machines, and particularly relates to communication methods, devices, systems and media for dual CPUs in POS machines.
  • the POS machines have slowly evolved from the initial single-CPU architecture to using more and more dual-CPU architectures.
  • the dual-CPU architecture includes a general CPU and a security CPU.
  • the two CPUs are independent of each other and run their own systems.
  • the dual CPUs need to communicate with each other. Only through collaboration can the specific functions of the POS machine be completed, which involves the communication interaction of dual CPUs.
  • the communication technology between the traditional general-purpose CPU and the safety CPU mainly uses the serial communication of the uart protocol. This serial communication method is slow and the data interaction efficiency is low.
  • both the traditional general-purpose CPU side and the safety CPU side provide data access and
  • the storage module (flash storage) of the storage space leads to a corresponding increase in the cost of dual CPUs.
  • embodiments of the present application provide a communication method, device, system and medium for dual CPUs in a POS machine to solve the problems of low efficiency and high cost of dual CPU communication in the prior art.
  • the first aspect of the embodiment of the present application provides a communication method for dual CPUs in a POS machine, including:
  • the safety CPU receives the target service call request initiated by the general CPU
  • the security CPU controls the client of the remote file system to initiate a target service execution request to the server of the remote file system according to the target service invocation request, so that the server of the remote file system receives the target service execution request.
  • the security CPU returns the execution result received by the client of the remote file system to the general CPU.
  • the controlling remote file The client of the system initiates a target service execution request to the server of the remote file system, so that the server of the remote file system receives the target service execution request and executes the target service on the storage module on the general CPU side, including:
  • the client that controls the remote file system sends the operation interface information corresponding to the target service to the server of the remote file system, so that the server of the remote file system receives the operation interface information and then performs the operation interface information on the universal
  • the storage module on the CPU side executes the target service.
  • the operation interface information includes an operation interface ID
  • the server of the remote file system Executing the target service on the storage module on the general CPU side includes: after the server of the remote file system receives the operation interface information, calling the corresponding operation interface according to the operation interface ID to perform the target service on the general CPU side.
  • the storage module executes the target service.
  • the corresponding operation interface is called according to the operation interface ID to execute the target service on the storage module on the general CPU side. , including: judging according to the operation interface ID whether the server of the remote file system has an operation interface corresponding to the operation interface ID; if so, calling the operation interface corresponding to the operation interface ID to the general CPU side
  • the storage module executes the target service; if not, returns an execution error result to the client of the remote file.
  • the method before the client of the remote file system initiates a target service execution request to the server of the remote file system, the method further includes: executing the target service based on the RPMsg protocol.
  • the target service executes the request for encoding;
  • the server of the remote file After the server of the remote file receives the target service execution request, it also includes: decoding the target service execution request based on the RPMsg protocol;
  • the method further includes: based on The RPMsg protocol encodes the execution results;
  • the method further includes: decoding the execution result based on the RPMsg protocol.
  • the second aspect of the embodiment of the present application provides a communication device for dual CPUs in a POS machine, including: a call request module for the security CPU to receive a target service call request initiated by the general CPU; and an execution service module for the security CPU to receive the target service call request initiated by the general CPU.
  • the CPU controls the client of the remote file system to initiate a target service execution request to the server of the remote file system, so that the server of the remote file system receives the target service execution request and executes the request.
  • the storage module on the general CPU side executes the target service and sends the execution result to the client of the remote file system; the return result module is used for the security CPU to transfer the execution result received by the client of the remote file system.
  • the general purpose CPU executes the target service and sends the execution result to the client of the remote file system.
  • the client that controls the remote file system initiates a target service execution request to the server of the remote file system, so that the server of the remote file system After receiving the target service execution request, executing the target service on the storage module on the general CPU side includes: controlling the client of the remote file system to send the operation interface corresponding to the target service to the server of the remote file system. information, so that the server of the remote file system receives the operation interface information and then performs the target service on the storage module on the general CPU side.
  • the operation interface information includes an operation interface ID
  • the server of the remote file system performs the processing on the general CPU side after receiving the operation interface information.
  • the storage module executes the target service, including: after the server of the remote file system receives the operation interface information, it calls the corresponding operation interface according to the operation interface ID to execute the target on the storage module on the general CPU side. Serve.
  • a third aspect of the embodiment of the present application provides a communication system, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program Implement the steps of the method described in any one of the first aspects.
  • the fourth aspect of the embodiments of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed by a processor, the method according to any one of the first aspects is implemented. A step of.
  • the beneficial effects of this application are: the security CPU of this application realizes the memory access operation of the general CPU through the client of the remote file system and the server of the remote file system.
  • the security CPU has no storage capability, Under this circumstance, the security CPU can share the storage module on the general CPU side.
  • This application uses the communication mechanism of the remote file system.
  • the security CPU can share the storage module.
  • Figure 1 is a schematic diagram of the existing dual-CPU communication architecture provided by the embodiment of the present application.
  • Figure 2 is a schematic flow chart of the implementation of a communication method for dual CPUs in a POS machine provided by an embodiment of the present application;
  • FIG. 3 is a schematic diagram of the dual-CPU communication architecture provided by the embodiment of this application.
  • Figure 4 is a schematic diagram of the remote file system architecture provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of the file system mounting process provided by the embodiment of this application.
  • Figure 6 is a schematic flowchart of file reading and writing operations provided by the embodiment of the present application.
  • Figure 7 is a schematic diagram of a dual-CPU communication device in a POS machine provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of a communication system provided by an embodiment of the present application.
  • POS Point Of Sale, payment terminal
  • the solution of adding a security CPU is currently used to ensure the security of important data.
  • the general CPU running core in the POS machine System the security CPU runs payment-related services, such as card processing, PIN processing, key management, etc.
  • the general CPU and the safety CPU run independently, they must cooperate with each other to complete the specific functions of the POS machine. This involves the communication problem between the general CPU and the safety CPU. Therefore, how to ensure the security between the general CPU and the safety CPU? Stable communication has become a key technology for smart POS.
  • the traditional general-purpose CPU and the security CPU are equipped with uart (serial port) on both sides, and the two communicate through the serial port.
  • This serial port communication method is slow and the data interaction efficiency is low; and the traditional general-purpose CPU and security CPU
  • traditional serial communication technology is no longer suitable for this kind of security CPU without a memory module.
  • the communication between the safety CPU and the general-purpose CPU is in urgent need of a new communication method to ensure the communication interaction between the dual CPUs.
  • the embodiment of the present application proposes a dual-CPU device in a POS machine.
  • the communication method, device, system and media adopt remote file system (remotefs, remote file system), and realize the access of the secure CPU to the general CPU through communication and interaction between the client of the remote file system and the server of the remote file system.
  • remote file system remote file system
  • the safety CPU can share the storage module on the general CPU side.
  • this application saves the system cost of the dual CPU; and compared with Compared with the existing dual-CPU serial port communication method, the communication method of this application speeds up the communication rate and improves the data interaction efficiency.
  • the first aspect of the embodiment of the present application provides a communication method for dual CPUs in a POS machine, including the following steps:
  • the safety CPU receives the target service call request initiated by the general CPU;
  • the security CPU After the POS is powered on, the security CPU sends network messages to the general CPU, and the security CPU connects to the general CPU to facilitate subsequent service execution.
  • the network transmission methods of the security CPU and the general CPU include but are not limited to IPC protocol transmission. Since the security CPU involves payment security services related to important data, in actual payment operations, the general CPU requests the security CPU to perform the corresponding payment service function, and the security CPU will access the corresponding service data. However, since there is no storage module on the security CPU side, Therefore, the embodiment of the present application adopts a method in which the safety CPU and the general CPU share a storage module, so that the service data of the safety CPU can be stored in the storage module on the general CPU side, and the safety CPU reads and writes files through the storage module on the general CPU side. Data operations achieve the same effect as local operations on the secure CPU.
  • the embodiment of the present application invented a brand-new communication architecture of dual CPUs in POS machines.
  • the architecture mainly includes a general CPU, a security CPU, a client and a server of a remote file system.
  • the remote file system The client is deployed in the secure CPU, and the server of the remote file system is deployed in the general CPU.
  • the general CPU and the security CPU are based on RPMsg (Remote Processor Messaging), which is a virtio-based messaging bus that allows the kernel driver to communicate with the system.
  • the remote processor is used for communication) protocol connection and transmission, and the server of the remote file system and the client of the remote file system are connected and transmitted based on the RPMsg protocol.
  • the master-slave system communicates through IPC (Inter Processor Communication), and RPMsg is one of IPC.
  • IPC Inter Processor Communication
  • RPMsg is one of IPC.
  • RPMsg a communication protocol specifically used for inter-core communication.
  • step S201 when the general CPU requests the security CPU to perform the corresponding payment service function, the general CPU will initiate a target The service call request goes to the security CPU.
  • the security CPU receives the target service call request and triggers it to access the service data corresponding to the payment service function. That is, it executes the target service on the storage module on the general CPU side and completes the corresponding payment service function of the POS machine.
  • the payment service function in the embodiment of this application refers to the payment behavior in the actual payment operation
  • the target service refers to the security CPU performing the corresponding target service on the storage module on the general CPU side.
  • Step S202 The security CPU controls the client of the remote file system to initiate a target service execution request to the server of the remote file system according to the target service invocation request, so that the server of the remote file system receives the target service. After executing the request, execute the target service on the storage module on the general CPU side, and send the execution result to the client of the remote file system;
  • Step S203 The security CPU returns the execution result received by the client of the remote file system to the general CPU.
  • the overall process of the communication method of dual CPUs in the POS machine is: when the security CPU receives the target service call request initiated by the general CPU, the security CPU controls the client of the remote file system according to the target service call request. Initiate a target service execution to the server Request; after the server receives the target service execution request, it executes the target service to the storage module on the general CPU side and returns the execution result to the client; the client sends the received execution result to the safe CPU; the safe CPU will execute The results are returned to the general purpose CPU.
  • step S202 specifically includes: controlling the client of the remote file system to send the operation interface information corresponding to the target service to the server of the remote file system, so that the After receiving the operation interface information, the server of the remote file system performs the target service on the storage module on the general CPU side.
  • the operation interface information includes an operation interface ID.
  • the server of the remote file system After receiving the operation interface information, the server of the remote file system performs the target service on the storage module on the general CPU side, including: the remote file system After receiving the operation interface information, the server calls the corresponding operation interface according to the operation interface ID to execute the target service on the storage module on the general CPU side.
  • calling the corresponding operation interface according to the operation interface ID to perform the target service on the storage module on the general CPU side includes: judging whether the server of the remote file system exists according to the operation interface ID.
  • the operation interface corresponding to the operation interface ID if yes, call the operation interface corresponding to the operation interface ID to execute the target service on the storage module on the general CPU side; if not, return the execution error result to the remote file client.
  • the method before the client of the remote file system initiates a target service execution request to the server of the remote file system, the method further includes: encoding the target service execution request based on the RPMsg protocol.
  • the server of the remote file After the server of the remote file receives the target service execution request, it also includes: decoding the target service execution request based on the RPMsg protocol; and sending the execution result to the client of the remote file system.
  • it also includes: encoding the execution result based on the RPMsg protocol; connecting the client to the remote file system
  • the method further includes: decoding the execution result based on the RPMsg protocol.
  • Figure 4 shows the architecture diagram of the remote file system.
  • Both the client and the server of the remote file system have protocol codecs and can transmit the RPMsg protocol format. encoding and decoding functions.
  • the security CPU runs the client of the remote file system.
  • the client's protocol codec converts the operation interface information (operation interface ID) corresponding to the target service , parameters and other information) are assembled and encoded into messages that can be transmitted in the RPMsg protocol format, and sent to the server of the remote file system;
  • the general CPU runs the server side of the remote file system.
  • the protocol codec on the server side receives the message transmitted in the RPMsg protocol format sent by the client, and decodes it to obtain the operation interface information. According to the operation interface information
  • the operation interface ID searches for a corresponding operation interface on the server side of the remote file system. If a corresponding operation interface exists, the local service is called to execute the target service on the storage module on the general CPU side, and the execution result is returned to the protocol codec on the server side.
  • the codec is encoded and sent to the client; if there is no corresponding operation interface, the execution error result is returned to the protocol codec of the server, and the execution error result is returned to the client after encoding.
  • the security CPU and the general CPU can share a storage module.
  • the security CPU implements the target service on the storage module on the general CPU side through the client and server of the remote file system.
  • the target service can be the file system. Operations such as mounting and uninstalling, directory creation and deletion, file creation, reading and writing, etc.
  • the embodiment of this application combines the above communication method and selects two target services: the mounting process of the file system and the file reading and writing process for detailed description:
  • FIG. 5 it is a schematic diagram of the file system mounting process.
  • the client of the remote file system calls the operation interface of the file system mount, and transfers the operation interface information such as the operation interface ID and parameters related to the operation interface.
  • the information is encoded and sent to the server of the remote file system based on the RPMsg protocol; the server receives and decodes the operation interface information, and searches for the operation interface corresponding to the file system mount according to the operation interface ID.
  • the operation interface is based on the RPMsg protocol and the execution error result is encoded and returned to the client of the remote file system); the client receives the execution result (or execution error result) and completes the file system mounting operation.
  • FIG. 6 it is a schematic diagram of the file reading and writing process.
  • the client of the remote file system calls the file reading and writing operation interface, encodes the operation interface information such as the operation interface ID and parameters related to the operation interface, and sends it to the remote server based on the RPMsg protocol.
  • the server of the file system receives and decodes the operation interface information, searches for the operation interface corresponding to file reading and writing according to the operation interface ID, and if there is an operation interface corresponding to file reading and writing, calls the operation interface of file reading and writing to the general CPU
  • the storage module on the side performs file read and write operations, and based on the RPMsg protocol, the execution result (actual read content and length or written file length) is encoded and returned to the client of the remote file system (if there is no corresponding operation for file read and write) interface, based on the RPMsg protocol, the execution error result will be encoded and returned to the client of the remote file system); the client receives the execution result (or execution error result), completes the file reading and writing operations, and returns the execution result through the secure CPU for general-purpose CPUs.
  • the remote file system in the embodiment of the present application provides the following basic functions (equivalent to target services) including:
  • read read file
  • opendir open a directory
  • readdir read directory
  • closedir close the directory
  • statvfs Get file system statistics.
  • the protocol content transmitted by the remote file system based on the RPMsg protocol includes the request message initiated by the client and the response message returned by the server.
  • the protocol content of the request message is shown in Table 1
  • the protocol content of the response message is shown in Table 2. Shown:
  • sequence number of each step in the above embodiment does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
  • the second aspect of the embodiment of the present application provides a communication device for dual CPUs in a POS machine, including:
  • the call request module 701 is used for the security CPU to receive the target service call request initiated by the general CPU;
  • Execution service module 702 configured for the security CPU to control the client of the remote file system to initiate a target service execution request to the server of the remote file system according to the target service call request, so that the server of the remote file system receives After the target service executes the request, the target service is executed on the storage module on the general CPU side, and the execution result is sent to the client of the remote file system;
  • Return result module 703 configured for the security CPU to return the execution result received by the client of the remote file system to the general CPU.
  • the client that controls the remote file system initiates a target service execution request to the server of the remote file system, so that the server of the remote file system
  • executing the target service on the storage module on the general CPU side includes: controlling the client of the remote file system to send the operation interface corresponding to the target service to the server of the remote file system. information, so that the server of the remote file system receives the operation interface information and then performs the target service on the storage module on the general CPU side.
  • the operation interface information includes an operation interface ID.
  • the server of the remote file system executes the target on the storage module on the general CPU side.
  • the service includes: after receiving the operation interface information, the server of the remote file system calls the corresponding operation interface according to the operation interface ID to execute the target service on the storage module on the general CPU side.
  • calling the corresponding operation interface according to the operation interface ID to perform the target service on the storage module on the general CPU side includes: judging the remote operation interface according to the operation interface ID. Whether there is an operation interface corresponding to the operation interface ID on the server side of the file system; if so, call the operation interface corresponding to the operation interface ID to perform the target service on the storage module on the general CPU side; if not, return Execute error results to the client of the remote file.
  • the method before the client of the remote file system initiates a target service execution request to the server of the remote file system, the method further includes: encoding the target service execution request based on the RPMsg protocol.
  • the server of the remote file After the server of the remote file receives the target service execution request, it also includes: decoding the target service execution request based on the RPMsg protocol; and sending the execution result to the client of the remote file system.
  • it also includes: encoding the execution result based on the RPMsg protocol; after the client of the remote file system receives the execution result, it also includes: decoding the execution result based on the RPMsg protocol.
  • the communication device for dual CPUs in a POS machine provided in the second aspect of the embodiment of the present application is a modular device based on the communication method of dual CPUs in a POS machine provided by the first aspect.
  • the first aspect content of the method embodiment described.
  • the third aspect of the embodiment of the present application provides a communication system, including a memory 81, a processor 80, and a computer stored in the memory 81 and capable of running on the processor 80.
  • the computer program 82 is executed by the processor 80 to implement the steps of the method described in any one of the first aspects.
  • the processor 80 executes the computer program 82, it implements the functions of each module in the above device embodiments.
  • the fourth aspect of the embodiments of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program is executed by a processor, the method according to any one of the first aspects is implemented. A step of.
  • Module completion means dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above.
  • Each functional unit and module in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be hardware-based. It can also be implemented in the form of software functional units.
  • the specific names of each functional unit and module are only for the convenience of distinguishing each other and are not used to limit the scope of protection of the present application.
  • For the specific working processes of the units and modules in the above system please refer to the corresponding processes in the foregoing method embodiments, and will not be described again here.
  • the disclosed apparatus/terminal equipment and methods can be implemented in other ways.
  • the device/terminal equipment embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components can be combined or can be integrated into another system, or some features can be omitted, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by using computer program instructions related to hardware.
  • the computer program can be stored in a computer-readable storage medium.
  • the computer program When executed by a processor, the steps of each of the above method embodiments may be implemented.
  • the computer program includes computer program code, which may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, Magnetic disks, optical disks, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunications signals
  • software distribution media etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computer And Data Communications (AREA)
  • Hardware Redundancy (AREA)

Abstract

本申请属于POS机技术领域,尤其涉及POS机中双CPU的通信方法、装置、系统及介质,方法包括:安全CPU接收通用CPU发起的目标服务调用请求;所述安全CPU根据所述目标服务调用请求,控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,并将执行结果发送至所述远程文件系统的客户端;所述安全CPU将所述远程文件系统的客户端接收的所述执行结果返回至所述通用CPU。本申请实现安全CPU共用通用CPU侧的存储模块,节省了双CPU的系统成本;采用远程文件系统的通信机制,提高了数据交互效率。

Description

POS机中双CPU的通信方法、装置、系统及介质
本申请要求于2022年08月26日在中国专利局提交的、申请号为202211030622.X、发明名称为“POS机中双CPU的通信方法、装置、系统及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于POS机技术领域,尤其涉及POS机中双CPU的通信方法、装置、系统及介质。
背景技术
POS机由最初的单CPU架构慢慢演变成使用越来越多的双CPU架构,双CPU架构包括通用CPU和安全CPU,两个CPU相互独立,运行着各自的系统,需要双CPU之间相互协作才能完成POS机的特定功能,这就涉及到双CPU的通讯交互。传统的通用CPU和安全CPU之间的通讯技术主要采用uart协议的串口通信,这种串口通信的方式速度慢、数据交互效率低;而且传统的通用CPU侧和安全CPU侧都有提供数据访问和存储空间的存储模块(flash存储),导致双CPU的成本相应增加。
技术问题
有鉴于此,本申请实施例提供了一种POS机中双CPU的通信方法、装置、系统及介质,以解决现有技术中双CPU通信效率低、成本高问题。
技术解决方案
本申请实施例的第一方面提供了一种POS机中双CPU的通信方法,包括:
安全CPU接收通用CPU发起的目标服务调用请求;
所述安全CPU根据所述目标服务调用请求,控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,并将执行结果发送至所述远程文件系统的客户端;
所述安全CPU将所述远程文件系统的客户端接收的所述执行结果返回至所述通用CPU。
结合第一方面,在第一方面的第一种可能实现方式中,所述控制远程文件 系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,包括:控制所述远程文件系统的客户端向所述远程文件系统的服务端发送所述目标服务对应的操作接口信息,以使所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务。
结合第一方面的第一种可能实现方式,在第一方面的第二种可能实现方式中,所述操作接口信息包括操作接口ID,所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务,包括:所述远程文件系统的服务端接收所述操作接口信息后,根据所述操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务。
结合第一方面的第二种可能实现方式,在第一方面的第三种可能实现方式中,所述根据操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务,包括:根据所述操作接口ID判断所述远程文件系统的服务端是否存在所述操作接口ID对应的操作接口;若是,则调用所述操作接口ID对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务;若否,则返回执行错误结果至所述远程文件的客户端。
结合第一方面,在第一方面的第四种可能实现方式中,在所述远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求之前,还包括:基于RPMsg协议对所述目标服务执行请求进行编码;
在所述远程文件的服务端接收所述目标服务执行请求之后,还包括:基于RPMsg协议对所述目标服务执行请求进行解码;
在所述将执行结果发送至所述远程文件系统的客户端之前,还包括:基于 RPMsg协议对所述执行结果进行编码;
在所述远程文件系统的客户端接收所述执行结果之后,还包括:基于RPMsg协议对所述执行结果进行解码。
本申请实施例的第二方面提供了一种POS机中双CPU的通信装置,包括:调用请求模块,用于安全CPU接收通用CPU发起的目标服务调用请求;执行服务模块,用于所述安全CPU根据所述目标服务调用请求,控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,并将执行结果发送至所述远程文件系统的客户端;返回结果模块,用于所述安全CPU将所述远程文件系统的客户端接收的所述执行结果返回至所述通用CPU。
结合第二方面,在第二方面的第一种可能实现方式中,所述控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,包括:控制所述远程文件系统的客户端向所述远程文件系统的服务端发送所述目标服务对应的操作接口信息,以使所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务。
结合第二方面,在第二方面的第二种可能实现方式中,所述操作接口信息包括操作接口ID,所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务,包括:所述远程文件系统的服务端接收所述操作接口信息后,根据所述操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务。
本申请实施例的第三方面提供了一种通信系统,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面任一项所述方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面任一项所述方法的步骤。
有益效果
本申请与现有技术相比存在的有益效果是:本申请安全CPU通过远程文件系统的客户端和远程文件系统的服务端实现了对通用CPU的访存操作,在安全CPU无存储能力的情况下,安全CPU能够共用通用CPU侧的存储模块,相比于现有的双CPU都有存储模块,节省了POS机双CPU的系统成本;本申请采用远程文件系统的通信机制,相比于现有双CPU采用的串口通信方式,加快了通信速率,提高了数据交互效率。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的现有双CPU通信架构示意图;
图2是本申请实施例提供的一种POS机中双CPU的通信方法的实现流程示意图;
图3是本申请实施例提供的双CPU通信架构示意图;
图4是本申请实施例提供的远程文件系统架构示意图;
图5是本申请实施例提供的文件系统挂载流程示意图;
图6是本申请实施例提供的文件读写操作流程示意图;
图7是本申请实施例提供的一种POS机中双CPU的通信装置的示意图;
图8是本申请实施例提供的一种通信系统的示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
POS(Point Of Sale,支付终端)一般采用的是非安全系统,为了满足支付行业的安全要求,目前采用增加一颗安全CPU的方案来保证重要数据的安全,其中,POS机中的通用CPU运行核心系统,安全CPU运行支付相关业务,比如卡处理、PIN处理、密钥管理等。因为通用CPU和安全CPU是独立运行的,所以两者必须相互协作,才能完成POS机的特定功能,这就涉及到通用CPU和安全CPU的通讯问题,因此如何保证通用CPU和安全CPU之间安全稳定的通信,成为智能POS的关键技术。
如图1所示,传统的通用CPU和安全CPU两侧均设有uart(串口),两者通过串口进行通信,这种串口通信方式速率慢,数据交互效率低;而且传统的通用CPU和安全CPU两侧均设有存储模块(flash存储),会导致POS机的双CPU系统成本增加。因此在实际项目中,出于对POS机双CPU架构、成本的考虑,可以选用无串口通信引脚和无存储模块的安全CPU,然而传统的串口通信技术已经不适用于这种无存储模块的安全CPU与通用CPU之间的通信了,亟需一种新的通信方式来保证双CPU之间的通信交互。
基于现有技术存在的问题,本申请实施例提出了一种POS机中双CPU的 通信方法、装置、系统及介质,采用远程文件系统(remotefs,remote file system),通过在远程文件系统的客户端和远程文件系统的服务端之间通信交互,实现了安全CPU对通用CPU的访存操作,在安全CPU无存储能力的情况下,安全CPU能够共用通用CPU侧的存储模块,相比于现有的双CPU都有存储模块,本申请节省了双CPU的系统成本;并且相比于现有的双CPU的串口通信方式,本申请的通信方式加快了通信速率,提高了数据交互效率。
如图2所示,本申请实施例的第一方面提供了一种POS机中双CPU的通信方法,包括以下步骤:
S201、安全CPU接收通用CPU发起的目标服务调用请求;
POS上电后,安全CPU发送网络消息至通用CPU,安全CPU连接上通用CPU,以便于后续的服务执行,安全CPU和通用CPU的网络传输方式包括但不仅限于IPC协议传输方式。由于安全CPU涉及的是重要数据相关的支付安全业务,在实际支付操作中,通用CPU请求安全CPU执行相应的支付服务功能,安全CPU会访问对应的服务数据,但是由于安全CPU侧没有存储模块,因此本申请实施例采用安全CPU与通用CPU共用一个存储模块的方式,实现安全CPU的服务数据可以存储在通用CPU侧的存储模块中,安全CPU通过对通用CPU侧的存储模块进行文件读写等数据操作,达到和在安全CPU本地操作一样的效果。
如图3所示,本申请实施例发明了一种全新的POS机中双CPU的通信架构,架构主要包括通用CPU、安全CPU、远程文件系统的客户端和服务端,其中,远程文件系统的客户端部署在安全CPU中,远程文件系统的服务端部署在通用CPU中,通用CPU和安全CPU基于RPMsg(Remote Processor Messaging,是一种基于virtio的消息传递总线,允许内核驱动程序与系统上可 用的远程处理器进行通信)协议连接传输,远程文件系统的服务端与远程文件系统的客户端基于RPMsg协议连接传输。在异构多处理系统中的主-从(Master-Slave)结构中,主-从的系统通过IPC(Inter Processor Communication)方式进行通信,而RPMsg就是IPC中的一种。对于非通用的操作系统,很可能是没有搭载传统的TCP/IP协议栈的,因此,当通用CPU想要通过RPC的方式调用安全CPU上的服务的时候,便不能使用一般的RPC框架所采用的网络通信方式,因此本申请采用的是RPMsg这种专门用于核间通信的通信协议。
基于POS机中双CPU的通信架构,对POS机中双CPU的通信方法进行逐步说明,其中,在步骤S201中,当通用CPU请求安全CPU执行相应的支付服务功能时,通用CPU会发起一个目标服务调用请求到安全CPU,安全CPU接收目标服务调用请求,触发其访问支付服务功能对应的服务数据,也即是对通用CPU侧的存储模块执行目标服务,完成POS机相应的支付服务功能。应当注意的是,本申请实施例的支付服务功能指的是实际支付操作中的支付行为,目标服务指的是安全CPU对通用CPU侧的存储模块执行相应的目标服务。
步骤S202、所述安全CPU根据所述目标服务调用请求,控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,并将执行结果发送至所述远程文件系统的客户端;
步骤S203、所述安全CPU将所述远程文件系统的客户端接收的所述执行结果返回至所述通用CPU。
在步骤S202和步骤S203中,POS机中双CPU的通信方法的整体过程为:当安全CPU接收到通用CPU发起的目标服务调用请求后,安全CPU根据目标服务调用请求控制远程文件系统的客户端向服务端发起一个目标服务执行 请求;服务端接收到目标服务执行请求后,执行对通用CPU侧的存储模块的目标服务,并将执行结果返回至客户端;客户端将接收到的执行结果发送至安全CPU;安全CPU将执行结果返回至通用CPU。
作为本申请实施例的一种优选实施方式,步骤S202具体包括:控制所述远程文件系统的客户端向所述远程文件系统的服务端发送所述目标服务对应的操作接口信息,以使所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务。
进一步地,所述操作接口信息包括操作接口ID,所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务,包括:所述远程文件系统的服务端接收所述操作接口信息后,根据所述操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务。
进一步地,所述根据操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务,包括:根据所述操作接口ID判断所述远程文件系统的服务端是否存在所述操作接口ID对应的操作接口;若是,则调用所述操作接口ID对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务;若否,则返回执行错误结果至所述远程文件的客户端。
作为本申请实施例的一种优选实施方式,在所述远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求之前,还包括:基于RPMsg协议对所述目标服务执行请求进行编码;在所述远程文件的服务端接收所述目标服务执行请求之后,还包括:基于RPMsg协议对所述目标服务执行请求进行解码;在所述将执行结果发送至所述远程文件系统的客户端之前,还包括:基于RPMsg协议对所述执行结果进行编码;在所述远程文件系统的客户端接 收所述执行结果之后,还包括:基于RPMsg协议对所述执行结果进行解码。
结合上述通信方法,对远程文件系统的架构和原理进行说明,如图4所示为远程文件系统架构图,远程文件系统的客户端和服务端均有协议编解码器,能够进行RPMsg协议格式传输的编解码功能。在远程文件系统的客户端:当安全CPU接收通用CPU发起的目标服务调用请求后,安全CPU运行远程文件系统的客户端,客户端的协议编解码器将目标服务对应的操作接口信息(操作接口ID、参数等信息)进行组装、编码为能够进行RPMsg协议格式传输的消息,发送到远程文件系统的服务端;
在远程文件系统的服务端:通用CPU运行远程文件系统的服务端,服务端的协议编解码器接收客户端发送的RPMsg协议格式传输的消息,进行解码后得到操作接口信息,根据操作接口信息中的操作接口ID查找远程文件系统的服务端是否存在对应的操作接口,如果存在对应的操作接口,则调用本地服务对通用CPU侧的存储模块执行目标服务,并将执行结果返回给服务端的协议编解码器,进行编码后发送给客户端;如果不存在对应的操作接口,则将执行错误结果返回给服务端的协议编解码器,进行编码后向客户端返回执行错误结果。
通过远程文件系统机制可以实现安全CPU和通用CPU共用一个存储模块,安全CPU通过远程文件系统的客户端和服务端实现对通用CPU侧的存储模块执行目标服务,其中,目标服务可以为文件系统的挂载与卸载、目录创建与删除、文件的创建、读写等操作。示例性地,本申请实施例结合上述通信方法,选取文件系统的挂载流程和文件读写流程两个目标服务进行具体说明:
如图5所示,为文件系统挂载流程示意图,远程文件系统的客户端调用文件系统挂载的操作接口,将操作接口相关的操作接口ID、参数等操作接口信 息进行编码,基于RPMsg协议发送至远程文件系统的服务端;服务端接收并解码出操作接口信息,根据操作接口ID查找文件系统挂载对应的操作接口,如果存在文件系统挂载对应的操作接口,则调用文件系统挂载的操作接口对通用CPU侧的存储模块执行文件系统挂载操作,基于RPMsg协议将执行结果编码后返回至远程文件系统的客户端,(如果不存在文件系统挂载对应的操作接口,则基于RPMsg协议将执行错误结果编码后返回至远程文件系统的客户端);客户端接收到执行结果(或执行错误结果),完成文件系统挂载的操作。
如图6所示,为文件读写流程示意图,远程文件系统的客户端调用文件读写的操作接口,将操作接口相关的操作接口ID、参数等操作接口信息进行编码,基于RPMsg协议发送至远程文件系统的服务端;服务端接收并解码出操作接口信息,根据操作接口ID查找文件读写对应的操作接口,如果存在文件读写对应的操作接口,则调用文件读写的操作接口对通用CPU侧的存储模块执行文件读写操作,基于RPMsg协议将执行结果(实际读到内容及长度或写入文件长度)编码后返回至远程文件系统的客户端,(如果不存在文件读写对应的操作接口,则基于RPMsg协议将执行错误结果编码后返回至远程文件系统的客户端);客户端接收到执行结果(或执行错误结果),完成文件读写的操作,并将执行结果通过安全CPU返回给通用CPU。
另外地,本申请实施例的远程文件系统提供以下的基本功能(相当于目标服务)包括:
access:访问文件是否存在;
open:打开文件;
write:写文件;
read:读文件;
close:关闭文件;
lseek:查找指定位置;
mkdir:创建目录;
opendir:打开某个目录;
readdir:读取目录;
closedir:关闭目录;
mount:挂载文件系统;
unlink:删除文件目录项,并减少它的连接数;
stat:获取文件信息;
truncate:修改文件大小;
rename:文件重命名;
statvfs:获取文件系统统计信息。
另外地,远程文件系统基于RPMsg协议传输的协议内容包括客户端发起的请求消息和服务端返回的应答消息,具体地,请求消息的协议内容如表1所示,应答消息的协议内容如表2所示:
表1

表2

应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
如图7所示,本申请实施例的第二方面提供了一种POS机中双CPU的通信装置,包括:
调用请求模块701,用于安全CPU接收通用CPU发起的目标服务调用请求;
执行服务模块702,用于所述安全CPU根据所述目标服务调用请求,控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,并将执行结果发送至所述远程文件系统的客户端;
返回结果模块703,用于所述安全CPU将所述远程文件系统的客户端接收的所述执行结果返回至所述通用CPU。
作为本申请实施例的一种优选实施方式,执行服务模块702中,所述控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,包括:控制所述远程文件系统的客户端向所述远程文件系统的服务端发送所述目标服务对应的操作接口信息,以使所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务。
作为本申请实施例的一种优选实施方式,所述操作接口信息包括操作接口ID,所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务,包括:所述远程文件系统的服务端接收所述操作接口信息后,根据所述操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务。
作为本申请实施例的一种优选实施方式,所述根据操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务,包括:根据所述操作接口ID判断所述远程文件系统的服务端是否存在所述操作接口ID对应的操作接口;若是,则调用所述操作接口ID对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务;若否,则返回执行错误结果至所述远程文件的客户端。
作为本申请实施例的一种优选实施方式,在所述远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求之前,还包括:基于RPMsg协议对所述目标服务执行请求进行编码;在所述远程文件的服务端接收所述目标服务执行请求之后,还包括:基于RPMsg协议对所述目标服务执行请求进行解码;在所述将执行结果发送至所述远程文件系统的客户端之前,还包括:基于RPMsg协议对所述执行结果进行编码;在所述远程文件系统的客户端接收所述执行结果之后,还包括:基于RPMsg协议对所述执行结果进行解码。
可以理解的是,本申请实施例第二方面提供的POS机中双CPU的通信装置是第一方面提供的POS机中双CPU的通信方法模块化的装置,具体的原理可参照第一方面所述的方法实施例的内容。
如图8所示,本申请实施例的第三方面提供了一种通信系统,包括存储器81、处理器80以及存储在所述存储器81中并可在所述处理器80上运行的计 算机程序82,所述处理器80执行所述计算机程序82时实现如第一方面任一项所述方法的步骤。或者,所述处理器80执行所述计算机程序82时实现上述各装置实施例中各模块的功能。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面任一项所述方法的步骤。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、 磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (10)

  1. 一种POS机中双CPU的通信方法,其特征在于,包括:
    安全CPU接收通用CPU发起的目标服务调用请求;
    所述安全CPU根据所述目标服务调用请求,控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,并将执行结果发送至所述远程文件系统的客户端;
    所述安全CPU将所述远程文件系统的客户端接收的所述执行结果返回至所述通用CPU。
  2. 根据权利要求1所述的一种POS机中双CPU的通信方法,其特征在于,
    所述控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,包括:
    控制所述远程文件系统的客户端向所述远程文件系统的服务端发送所述目标服务对应的操作接口信息,以使所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务。
  3. 根据权利要求2所述的一种POS机中双CPU的通信方法,其特征在于,
    所述操作接口信息包括操作接口ID,
    所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务,包括:
    所述远程文件系统的服务端接收所述操作接口信息后,根据所述操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务。
  4. 根据权利要求3所述的一种POS机中双CPU的通信方法,其特征在于,
    所述根据操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务,包括:
    根据所述操作接口ID判断所述远程文件系统的服务端是否存在所述操作接口ID对应的操作接口;
    若是,则调用所述操作接口ID对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务;若否,则返回执行错误结果至所述远程文件的客户端。
  5. 根据权利要求1所述的一种POS机中双CPU的通信方法,其特征在于,
    在所述远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求之前,还包括:基于RPMsg协议对所述目标服务执行请求进行编码;
    在所述远程文件的服务端接收所述目标服务执行请求之后,还包括:基于RPMsg协议对所述目标服务执行请求进行解码;
    在所述将执行结果发送至所述远程文件系统的客户端之前,还包括:基于RPMsg协议对所述执行结果进行编码;
    在所述远程文件系统的客户端接收所述执行结果之后,还包括:基于RPMsg协议对所述执行结果进行解码。
  6. 一种POS机中双CPU的通信装置,其特征在于,包括:
    调用请求模块,用于安全CPU接收通用CPU发起的目标服务调用请求;
    执行服务模块,用于所述安全CPU根据所述目标服务调用请求,控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,并将执行结果发送至所述远程文件系统的客户端;
    返回结果模块,用于所述安全CPU将所述远程文件系统的客户端接收的所述执行结果返回至所述通用CPU。
  7. 根据权利要求6所述的一种POS机中双CPU的通信装置,其特征在于,所述控制远程文件系统的客户端向远程文件系统的服务端发起目标服务执行请求,以使所述远程文件系统的服务端接收所述目标服务执行请求后对所述通用CPU侧的存储模块执行目标服务,包括:
    控制所述远程文件系统的客户端向所述远程文件系统的服务端发送所述目标服务对应的操作接口信息,以使所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务。
  8. 根据权利要求7所述的一种POS机中双CPU的通信装置,其特征在于,所述操作接口信息包括操作接口ID,
    所述远程文件系统的服务端接收所述操作接口信息后对所述通用CPU侧的存储模块执行所述目标服务,包括:
    所述远程文件系统的服务端接收所述操作接口信息后,根据所述操作接口ID调用对应的操作接口对所述通用CPU侧的存储模块执行所述目标服务。
  9. 一种通信系统,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至5任一项所述方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述方法的步骤。
PCT/CN2023/109680 2022-08-26 2023-07-27 Pos机中双cpu的通信方法、装置、系统及介质 WO2024041304A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211030622.X 2022-08-26
CN202211030622.XA CN115470172A (zh) 2022-08-26 2022-08-26 Pos机中双cpu的通信方法、装置、系统及介质

Publications (1)

Publication Number Publication Date
WO2024041304A1 true WO2024041304A1 (zh) 2024-02-29

Family

ID=84369773

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/109680 WO2024041304A1 (zh) 2022-08-26 2023-07-27 Pos机中双cpu的通信方法、装置、系统及介质

Country Status (2)

Country Link
CN (1) CN115470172A (zh)
WO (1) WO2024041304A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470172A (zh) * 2022-08-26 2022-12-13 百富计算机技术(深圳)有限公司 Pos机中双cpu的通信方法、装置、系统及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102859963A (zh) * 2010-04-19 2013-01-02 苹果公司 从非本地存储器安全地引导和配置子系统
CN105007329A (zh) * 2015-07-31 2015-10-28 中国航空无线电电子研究所 一种基于PCIe的网络共享存储系统及其存储方法
CN105302489A (zh) * 2015-10-30 2016-02-03 致象尔微电子科技(上海)有限公司 一种异构多核远程嵌入式存储器系统与方法
CN115470172A (zh) * 2022-08-26 2022-12-13 百富计算机技术(深圳)有限公司 Pos机中双cpu的通信方法、装置、系统及介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102859963A (zh) * 2010-04-19 2013-01-02 苹果公司 从非本地存储器安全地引导和配置子系统
CN105007329A (zh) * 2015-07-31 2015-10-28 中国航空无线电电子研究所 一种基于PCIe的网络共享存储系统及其存储方法
CN105302489A (zh) * 2015-10-30 2016-02-03 致象尔微电子科技(上海)有限公司 一种异构多核远程嵌入式存储器系统与方法
CN115470172A (zh) * 2022-08-26 2022-12-13 百富计算机技术(深圳)有限公司 Pos机中双cpu的通信方法、装置、系统及介质

Also Published As

Publication number Publication date
CN115470172A (zh) 2022-12-13

Similar Documents

Publication Publication Date Title
JP6381801B2 (ja) 格納クライアントファイルシステム用格納ボリュームの動的スケーリング
US9148485B2 (en) Reducing packet size in a communication protocol
WO2024041304A1 (zh) Pos机中双cpu的通信方法、装置、系统及介质
EP1100001A2 (en) Storage system supporting file-level and block-level accesses
US20050097183A1 (en) Generalized addressing scheme for remote direct memory access enabled devices
CN102323894B (zh) 企业分布式应用间实现非阻塞方式相互调用的系统及方法
CN1771495A (zh) 分布式文件服务体系结构系统
CN108989432B (zh) 用户态的文件发送方法、文件接收方法和文件收发装置
CN114201421B (zh) 一种数据流处理方法、存储控制节点及可读存储介质
CN111459632B (zh) 一种供终端应用程序调用的串口代理及实现方法
US20170262214A1 (en) Aggregating memory to create a network addressible storage volume for storing virtual machine files
US20140006541A1 (en) Persistent messaging
WO2015051488A1 (zh) 一种实现聚合虚拟化中内存共享的方法、设备和系统
CN112199309B (zh) 基于dma引擎的数据读取方法、装置和数据传输系统
WO2021164163A1 (zh) 一种请求处理方法、装置、设备及存储介质
WO2023104194A1 (zh) 一种业务处理方法及装置
WO2023000770A1 (zh) 一种处理访问请求的方法、装置、存储设备及存储介质
CN102843435A (zh) 一种在集群系统中存储介质的访问、响应方法和系统
CN111552668B (zh) 一种基于zfs文件系统的高性能跨域复制方法
EP4044015A1 (en) Data processing method and apparatus
CN101931776A (zh) 视频监控中的数据存储系统及数据存储、预览和回放方法
CN107193989B (zh) 一种nas集群缓存处理方法和系统
CN113691465A (zh) 一种数据的传输方法、智能网卡、计算设备及存储介质
WO2023000784A1 (zh) 数据访问方法以及相关设备
WO2024082773A1 (zh) 一种迁移文件系统的方法和相关设备

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: 23856394

Country of ref document: EP

Kind code of ref document: A1