two-dimensional code display method and device based on mobile payment equipment

文档序号:1783557 发布日期:2019-12-06 浏览:18次 中文

阅读说明:本技术 基于移动支付设备的二维码显示方法和装置 (two-dimensional code display method and device based on mobile payment equipment ) 是由 王越 晏成 王要峰 于 2018-05-29 设计创作,主要内容包括:本发明公开了一种基于移动支付设备的二维码显示方法,接收二维码生成请求信息与二维码生成请求指令;将二维码生成请求信息按照隐私等级划分为公开信息和隐私信息;对隐私信息进行加密算法加密操作,基于加密后的隐私信息进行数字签名操作;提取已完成加密与数字签名操作后的隐私信息中的编码数据,根据二维码生成算法对编码数据进行编码;将完成编码的二维码图像推送至移动支付设备进行动态显示。该方法通过二维码在移动支付设备上动态更换,实现了商户更换二维码的灵活性与易用性。本发明还公开了基于移动支付设备的二维码显示装置。(The invention discloses a two-dimensional code display method based on mobile payment equipment, which comprises the steps of receiving two-dimensional code generation request information and a two-dimensional code generation request instruction; dividing two-dimensional code generation request information into public information and private information according to privacy grades; carrying out encryption algorithm encryption operation on the private information, and carrying out digital signature operation on the basis of the encrypted private information; extracting coded data in the privacy information after the encryption and digital signature operations are completed, and coding the coded data according to a two-dimensional code generation algorithm; and pushing the two-dimensional code image subjected to coding to mobile payment equipment for dynamic display. According to the method, the two-dimension code is dynamically replaced on the mobile payment equipment, so that the flexibility and the usability of the merchant for replacing the two-dimension code are realized. The invention also discloses a two-dimensional code display device based on the mobile payment equipment.)

1. A two-dimension code display method based on a mobile payment device is characterized by comprising the following steps:

Receiving two-dimension code generation request information and a two-dimension code generation request instruction;

Dividing the two-dimension code generation request information into public information and private information according to privacy grades;

Carrying out encryption algorithm encryption operation on the private information, and carrying out digital signature operation on the basis of the encrypted private information;

Extracting coded data in the privacy information after the encryption and digital signature operations are completed, and coding the coded data according to a two-dimensional code generation algorithm;

And pushing the two-dimensional code image subjected to coding to mobile payment equipment for dynamic display.

2. The method of claim 1, wherein performing an encryption algorithm encryption operation on the private information comprises: encrypting the private information by adopting an encryption algorithm, and carrying out bit stream transformation on the encrypted private information and the encrypted public information;

Acquiring a bit stream string of the private information and a bit stream string of the public information;

And sequentially connecting the bit stream string of the public information, the terminator, the private information indicator, the bit stream string of the private information and the terminator according to the sequence to generate a final bit stream string.

3. The method of claim 1, wherein the performing a digital signature operation based on the encrypted private information comprises: and loading the digital signature information and generating an image gray scale value of the digital signature information.

4. the method of claim 1, further comprising: judging whether a registration request of the mobile payment device is received;

If the registration request is received, the digital signature information loading operation is carried out on the two-dimension code generation request information according to the received two-dimension code generation request instruction;

And if the registration request is not received, the loading operation of the digital signature information of the two-dimension code generation request information is not executed, and registration invitation information is pushed to the mobile payment equipment.

5. The method of claim 4, wherein the performing the digital signature information loading operation on the two-dimensional code generation request information according to the received two-dimensional code generation request instruction if the registration request is received comprises: and after the two-dimension code generation request finger is received, based on an asymmetric encryption algorithm, a private key is used for carrying out the digital signature information loading operation on the two-dimension code generation request information.

6. the method of claim 5, further comprising: and according to the difference of the two-dimension code generation request information, the private keys used for the two-dimension code generation request information to load the digital signature information are different.

7. The method of claim 1, wherein pushing the encoded two-dimensional code image to a mobile payment device for dynamic display comprises: and mixing channel noise into the two-dimensional code image which is encoded in the pushing process.

8. a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.

9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1-7 are implemented when the program is executed by the processor.

10. A two-dimensional code display device based on mobile payment equipment, characterized in that the device comprises:

The receiving module is used for receiving two-dimension code generation request information and a two-dimension code generation request instruction;

The dividing module is used for dividing the two-dimension code generation request information into public information and private information according to privacy grades;

