Method and system for realizing code scanning payment of electric appliance

文档序号:1392521 发布日期:2020-02-28 浏览:33次 中文

阅读说明:本技术 一种电器实现扫码支付的方法及其系统 (Method and system for realizing code scanning payment of electric appliance ) 是由 杨督 徐位 于 2019-11-25 设计创作,主要内容包括:本发明公开了一种电器实现扫码支付的系统,包括电器设备本体、远程服务器,所述电器设备本体的内部固定连接有支付控制器,所述电器设备本体与支付控制器电性连接,所述电器设备本体的外壁固定设置有二维码,所述二维码与支付控制器相互关联,所述支付控制器与远程服务器通讯连接;本发明在支付控制器与远程服务器的通讯层面,采用了长连接双向通讯的方式,在电器设备使用高峰期提升支付控制器的心跳包的发送与接收频次,以提升掉网监测的能力,保障用户使用效果,降低用户付款后电器设备本体不启动的概率,在电器设备使用的低谷期则可降低心跳包的频次以达到节省流量的目的。(The invention discloses a system for realizing code scanning payment of an electric appliance, which comprises an electric appliance body and a remote server, wherein a payment controller is fixedly connected inside the electric appliance body, the electric appliance body is electrically connected with the payment controller, a two-dimensional code is fixedly arranged on the outer wall of the electric appliance body, the two-dimensional code is correlated with the payment controller, and the payment controller is in communication connection with the remote server; in the communication layer of the payment controller and the remote server, the invention adopts a long-connection bidirectional communication mode, improves the sending and receiving frequency of the heartbeat packet of the payment controller in the peak period of the use of the electrical equipment so as to improve the capability of off-line monitoring, ensures the use effect of a user, reduces the probability that the electrical equipment body is not started after the user pays, and reduces the frequency of the heartbeat packet in the valley period of the use of the electrical equipment so as to achieve the purpose of saving flow.)

1. The utility model provides a system for code payment is swept in electrical apparatus realization, includes electrical equipment body, remote server, its characterized in that: the payment controller is fixedly connected with the inside of the electrical equipment body, the electrical equipment body is electrically connected with the payment controller, the two-dimensional code is fixedly arranged on the outer wall of the electrical equipment body, the two-dimensional code is associated with the payment controller, and the payment controller is in communication connection with the remote server.

2. The system for realizing code scanning payment of the electric appliance according to claim 1, wherein: the remote server comprises a processing module, a storage module and a communication module, a websocket framework is adopted in the framework of the remote server, loads can be unified, the access and exit can be balanced, the bottom layer adopts a distributed layout, and the sub-loads can be built according to the equipment scale and the application use frequency.

3. The system for realizing code scanning payment of the electric appliance according to claim 1, wherein: the payment controller comprises a circuit board, wherein the circuit board is provided with an antenna interface, a serial port output interface, two pulse output interfaces, a power supply input interface, a GSM module, a SIM card slot, a power lamp, a signal lamp and a communication lamp, and the antenna interface is connected with an antenna through thread matching.

4. The system for realizing code scanning payment of the electric appliance according to claim 1, wherein: the communication mode between the payment controller and the remote server is long-connection two-way communication, the device can be kept on line all the time, the monitoring function of network drop can be achieved, and the heartbeat packet of the payment controller and the remote server has the function of automatically adjusting the frequency of the heartbeat packet in a data learning mode.

5. A method for realizing code scanning payment of an electric appliance is characterized in that: the method comprises the following steps:

s1, after a power supply is connected, a payment controller sequentially carries out self-checking, networking, link establishment and data pre-communication with a remote server, so that a communication link is successfully established between the payment controller and the remote server;

s2, the payment controller performs pre-communication with the electrical equipment body according to a preset program so as to collect state information of the electrical equipment body, then the payment controller reports the collected information to a remote server, and the remote server modifies the online state of the electrical equipment body through the received information;

s3, the terminal user scans the two-dimensional code on the outer wall of the electrical equipment body through the corresponding third-party payment APP installed on the mobile phone to obtain the state information of the equipment and pay certain use cost;

s4, after payment is completed, a third party payment company feeds payment information of a user back to a remote server in an asynchronous callback mode, the remote server records and modifies the online state of the electric equipment body after receiving correct payment information, and sends an instruction to a payment controller through a websocket service, and the payment controller forwards the instruction to the electric equipment body;

s5, the electrical equipment body receives the instruction and then processes the instruction, and equipment operation information is fed back to the remote processor through the payment controller;

