Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
Referring to fig. 1, 3 and 4, an embodiment of the present invention provides a cross-device payment method, which includes the steps of:
connecting and authenticating the slave terminal according to the monitored network connection information issued by the slave terminal;
Selecting and calling a local service or the service of the auxiliary terminal according to the payment demand, and if the service of the auxiliary terminal is selected according to the payment demand, transmitting service operation information to be called to the service of the auxiliary terminal, so that the auxiliary terminal forwards the service operation information to the corresponding service to carry out payment operation;
And receiving a payment result returned by the auxiliary terminal.
As can be seen from the above description, connection and authentication with the secondary terminal are established according to the monitored network connection information issued by the secondary terminal; selecting and calling a local service or a service of the auxiliary terminal according to the payment demand, and transmitting service operation information to be called to the service of the auxiliary terminal when the payment demand is the service of the auxiliary terminal, so that the auxiliary terminal forwards the service operation information to the corresponding service for payment operation; and receiving a payment result returned by the auxiliary terminal. Therefore, the business operation information can be transmitted to another terminal according to the payment requirement, so that a plurality of devices are used for carrying out payment-related operations, the efficiency of multi-person payment is improved, and the use benefit of the devices is improved.
Further, the connecting and authenticating with the secondary terminal according to the monitored network connection information issued by the secondary terminal includes:
Monitoring network connection information broadcasted by a secondary terminal, and establishing network connection with the secondary terminal according to the network connection information;
And acquiring information of the auxiliary terminal according to the network connection established with the auxiliary terminal, and establishing a data transmission channel with the auxiliary terminal after the authentication with the auxiliary terminal is successful.
As can be seen from the above description, the network connection is established with the secondary terminal according to the monitored network connection information broadcast by the secondary terminal, the information of the secondary terminal is acquired in the network connection and terminal authentication is performed, and the data transmission channel is established after the information authentication is successful, so that the security of data transmission is improved through the terminal authentication.
Further, the service for transmitting the service operation information to be invoked to the secondary terminal includes:
and transmitting a request for calling the auxiliary terminal to execute the service, the local equipment information and the service operation information to the service of the auxiliary terminal according to the data transmission channel.
As can be seen from the above description, the request for invoking the secondary terminal to execute the service, the local device information and the service operation information are transmitted to the service of the secondary terminal through the data transmission channel, so that the security of the service request and the operation information transmission thereof is ensured.
Further, the step of enabling the secondary terminal to forward the service operation information to the corresponding service to perform payment operation includes:
And the auxiliary terminal judges whether to execute the business operation information according to the business occupation condition of the terminal, if so, the auxiliary terminal judges whether the business corresponding to the business operation information is a financial business, if so, the auxiliary terminal calls the equipment corresponding to the main control request to execute the business, and if not, the auxiliary terminal directly requests the corresponding equipment to execute the business.
As can be seen from the above description, when the service corresponding to the service operation information in the secondary terminal is a financial service, the master control needs to be used to request the corresponding device to execute the service, so that the security of the payment service is further ensured, and when the service is a non-financial service, the corresponding device is directly requested to execute the service, thereby improving the call flexibility of the service device.
Further, if the local service is selected according to the payment demand, judging whether the service required to be called by the payment demand is a financial service, if so, calling the equipment corresponding to the main control request to execute the service, otherwise, directly requesting the corresponding equipment to execute the service.
As can be seen from the above description, when the service required to be invoked by the payment demand is a financial service, the master control needs to be used to request the corresponding device to execute the service, so as to further ensure the security of the payment service, and when the service is a non-financial service, the service is directly requested to be executed by the corresponding device, thereby improving the invoking flexibility of the service device.
Referring to fig. 2, an embodiment of the present invention provides a cross-device payment terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
connecting and authenticating the slave terminal according to the monitored network connection information issued by the slave terminal;
Selecting and calling a local service or the service of the auxiliary terminal according to the payment demand, and if the service of the auxiliary terminal is selected according to the payment demand, transmitting service operation information to be called to the service of the auxiliary terminal, so that the auxiliary terminal forwards the service operation information to the corresponding service to carry out payment operation;
And receiving a payment result returned by the auxiliary terminal.
As can be seen from the above description, connection and authentication with the secondary terminal are established according to the monitored network connection information issued by the secondary terminal; selecting and calling a local service or a service of the auxiliary terminal according to the payment demand, and transmitting service operation information to be called to the service of the auxiliary terminal when the payment demand is the service of the auxiliary terminal, so that the auxiliary terminal forwards the service operation information to the corresponding service for payment operation; and receiving a payment result returned by the auxiliary terminal. Therefore, the business operation information can be transmitted to another terminal according to the payment requirement, so that a plurality of devices are used for carrying out payment-related operations, the efficiency of multi-person payment is improved, and the use benefit of the devices is improved.
Further, the connecting and authenticating with the secondary terminal according to the monitored network connection information issued by the secondary terminal includes:
Monitoring network connection information broadcasted by a secondary terminal, and establishing network connection with the secondary terminal according to the network connection information;
And acquiring information of the auxiliary terminal according to the network connection established with the auxiliary terminal, and establishing a data transmission channel with the auxiliary terminal after the authentication with the auxiliary terminal is successful.
As can be seen from the above description, the network connection is established with the secondary terminal according to the monitored network connection information broadcast by the secondary terminal, the information of the secondary terminal is acquired in the network connection and terminal authentication is performed, and the data transmission channel is established after the information authentication is successful, so that the security of data transmission is improved through the terminal authentication.
Further, the service for transmitting the service operation information to be invoked to the secondary terminal includes:
and transmitting a request for calling the auxiliary terminal to execute the service, the local equipment information and the service operation information to the service of the auxiliary terminal according to the data transmission channel.
As can be seen from the above description, the request for invoking the secondary terminal to execute the service, the local device information and the service operation information are transmitted to the service of the secondary terminal through the data transmission channel, so that the security of the service request and the operation information transmission thereof is ensured.
Further, the step of enabling the secondary terminal to forward the service operation information to the corresponding service to perform payment operation includes:
And the auxiliary terminal judges whether to execute the business operation information according to the business occupation condition of the terminal, if so, the auxiliary terminal judges whether the business corresponding to the business operation information is a financial business, if so, the auxiliary terminal calls the equipment corresponding to the main control request to execute the business, and if not, the auxiliary terminal directly requests the corresponding equipment to execute the business.
As can be seen from the above description, when the service corresponding to the service operation information in the secondary terminal is a financial service, the master control needs to be used to request the corresponding device to execute the service, so that the security of the payment service is further ensured, and when the service is a non-financial service, the corresponding device is directly requested to execute the service, thereby improving the call flexibility of the service device.
Further, if the local service is selected according to the payment demand, judging whether the service required to be called by the payment demand is a financial service, if so, calling the equipment corresponding to the main control request to execute the service, otherwise, directly requesting the corresponding equipment to execute the service.
As can be seen from the above description, when the service required to be invoked by the payment demand is a financial service, the master control needs to be used to request the corresponding device to execute the service, so as to further ensure the security of the payment service, and when the service is a non-financial service, the service is directly requested to be executed by the corresponding device, thereby improving the invoking flexibility of the service device.
The cross-equipment payment method and the terminal are suitable for cross-equipment payment in a complex multi-person payment scene, can fully play the roles of different equipment, and improve the use benefit of the equipment, and are described by specific implementation modes:
Example 1
Referring to fig. 1, 3 and 4, a cross-device payment method, the execution subject of the method is a terminal, in this embodiment, a terminal 1 corresponds to the execution subject, in this embodiment, a terminal 2 corresponds to the secondary terminal, and the method includes the steps of:
S1, connecting and authenticating the slave terminal according to the monitored network connection information issued by the slave terminal.
S11, monitoring network connection information broadcasted by a secondary terminal, and establishing network connection with the secondary terminal according to the network connection information.
Specifically, in this embodiment, the terminal interconnection service of the terminal 2 reads the wifi IP and the port of the terminal 2, the terminal interconnection service of the terminal 2 issues a service using CoAP protocol, broadcasts the wifi IP information, creates a Tcp Socket session server, and waits to be found and connected.
The terminal interconnection service of the terminal 1 reads the wifi IP and the port of the terminal, and the terminal 1 monitors information issued by the CoAP protocol and connects the IP and the port issued by the terminal 2 after the terminal 2 is found.
And the terminal 1 establishes TCP connection with a socket server session server created by the terminal 2 as a socket client.
The terminal interconnection service utilizes the CoAP networking technology, and the built discovery and data remote transmission channel of the cross-terminal equipment is responsible for transmitting information requested by the remote equipment management service to the remote management service of the other end equipment.
S12, acquiring information of the auxiliary terminal according to the network connection established with the auxiliary terminal, and establishing a data transmission channel with the auxiliary terminal after successful authentication with the auxiliary terminal.
Specifically, in this embodiment, the networking service of the terminal 1 and the terminal 2 acquire terminal information through the above connection, and authenticate the device. Because the cross-end use of the scenes such as order collection is a scene with high security requirements, the consistency of terminal owners needs to be authenticated first to allow the establishment of a cross-end operation channel. The consistency authentication mode of the terminal owner information comprises the following steps: the terminal information includes information of the terminal login user, consistency of terminal owner information (e.g., root certificate information), and the like.
After authentication is passed, the terminal 1 and the terminal 2 establish a CoAP protocol-based data transmission channel.
When a user performs data transmission, the data security level can be transferred into the data transmission interface of the unified network interface according to the data security level, and the data security level in the embodiment is divided into two types: the encrypted data and the general data need to be encrypted in the transmission process, and the general data can be directly transmitted.
For data of encrypted type: an encryption mode is that a PIN code is generated by a terminal 2, the PIN code is input into the terminal 1, a session key is negotiated based on the handshake of the PIN code and a PAKE protocol, and data of an encryption type is encrypted and transmitted through the key. The other encryption mode is to carry out bidirectional asymmetric encryption on the data to be encrypted through public and private keys of corresponding terminal owners preset by the terminal.
S2, selecting and calling local service or service of the auxiliary terminal according to the payment demand, and if the service of the auxiliary terminal is selected according to the payment demand, transmitting service operation information to be called to service of the auxiliary terminal, so that the auxiliary terminal forwards the service operation information to the corresponding service to carry out payment operation.
Specifically, the application program in the terminal 1 calls the micro service SDK through the device discovery, so that whether the required function needs to be executed in the local device module or the cross-terminal device module can be selected; the terminal interconnection service forwards the discovered and authenticated device list to the application program by the device management service and the business micro service, so that a user can select which device to use to execute the remote execution business.
The following are explanations of applications, microservices SDKs, business microservices, and remote device management services:
The application program is a user of the bill collection, printing, code scanning and card swiping payment service, such as a merchant bill collection application, a bank application and the like, decides when to call an interface provided by the micro service SDK to execute the function required by the application service according to the service requirement of the application, and comprises the steps of executing the service by using a local module or executing the service by using a cross-terminal module.
The micro service SDK is an interface service provided by each micro service module for the application, and an application layer can call various functional interfaces provided by the micro service SDK.
The business micro-service is a business implementation layer provided for the user interface function, and can be divided into micro-services of financial module class and non-financial module class according to the class of the processed business and the corresponding hardware module, such as magnetic card service, printing service and the like, for calling financial modules (corresponding to a printer module and a magnetic card module of a terminal), and camera service for calling a camera module of the terminal; the different point is that the finance type module is called specific hardware equipment by micro-service according to business requirement through main control service, and the main control service is unified service for managing finance type equipment module. Instead of the financial class module, the corresponding device module is invoked by the microservice directly using methods provided by the system native.
The remote device management service is implemented by the remote device management service, when the application selects to use the cross-end module to execute the service, the module use request called by the micro service is not directly found out of the local device module. The remote device management service is responsible for managing registration or deregistration of the remote devices, providing of a remote device list, and circulation function of business instruction data.
And if the service of the auxiliary terminal is selected according to the payment requirement, transmitting a request for calling the auxiliary terminal to execute the service, the local equipment information and the service operation information to the service of the auxiliary terminal according to a data transmission channel. And the auxiliary terminal judges whether to execute the business operation information according to the business occupation condition of the terminal, if so, the auxiliary terminal judges whether the business corresponding to the business operation information is a financial business, if so, the auxiliary terminal calls the equipment corresponding to the main control request to execute the business, and if not, the auxiliary terminal directly requests the corresponding equipment to execute the business.
Specifically, when the application calls the remote interface, the service micro-service corresponding to the terminal 1 needs to package the service operation data group such as the method name, the parameter and other information of the calling interface. The Request interface of the remote device management service is invoked to transfer data to the corresponding micro service of the terminal 2.
The device management service of the terminal 1 receives a remote operation request initiated by the service micro-service of the terminal 1, invokes a data forwarding interface provided by the terminal interconnection service, and transmits information such as a remote execution request, a service micro-service ID, a request device module ID, service operation data and the like to the terminal 2 by using the established cross-terminal data transmission channel.
The terminal 2 forwards the received data to a remote device management service of the terminal 2 according to the remote execution request. The remote device management service of the terminal 2 forwards the data to the micro service corresponding to the ID according to the business micro service ID in the data. The data includes remote execution request, device module ID, business operation data.
The terminal 2 business micro-service analyzes the corresponding operation data, and decides whether to execute the operation request sent by the terminal 1 business micro-service according to the local equipment occupation condition, business conflict and other logic processes;
If the terminal 2 executes the remote execution request sent by the terminal 1, the device module execution function corresponding to the master control request is called or the corresponding module execution function is directly called according to whether the remote device management service belongs to the financial device module.
If the terminal 2 needs to remotely execute the asynchronous operation service, the terminal 2 equipment module continues to wait for the asynchronous operation after the operation information is returned, and returns an operation result again through the service micro-service, the equipment management service and the terminal interconnection service layer by layer after the operation is completed; for example, the card searching service, when the card searching function is started by the magnetic card equipment module of the terminal 2, the terminal 1 is informed that the application card searching is started and the magnetic card is waiting to be found; after the notification is completed, the terminal 1 is in an asynchronous card seeking waiting state, and when a magnetic card is found, the terminal is notified again to apply the found magnetic card.
S3, if the local service is selected according to the payment demand, judging whether the service required to be called by the payment demand is a financial service, if so, calling equipment corresponding to the main control request to execute the service, otherwise, directly requesting the corresponding equipment to execute the service.
And S4, receiving a payment result returned by the auxiliary terminal.
Specifically, after executing the remote execution request, the corresponding device module of the terminal 2 returns the execution result or the operation information needing to be interacted through the business micro-service, the device management service and the terminal interconnection service layer by layer.
Example two
Referring to fig. 2, a cross-device payment terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of a cross-device payment method according to the first embodiment when executing the computer program.
In summary, according to the method and the terminal for payment across devices provided by the invention, connection and authentication between the terminal and the terminal are established according to the monitored network connection information issued by the terminal, wherein network connection is established according to the monitored network connection information broadcasted by the terminal and the terminal, the information of the terminal is acquired in the network connection and terminal authentication is performed, and a data transmission channel is established after the information authentication is successful, so that the security of data transmission is improved through the terminal authentication. Selecting and calling a local service or a service of the auxiliary terminal according to the payment demand, and transmitting service operation information to be called to the service of the auxiliary terminal when the payment demand is the service of the auxiliary terminal, so that the auxiliary terminal forwards the service operation information to the corresponding service for payment operation; and receiving a payment result returned by the auxiliary terminal. According to the category of the processed business and the corresponding hardware module, the business can be divided into micro-services of financial module class and micro-services of non-financial module class, such as magnetic card service, printing service and the like, which call financial modules (corresponding to a printer module and a magnetic card module of a terminal), and camera service calls a camera module of the terminal; the different point is that the finance type module is called specific hardware equipment by micro-service according to business requirement through main control service, and the main control service is unified service for managing finance type equipment module. And the micro service directly uses a method provided by the system native to call the corresponding equipment module instead of the financial module, so that the safety of service transmission is ensured. Therefore, the business operation information can be transmitted to another terminal according to the payment requirement, so that a plurality of devices are used for carrying out payment-related operations, the efficiency of multi-person payment is improved, and the use benefit of the devices is improved.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.