The encryption and digital signature module is used for carrying out encryption algorithm encryption operation on the privacy information and carrying out digital signature operation on the basis of the encrypted privacy information;

The encoding module is used for extracting encoded data in the privacy information after the encryption and digital signature operations are completed, and encoding the encoded data according to a two-dimensional code generation algorithm;

And the pushing module is used for pushing the coded two-dimensional code image to the mobile payment equipment for dynamic display.

Technical Field

The invention relates to the technical field of computers, in particular to a two-dimensional code display method and device based on mobile payment equipment.

Background

In the existing mobile payment scene, the active code scanning mode is based on that a merchant provides a fixed two-dimensional code card. When a merchant needs to replace the two-dimensional code on the vertical card, a new two-dimensional code needs to be printed again and pasted on the vertical card. There is no flexibility in replacing the two-dimensional code.

disclosure of Invention

Based on the above, it is necessary to provide a two-dimensional code display method and apparatus based on a mobile payment device, aiming at the problems existing in the conventional technology. Specifically, the two-dimension code is dynamically replaced on the mobile payment equipment, so that the flexibility and the usability of the merchant for replacing the two-dimension code are realized.

In a first aspect, an embodiment of the present invention provides a two-dimensional code display method based on a mobile payment device, where the method includes: receiving two-dimension code generation request information and a two-dimension code generation request instruction; dividing the two-dimension code generation request information into public information and private information according to privacy grades; carrying out encryption algorithm encryption operation on the private information, and carrying out digital signature operation on the basis of the encrypted private information; extracting coded data in the privacy information after the encryption and digital signature operations are completed, and coding the coded data according to a two-dimensional code generation algorithm; and pushing the two-dimensional code image subjected to coding to mobile payment equipment for dynamic display.

in one embodiment, the performing an encryption algorithm encryption operation on the private information includes: encrypting the private information by adopting an encryption algorithm, and carrying out bit stream transformation on the encrypted private information and the encrypted public information; acquiring a bit stream string of the private information and a bit stream string of the public information; and sequentially connecting the bit stream string of the public information, the terminator, the private information indicator, the bit stream string of the private information and the terminator according to the sequence to generate a final bit stream string.

in one embodiment, the performing digital signature operation based on the encrypted private information includes: and loading the digital signature information and generating an image gray scale value of the digital signature information.

In one embodiment, the method further comprises the following steps: judging whether a registration request of the mobile payment device is received; if the registration request is received, the digital signature information loading operation is carried out on the two-dimension code generation request information according to the received two-dimension code generation request instruction; and if the registration request is not received, the loading operation of the digital signature information of the two-dimension code generation request information is not executed, and registration invitation information is pushed to the mobile payment equipment.

In one embodiment, the performing, according to the received two-dimensional code generation request instruction, the digital signature information loading operation on the two-dimensional code generation request information if the registration request is received includes: and after the two-dimension code generation request finger is received, based on an asymmetric encryption algorithm, a private key is used for carrying out the digital signature information loading operation on the two-dimension code generation request information.

In one embodiment, the method further comprises the following steps: and according to the difference of the two-dimension code generation request information, the private keys used for the two-dimension code generation request information to load the digital signature information are different.

In one embodiment, the pushing the encoded two-dimensional code image to a mobile payment device for dynamic display includes: and mixing channel noise into the two-dimensional code image which is encoded in the pushing process.

In a second aspect, the embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when executed by a processor, the computer program implements the mobile payment device-based two-dimensional code display method of the first aspect.

In a third aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, causes the computer to perform the method according to the first aspect.

In a fourth aspect, an embodiment of the present invention further provides a two-dimensional code display device based on a mobile payment device, where the device includes: the receiving module is used for receiving two-dimension code generation request information and a two-dimension code generation request instruction; the dividing module is used for dividing the two-dimension code generation request information into public information and private information according to privacy grades; the encryption and digital signature module is used for carrying out encryption algorithm encryption operation on the privacy information and carrying out digital signature operation on the basis of the encrypted privacy information; the encoding module is used for extracting encoded data in the privacy information after the encryption and digital signature operations are completed, and encoding the encoded data according to a two-dimensional code generation algorithm; and the pushing module is used for pushing the coded two-dimensional code image to the mobile payment equipment for dynamic display.