s6, during the operation of the electric appliance body, the payment controller collects operation information of the electric appliance body every N seconds and reports the information to the remote server, when the electric appliance body finishes operation, the payment controller controls the electric appliance body to be shut down and reports a standby state to the remote server after the electric appliance body confirms shutdown, and after the remote server receives a shutdown and normal standby instruction, the on-line state of the electric appliance body is modified and the electric appliance body enters a state of waiting for code scanning payment again;

s7, if the system sets money distribution or related charging standards for the machine in advance, the code scanning amount is distributed to each user participating in money distribution, and a pre-set pre-deduction part is deducted before money distribution, so that the system completes a complete work flow.

6. The method for realizing code scanning payment of the electric appliance according to claim 5, wherein the method comprises the following steps: the online state of the electrical equipment body in S2 is divided into three types, that is, "usable", "maintenance in use", and "in use", and the electrical equipment body accepts online payment if and only if it is in the "usable" state.

7. The method for realizing code scanning payment of the electric appliance according to claim 5, wherein the method comprises the following steps: in S4, the instruction forwarded by the payment controller to the electrical equipment body includes information such as payment characteristic information of the user, duration of service purchase, number of service purchase, and the like.

8. The method for realizing code scanning payment of the electric appliance according to claim 5, wherein the method comprises the following steps: if a large number of users scan codes at the same time, accurate and quick issuing is ensured according to a link characteristic code mechanism of the system; if a large number of orders complete the work at the same time and money is required to be divided, the system creates a plurality of money dividing processes according to the number of the money to be divided, and queues of all the orders are processed, so that each money is divided into accurate money.

Technical Field

The invention relates to a code scanning payment system, in particular to a method and a system for realizing code scanning payment of an electric appliance.

Background

At present, shared equipment in the market is various, such as a shared bicycle, a shared massage chair, a shared tissue machine and the like, and the purpose of interaction between equipment networking and a server is achieved by adding a communication control panel capable of networking into a traditional electric appliance. The method can meet the sharing of single equipment, but can not realize generalization, and has the following problems: 1. the sharing management of multiple types of equipment cannot be realized; 2. low-cost large-scale deployment cannot be realized, and the like. The reason is as follows: 1. the communication between the devices and the servers mostly adopts a polling mode, which generates high server cost for each level of the number of the devices and cannot achieve the purpose of monitoring the online of the machine in real time. 2. The intelligent analysis is not carried out to data to the equipment of the mode that partly adopts equipment and server to be connected for a long time, and the condition that equipment payment does not start can be increased in the time of the peak period to the form of unified heartbeat package, and at this kind of low ebb period at midnight, the equipment flow cost of increase.

Disclosure of Invention

The invention aims to provide a method and a system for realizing code scanning payment of an electric appliance, which aim to solve the problems in the background technology.

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

the utility model provides a system for code payment is swept in electrical apparatus realization, includes electrical equipment body, remote server, the inside fixedly connected with payment controller of electrical equipment body, electrical equipment body and payment controller electric connection, the outer wall of electrical equipment body is fixed and is provided with the two-dimensional code, two-dimensional code and payment controller correlation each other, the payment controller is connected with the remote server communication.

As a further scheme of the invention: the remote server comprises a processing module, a storage module and a communication module, a websocket framework is adopted in the framework of the remote server, loads can be unified, the access and exit can be balanced, the bottom layer adopts a distributed layout, and the sub-loads can be built according to the equipment scale and the application use frequency.

As a further scheme of the invention: the payment controller comprises a circuit board, wherein the circuit board is provided with an antenna interface, a serial port output interface, two pulse output interfaces, a power supply input interface, a GSM module, a SIM card slot, a power lamp, a signal lamp and a communication lamp, and the antenna interface is connected with an antenna through thread matching.

As a still further scheme of the invention: the communication mode between the payment controller and the remote server is long-connection two-way communication, the device can be kept on line all the time, the monitoring function of network drop can be achieved, and the heartbeat packet of the payment controller and the remote server has the function of automatically adjusting the frequency of the heartbeat packet in a data learning mode.

A method for realizing code scanning payment of an electric appliance comprises the following steps:

s1, after a power supply is connected, a payment controller sequentially carries out self-checking, networking, link establishment and data pre-communication with a remote server, so that a communication link is successfully established between the payment controller and the remote server;

s2, the payment controller performs pre-communication with the electrical equipment body according to a preset program so as to collect state information of the electrical equipment body, then the payment controller reports the collected information to a remote server, and the remote server modifies the online state of the electrical equipment body through the received information;

s3, the terminal user scans the two-dimensional code on the outer wall of the electrical equipment body through the corresponding third-party payment APP installed on the mobile phone to obtain the state information of the equipment and pay certain use cost;

s4, after payment is completed, a third party payment company feeds payment information of a user back to a remote server in an asynchronous callback mode, the remote server records and modifies the online state of the electric equipment body after receiving correct payment information, and sends an instruction to a payment controller through a websocket service, and the payment controller forwards the instruction to the electric equipment body;

s5, the electrical equipment body receives the instruction and then processes the instruction, and equipment operation information is fed back to the remote processor through the payment controller;

s6, during the operation of the electric appliance body, the payment controller collects operation information of the electric appliance body every N seconds and reports the information to the remote server, when the electric appliance body finishes operation, the payment controller controls the electric appliance body to be shut down and reports a standby state to the remote server after the electric appliance body confirms shutdown, and after the remote server receives a shutdown and normal standby instruction, the on-line state of the electric appliance body is modified and the electric appliance body enters a state of waiting for code scanning payment again;

s7, if the system sets money distribution or related charging standards for the machine in advance, the code scanning amount is distributed to each user participating in money distribution, and a pre-set pre-deduction part is deducted before money distribution, so that the system completes a complete work flow.

As a further scheme of the invention: the online state of the electrical equipment body in S2 is divided into three types, that is, "usable", "maintenance in use", and "in use", and the electrical equipment body accepts online payment if and only if it is in the "usable" state.

As a further scheme of the invention: in S4, the instruction forwarded by the payment controller to the electrical equipment body includes information such as payment characteristic information of the user, duration of service purchase, number of service purchase, and the like.

As a still further scheme of the invention: if a large number of users scan codes at the same time, accurate and quick issuing is ensured according to a link characteristic code mechanism of the system; if a large number of orders complete the work at the same time and money is required to be divided, the system creates a plurality of money dividing processes according to the number of the money to be divided, and queues of all the orders are processed, so that each money is divided into accurate money.

Compared with the prior art, the invention has the beneficial effects that:

1. the invention integrates the common code scanning payment communication control modes, effectively improves the compatibility of the payment controller, and ensures that the payment controller can be suitable for various electrical equipment supporting different control modes, thereby reducing the stock cost of enterprises, improving the utilization rate of single products, ensuring that the enterprises can realize the assembly and production of new shared equipment in factories on the basis of general products, and also can flexibly use the communication control panel for transforming the secondary equipment without manufacturing the control panel with a specific communication mode, thereby reducing the cost.

2. In the communication layer of the payment controller and the remote server, a long-connection bidirectional communication mode is adopted, the system records the use conditions of different electrical equipment bodies corresponding to different putting places and draws a curve of the use frequency of the electrical equipment bodies, so that the use peak period and the use valley period in a certain time range are judged; the sending and receiving frequency of the heartbeat packet of the payment controller is improved in the peak period of the use of the electrical equipment, so that the capacity of off-line monitoring is improved, the using effect of a user is guaranteed, the probability that the electrical equipment body is not started after the user pays is reduced, and the frequency of the heartbeat packet can be reduced in the valley period of the use of the electrical equipment so as to achieve the purpose of saving flow.

3. In the management software layer of the remote server, the invention adopts a uniform flow access mechanism, the upper application is developed in a modularization way, the server cluster is managed in a distributed way, and server resources with different configurations are purchased to process the corresponding program functions, thereby achieving the purpose of saving the server cost.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In the embodiment of the invention, the system for realizing code scanning payment of the electrical appliance comprises an electrical appliance body and a remote server, wherein a payment controller is fixedly connected inside the electrical appliance body, the electrical appliance body is electrically connected with the payment controller, a two-dimensional code is fixedly arranged on the outer wall of the electrical appliance body, the two-dimensional code is mutually associated with the payment controller, and the payment controller is in communication connection with the remote server.

The remote server comprises a processing module, a storage module and a communication module, a websocket framework is adopted in the framework of the remote server, loads can be unified, the access and exit can be balanced, the bottom layer is distributed, and the sub-loads can be built according to the scale of equipment and the use frequency of applications.

The payment controller comprises a circuit board, wherein the circuit board is provided with an antenna interface, a serial port output interface, two pulse output interfaces, a power supply input interface, a GSM module, a SIM card slot, a power lamp, a signal lamp and a communication lamp, and the antenna interface is connected with an antenna in a matched mode through threads.