The invention provides a two-dimensional code display method and a device based on mobile payment equipment, which are used for receiving two-dimensional code generation request information and a two-dimensional code generation request instruction; dividing two-dimensional code generation request information into public information and private information according to privacy grades; carrying out encryption algorithm encryption operation on the private information, and carrying out digital signature operation on the basis of the encrypted private information; extracting coded data in the privacy information after the encryption and digital signature operations are completed, and coding the coded data according to a two-dimensional code generation algorithm; and pushing the two-dimensional code image subjected to coding to mobile payment equipment for dynamic display. According to the method, the two-dimension code is dynamically replaced on the mobile payment equipment, so that the flexibility and the usability of the merchant for replacing the two-dimension code are realized.

drawings

fig. 1 is a schematic flow chart illustrating steps of a two-dimensional code display method based on a mobile payment device according to an embodiment of the present invention;

fig. 2 is a schematic structural diagram of a two-dimensional code display device based on a mobile payment device in an embodiment of the present invention.

Detailed Description

in order to make the objects, technical solutions and advantages of the present invention more clearly understood, the following describes in detail a specific implementation of the two-dimensional code display method and apparatus based on mobile payment device according to the present invention by using an embodiment and with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Fig. 1 is a schematic flow chart of a two-dimensional code display method based on a mobile payment device in an embodiment. The method specifically comprises the following steps:

step 101, receiving two-dimensional code generation request information and a two-dimensional code generation request instruction.

And 102, dividing the two-dimension code generation request information into public information and private information according to privacy grades. It is understood that the privacy information indicator is a read continuation indicator, defined as a "READCONNECTION" string.

And 103, carrying out encryption algorithm encryption operation on the private information, and carrying out digital signature operation on the private information based on the encrypted private information.

Specifically, the encryption operation of the encryption algorithm on the private information includes: encrypting the private information by adopting an encryption algorithm, and carrying out bit stream transformation on the encrypted private information and the encrypted public information; acquiring a bit stream string of private information and a bit stream string of public information; and sequentially connecting the bit stream string of the public information, the terminator, the privacy information indicator, the bit stream string of the privacy information and the terminator according to the sequence to generate a final bit stream string. Therefore, the safety of the two-dimensional code is improved. The terminator is defined according to QR code standard, wherein the QR code standard is ISO/IEC18004 standard.

It is understood that the public information is subjected to bit stream conversion to obtain a bit stream string of the public information, and a terminator is added after the bit stream string of the public information; judging whether the information to be coded carries privacy information or not, if so, adding an information mode judgment type privacy information indicator after a terminator of a bit stream string of the public information; otherwise, the execution operation is ended, and the bit stream string with the public information of the terminator is taken as the final bit stream string. Further, the QR two-dimensional code generating equipment encrypts the private information by adopting an encryption algorithm; carrying out bit stream conversion on the encrypted private information to obtain a bit stream string of the private information, and adding a terminator behind the bit stream string of the private information; and adding the bit stream string of the privacy information with the terminator into a privacy information indicator READCONTIONUE to obtain a final bit stream string.

In addition, when the public information does not exist, the bit stream string of the public information is an empty string, and a terminator is added after the empty string; when the code is scanned and the information is read, correspondingly, the public information part is a null character string; when the privacy information does not exist, the privacy indicator is not added, and when the code is scanned and the information is read, correspondingly, after the terminator is read, if the privacy indicator does not exist at the back, the continuous reading is stopped; or when the private information does not exist, adding a private indicator, wherein the bit stream string of the encrypted private information is null, adding a terminator after the bit stream string of the encrypted private information, scanning the code to read the information, correspondingly reading the bit stream string of the encrypted private information after the private indicator until the terminator is read, decrypting the bit stream string of the encrypted private information, and finally recording the private information part as a null character string if the decryption result is null string or messy code.

Further, performing a digital signature operation based on the encrypted private information includes: and loading the digital signature information and generating an image gray scale value of the digital signature information. Therefore, the safety of the two-dimensional code is improved. It will be appreciated that the image gray scale value of the digital signature information may be superimposed on the image gray scale value of the original data. The specific method comprises the following steps: superposing the image gray value of the original information and the image gray value of the digital signature information in a center alignment mode; superposing the image gray value of the original information and the image gray value of the digital signature information by a specified pattern; and superposing the image gray value of the original information and the image gray value of the digital signature information by a specified gray value. It should be noted that the overlapping positions of the image grayscale value of the original information and the image grayscale value of the digital signature information may be in a dispersed form. In addition, the overlapping position of the image gray scale value of the original information and the image gray scale value of the digital signature information is set in a manner that both parties know, agree with or negotiate, and is not disclosed to the outside.