The communication mode between the payment controller and the remote server is long-connection two-way communication, the device can be kept on line all the time, the network is disconnected, the monitoring function is achieved, and the heartbeat packet of the payment controller and the heartbeat packet of the remote server have the function of automatically adjusting the frequency of the heartbeat packet in a data learning mode.

The system records the use conditions of different electrical equipment bodies corresponding to different putting places and draws a curve of the use frequency of the electrical equipment bodies, so that the use peak period and the use valley period within a certain time range are judged. The sending and receiving frequency of the heartbeat packet of the equipment is improved in the peak period of the use of the equipment, the capacity of off-line monitoring is improved, the use of a user is guaranteed, and the probability that the payment of the user is not started is reduced. For example, one shared device is put in a restaurant and other places of a college, and the shared device can be put in the morning at the speed of 6: 00-9: 00, 11: 00-13: 00, and 16: 00-19: 00 the heartbeat packet frequency is increased in three time periods, such as 30S; the heartbeat package is reduced to a normal state within 9: 01-10: 59 and 13: 01-15: 59, for example, 70S once. And (3) reducing the heartbeat packet to a maintenance network critical value of 150S in 19: 01-5: 59 minutes, thereby achieving the purpose of saving the flow.

On the server management software level, a unified flow access mechanism is adopted, and upper application is developed in a modularized mode, such as: control program frame, equipment management, code scanning fund management, log management, field management, code scanning package management, online money distribution management, recharging management, advertisement position management and the like, picture management and database management. After the number of the machines is large, the functions are divided into three categories, one category is that a large amount of network bandwidth is occupied, one category is that a large amount of server computing capacity is occupied, and the other category is that a large amount of server memory is occupied, so that the functions are beneficial to carrying out distributed management on a server cluster and purchasing server resources with different configurations to process corresponding program functions, and the aim of saving the server cost is fulfilled. If the partial functions are large, load balancing can be opened for the functional points to form a sub-cluster.

A method for realizing code scanning payment of an electric appliance comprises the following steps:

s1, after a power supply is connected, a payment controller sequentially carries out self-checking, networking, link establishment and data pre-communication with a remote server, so that a communication link is successfully established between the payment controller and the remote server;

s2, the payment controller performs pre-communication with the electrical equipment body according to a preset program so as to collect state information of the electrical equipment body, then the payment controller reports the collected information to a remote server, and the remote server modifies the online state of the electrical equipment body through the received information;

s3, the terminal user scans the two-dimensional code on the outer wall of the electrical equipment body through the corresponding third-party payment APP installed on the mobile phone to obtain the state information of the equipment and pay certain use cost;

s4, after payment is completed, a third party payment company feeds payment information of a user back to a remote server in an asynchronous callback mode, the remote server records and modifies the online state of the electric equipment body after receiving correct payment information, and sends an instruction to a payment controller through a websocket service, and the payment controller forwards the instruction to the electric equipment body;

s5, the electrical equipment body receives the instruction and then processes the instruction, and equipment operation information is fed back to the remote processor through the payment controller;

s6, during the operation of the electric appliance body, the payment controller collects operation information of the electric appliance body every N seconds and reports the information to the remote server, when the electric appliance body finishes operation, the payment controller controls the electric appliance body to be shut down and reports a standby state to the remote server after the electric appliance body confirms shutdown, and after the remote server receives a shutdown and normal standby instruction, the on-line state of the electric appliance body is modified and the electric appliance body enters a state of waiting for code scanning payment again;

s7, if the system sets money distribution or related charging standards for the machine in advance, the code scanning amount is distributed to each user participating in money distribution, and a pre-set pre-deduction part is deducted before money distribution, so that the system completes a complete work flow.

The online state of the electrical equipment body in S2 is classified into three types, that is, "usable", "maintenance", and "in use", and the electrical equipment body accepts online payment if and only if in the "usable" state.

In S4, the instruction forwarded by the payment controller to the electrical equipment body includes information such as payment characteristic information of the user, duration of service purchase, number of service purchase, and the like.

If a large number of users scan codes at the same time, accurate and quick issuing is ensured according to a link characteristic code mechanism of the system; if a large number of orders complete the work at the same time and money is required to be divided, the system creates a plurality of money dividing processes according to the number of the money to be divided, and queues of all the orders are processed, so that each money is divided into accurate money.

Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that various changes in the embodiments and/or modifications of the invention can be made, and equivalents and modifications of some features of the invention can be made without departing from the spirit and scope of the invention.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种识别码分发风险控制系统及方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!