It should be noted that the two-dimensional code display method based on the mobile payment device further includes: judging whether a registration request of the mobile payment device is received; if a registration request is received, carrying out digital signature information loading operation on two-dimensional code generation request information according to a received two-dimensional code generation request instruction; and if the registration request is not received, the loading operation of the digital signature information of the two-dimensional code generation request information is not executed, and the registration invitation information is pushed to the mobile payment equipment.

In addition, if a registration request is received, the performing, according to the received two-dimensional code generation request instruction, a digital signature information loading operation on the two-dimensional code generation request information includes: and after receiving the two-dimension code generation request finger, carrying out digital signature information loading operation on the two-dimension code generation request information by using a private key based on an asymmetric encryption algorithm.

it can be understood that, according to the difference of the two-dimensional code generation request information, the private key used in the digital signature information loading of the two-dimensional code generation request information is different.

And 104, extracting the coded data in the privacy information after the encryption and digital signature operations are finished, and coding the coded data according to a two-dimensional code generation algorithm.

And 105, pushing the coded two-dimensional code image to mobile payment equipment for dynamic display.

In one embodiment, pushing the encoded two-dimensional code image to a mobile payment device for dynamic display comprises: and mixing channel noise into the coded two-dimensional code image in the pushing process.

The invention provides a two-dimensional code display method based on mobile payment equipment, which comprises the steps of receiving two-dimensional code generation request information and a two-dimensional code generation request instruction; dividing two-dimensional code generation request information into public information and private information according to privacy grades; carrying out encryption algorithm encryption operation on the private information, and carrying out digital signature operation on the basis of the encrypted private information; extracting coded data in the privacy information after the encryption and digital signature operations are completed, and coding the coded data according to a two-dimensional code generation algorithm; and pushing the two-dimensional code image subjected to coding to mobile payment equipment for dynamic display. According to the method, the two-dimension code is dynamically replaced on the mobile payment equipment, so that the flexibility and the usability of the merchant for replacing the two-dimension code are realized.

Based on the same inventive concept, the invention also provides a two-dimensional code display device based on the mobile payment equipment. Because the principle of the device for solving the problems is similar to that of the two-dimensional code display method based on the mobile payment equipment, the implementation of the device can be carried out according to the specific steps and time limits of the method, and repeated parts are not repeated.

Fig. 2 is a schematic structural diagram of a two-dimensional code display apparatus based on a mobile payment device in an embodiment. The two-dimensional code display device 10 based on the mobile payment equipment comprises: the system comprises a receiving module 100, a dividing module 200, an encryption and digital signature module 300, an encoding module 400 and a pushing module 500.

the receiving module 100 is configured to receive two-dimensional code generation request information and a two-dimensional code generation request instruction; the dividing module 200 is configured to divide the two-dimensional code generation request information into public information and private information according to privacy levels; the encryption and digital signature module 300 is configured to perform an encryption algorithm encryption operation on the private information, and perform a digital signature operation based on the encrypted private information; the encoding module 400 is configured to extract encoded data in the private information after the encryption and digital signature operations are completed, and encode the encoded data according to a two-dimensional code generation algorithm; the pushing module 500 is configured to push the encoded two-dimensional code image to a mobile payment device for dynamic display.

The invention provides a two-dimensional code display device based on mobile payment equipment.A receiving module receives two-dimensional code generation request information and a two-dimensional code generation request instruction; the dividing module divides the two-dimension code generation request information into public information and private information according to privacy grades; the encryption and digital signature module carries out encryption algorithm encryption operation on the private information and carries out digital signature operation on the basis of the encrypted private information; the encoding module extracts encoded data in the privacy information after the encryption and digital signature operations are completed, and encodes the encoded data according to a two-dimensional code generation algorithm; and the pushing module pushes the coded two-dimensional code image to the mobile payment equipment for dynamic display. The device dynamically changes the two-dimension code on the mobile payment equipment, and flexibility and usability of changing the two-dimension code by a merchant are realized.

The embodiment of the invention also provides a computer readable storage medium. The computer-readable storage medium has stored thereon a computer program, which is executed by the processor of fig. 1.

the embodiment of the invention also provides a computer program product containing the instruction. Which when run on a computer causes the computer to perform the method of fig. 1 described above.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于移动支付设备的支付信息显示方法和装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!