Payment method and device, electronic equipment, storage medium and program product
By using quantum keys to sign transaction information in the payment system, the problem that traditional encryption algorithms are easily cracked is solved, and the reliable transmission and security of transaction information is achieved.
Patent Information
- Application Number
- CN202411535711.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-25
AI Technical Summary
In theory, traditional encryption algorithms have the possibility of being cracked, resulting in malicious tampering of the signature information when the key is cracked, causing losses.
The transaction information is signed using quantum keys and the quantum signature information is used for interaction. Through the undeniability and non-forgery of the quantum key, the transaction information is not maliciously tampered with.
Through quantum signature technology, the reliability and security of transaction information during transmission is ensured, and the information is tampered with after the key is cracked.
Smart Images

Figure CN119515383A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of information security, and in particular, relates to a payment method, device, equipment, storage medium and program product. Background Art
[0002] In relevant payment methods, especially in e-commerce transaction scenarios, payment and purchase behaviors between various transaction participants are often encrypted or signed through encryption algorithms. However, since traditional encryption algorithms are theoretically likely to be cracked, when the key is cracked, the signed relevant payment information may be maliciously tampered with, thereby causing losses.
[0003] For example, after obtaining relevant transaction information, a participant in the transaction tampers with the relevant information in order to deny the transaction it is participating in, thereby causing losses to other transaction participants; or a non-transaction participant tampers with the payment information signed by a transaction participant for malicious purposes. Summary of the invention
[0004] The embodiments of the present application provide a payment method, device, electronic device storage medium and program product, which can solve the problem of signature information being tampered with due to the cracking of the key.
[0005] In a first aspect, an embodiment of the present application provides a payment method, which is applied to a platform side, and the method includes:
[0006] Receiving first quantum signature information sent by a first user terminal, where the first quantum signature information is obtained by the first user terminal signing the first transaction information based on the first user quantum key;
[0007] Matching a first platform quantum key on the platform end with a first user quantum key in the first quantum signature information;
[0008] When the first platform quantum key successfully matches the first user quantum key, first transaction information in the first quantum signature information is obtained, a first resource corresponding to the first transaction information is transferred from the first user terminal, and the first quantum signature information is sent to the second user terminal, so that the second user terminal can perform transactions based on the first quantum signature information;
[0009] Among them, the first platform quantum key and the first user quantum key are generated by negotiation between the first user end and the platform end.
[0010] Wherein, the first platform quantum key and the first user quantum key are both character strings;
[0011] Further, matching the first platform quantum key on the platform side with the first user quantum key in the first quantum signature information includes:
[0012] Matching the first platform quantum key with the first user quantum key in the first quantum signature information bit by bit;
[0013] Determine the number of bits where the match is inconsistent;
[0014] When the number of bits is less than a preset first matching threshold, it is determined that the first platform quantum key on the platform side matches the first user quantum key successfully.
[0015] Further, after sending the first quantum signature information to the second user terminal, the method further includes:
[0016] Receiving second quantum signature information sent by a second user terminal, where the second quantum signature information is obtained by the second user terminal signing the second transaction information based on a second user quantum key;
[0017] Matching the second platform quantum key on the platform end with the second user quantum key in the second quantum signature information;
[0018] When the second platform quantum key matches the second user quantum key successfully, obtaining the second transaction information in the second quantum signature information, and transferring the second resource corresponding to the second transaction information to the second user terminal;
[0019] Among them, the second user quantum key and the second platform quantum key are negotiated between the second user end and the platform end.
[0020] In a second aspect, an embodiment of the present application provides another payment method, which is applied to a second user terminal, and the method includes:
[0021] Receiving first quantum signature information sent by the platform end, where the first quantum signature information is sent by the first user end to the platform end, and the first quantum signature information is obtained by the first user end signing the first transaction information based on the first user quantum key;
[0022] Matching a second user quantum key of the second user terminal with a first user quantum key in the first quantum signature information;
[0023] When the second user quantum key successfully matches the first user quantum key, obtaining the first transaction information in the first quantum signature information, and sending the product resources corresponding to the first transaction information to the first user terminal;
[0024] Among them, the first user quantum key is generated by negotiation between the first user terminal and the platform terminal, and the second user quantum key is obtained by negotiation between the second user terminal and the platform terminal.
[0025] Wherein, the second user quantum key and the first user quantum key are both character strings;
[0026] Further, matching the second user quantum key of the second user terminal with the first user quantum key in the first quantum signature information includes:
[0027] Matching the second user quantum key with the first user quantum key in the first quantum signature information bit by bit;
[0028] Determine the number of bits where the match is inconsistent;
[0029] When the number of bits is less than a preset second matching threshold, it is determined that the second user quantum key matches the first user quantum key successfully.
[0030] Furthermore, after sending the product resource corresponding to the first transaction information to the first user terminal, the method further includes:
[0031] Receiving confirmation information sent by the first user terminal, where the confirmation information is reception information of the product resource;
[0032] Encapsulating information used to describe product resources sent by the second user end into second transaction information, and signing the second transaction information with the second user quantum key to obtain second quantum signature information;
[0033] The second quantum signature information is sent to the platform end, so that the platform end can perform transactions based on the second quantum signature information.
[0034] In a third aspect, an embodiment of the present application provides a payment device, the device comprising:
[0035] A receiving module, configured to receive first quantum signature information sent by a first user terminal, where the first quantum signature information is obtained by signing the first transaction information by the first user terminal based on the first user quantum key;
[0036] A matching module, used to match a first platform quantum key on the platform end with a first user quantum key in the first quantum signature information;
[0037] The execution module is used to obtain the first transaction information in the first quantum signature information when the first platform quantum key matches the first user quantum key successfully, transfer the first resource corresponding to the first transaction information from the first user terminal, and send the first quantum signature information to the second user terminal, so that the second user terminal can perform transactions based on the first quantum signature information, wherein the first platform quantum key and the first user quantum key are generated by negotiation between the first user terminal and the platform terminal.
[0038] In a fourth aspect, an embodiment of the present application provides another payment device, the device comprising:
[0039] A receiving module, configured to receive first quantum signature information sent by the platform end, where the first quantum signature information is sent by the first user end to the platform end, and the first quantum signature information is obtained by the first user end signing the first transaction information based on the first user quantum key;
[0040] A matching module is configured to match a second user quantum key of the second user terminal with a first user quantum key in the first quantum signature information;
[0041] The execution module is used to obtain the first transaction information in the first quantum signature information when the second user quantum key successfully matches the first user quantum key, and send the product resources corresponding to the first transaction information to the first user terminal, wherein the first user quantum key is generated by negotiation between the first user terminal and the platform terminal, and the second user quantum key is obtained by negotiation between the second user terminal and the platform terminal.
[0042] In a fifth aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0043] a processor and a memory storing computer program instructions;
[0044] When the processor executes the computer program instructions, it implements any of the above payment methods.
[0045] In a sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any of the above payment methods is implemented.
[0046] In a seventh aspect, an embodiment of the present application provides a computer program product in which instructions, when executed by a processor of an electronic device, enable the electronic device to execute any of the payment methods described above.
[0047] In the payment method, device, electronic device, storage medium and program product of the embodiments of the present application, the platform receives the first quantum signature information from the first user end. Since the quantum signature cannot be forged or denied, after the platform successfully matches the first user quantum key in the first quantum signature information using the first platform quantum key, the first user end cannot deny the first transaction information obtained by the platform end from the first quantum signature information. At the same time, when the platform transfers the corresponding first resource to the first user end according to the first transaction information, in view of the unbreakable characteristic of the quantum signature, the platform end can undoubtedly confirm that the first transaction information has not been tampered with, and confirm that the first information is authentic and reliable information from the first user end, thereby ensuring the reliability of the first transaction information during transmission.
[0048] Correspondingly, after the platform forwards the successfully matched first quantum signature information to the second user end, the second user end, based on the first quantum signature information received from the platform, also due to the characteristics of quantum signature that cannot be forged or denied, therefore, after the second user end successfully matches the second user quantum key with the first user quantum key in the first quantum signature information, the first user end cannot deny the first information obtained by the second user end from the first quantum signature information. At the same time, when the second user end transfers the corresponding product resources to the first user end according to the first transaction information, in view of the unbreakable characteristics of quantum signature, the second user end can undoubtedly confirm that the first transaction information has not been tampered with, and confirm that the first information is authentic and reliable information from the first user end, thereby ensuring the reliability of the first transaction information during transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 is a schematic diagram of a payment scenario provided in an embodiment of the present application;
[0051] Figure 2 This is a schematic diagram of a first process of a payment method provided in an embodiment of the present application;
[0052] Figure 3 This is a second flow diagram of a payment method provided in an embodiment of the present application;
[0053] Figure 4 is a first structural diagram of a payment device provided in an embodiment of the present application;
[0054] Figure 5 is a second structural schematic diagram of a payment device provided in an embodiment of the present application;
[0055] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0057] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0058] As described in the background technology section, related payment technologies are still difficult to meet the needs of actual payment scenarios.
[0059] In the process of implementing this application, the applicant discovered that the main problem with the relevant payment technology is that in the relevant payment methods, especially in the transaction scenarios of e-commerce, the payment and purchase behaviors between the various transaction participants are often encrypted or signed by encryption algorithms. However, whether it is traditional encryption algorithms such as symmetric encryption or asymmetric encryption, or other signature methods such as homomorphic signatures, in theory, the key may be cracked, which has nothing to do with the specific method of encryption or signing. When the key is cracked, the relevant payment information signed using the key is at risk of being maliciously tampered with, thereby causing losses.
[0060] For example, after obtaining relevant transaction information, a participant in the transaction tampers with the relevant information in order to deny the transaction it is participating in, thereby causing losses to other transaction participants; or a non-transaction participant tampers with the payment information signed by a transaction participant for malicious purposes.
[0061] In order to solve the problems of the prior art, the embodiments of the present application provide a payment method, device, electronic device, storage medium and program product, which use quantum keys to sign relevant transaction information, such as payment amount, payment time, purchased products, sales amount, delivery time and shipped products, so that transaction participants such as the first user end, the second user end and the platform end can use quantum signature information to interact with each other to carry out the above-mentioned related transaction information, and based on the non-repudiation and non-forgeability of quantum keys, the purpose of preventing transaction information from being maliciously tampered with is achieved.
[0062] In an embodiment of the present application, each transaction participant can generate a quantum key through the Key Generation Protocol (KGP) and perform quantum key distribution (QKD) through the BB84 protocol (a protocol for distributing quantum keys).
[0063] Figure 1 A transaction scenario of an embodiment of the present application is shown, wherein in this scenario, there are three parties involved in the transaction, namely, a financial platform as a platform end, a buyer as a first user end, and a seller as a second user end. As shown in the figure, when the buyer purchases a product from the seller, the financial platform first withdraws money from the buyer and temporarily stores it on the financial platform. After the seller ships the product to the buyer and the buyer confirms receipt of the product sent by the seller, the financial platform then makes a corresponding loan to the seller.
[0064] In this process, each transaction participant generates their own quantum key through KGP, uses their own quantum key to sign the transaction information, and uses the quantum key to verify the received signature information.
[0065] In this embodiment, based on the quantum Heisenberg uncertainty principle, the no-cloning theorem and the non-orthogonal state indistinguishability principle, the quantum key generated by the quantum state cannot be accurately observed and thus cannot be cracked.
[0066] The following is a detailed explanation of Heisenberg's uncertainty principle, no-cloning theorem and non-orthogonal indistinguishability principle.
[0067] Among them, due to Heisenberg's uncertainty principle, it is impossible to observe the position and momentum of microscopic quantum. That is to say, the position and momentum in the quantum dimension are not specific, that is, quantum uncertainty. Its uncertainty is determined by the characteristics of the quantum itself and has nothing to do with the measuring equipment.
[0068] At the same time, the closer the measurement result of the relative position of any quantum is to accuracy, the closer the measurement result of its relative momentum will be to inaccuracy, and vice versa.
[0069] The uncertainty of quantum position and momentum can be observed by following inequality (1):
[0070]
[0071] Among them, x represents the position of the quantum, p represents the momentum of the quantum, and h represents Planck's constant.
[0072] It can be seen that the above inequality (1) further quantifies the Heisenberg uncertainty principle, indicating that the position and momentum of a quantum cannot be observed or measured.
[0073] Furthermore, the single quantum no-cloning theorem points out that it is impossible to obtain a quantum state that is exactly the same as an unknown quantum state by copying it. The following proves it by contradiction.
[0074] Assume that |φ> and |Ψ> are two quantum states, |s> is a pure state, and U represents the cloning operator. If the quantum state can be cloned, then there exist the following formulas (2) and (3):
[0075] U(|φ>|s>)=|φ>|φ>, U(|Ψ>|s>)=|Ψ>|Ψ> (2)
[0076] U[(α|Ψ>+β|φ>)|s>]=(α|Ψ>+β|φ>)(α|Ψ>+β|φ>), (3)
[0077] Furthermore, based on the above formula (2) and formula (3), according to the superposition principle and the definition of linear operators, the following formula (4) can be obtained:
[0078] U[(α|Ψ>+β|φ>)|s>]=α 2 |Ψ>|Ψ>+βα|φ>|Ψ>+β 2 |φ (4)
[0079] >|φ>+αβ|Ψ>|φ>
[0080] However, U[(α|Ψ>+β|φ>)|s>] can be equal to formula (5) as shown below:
[0081] U[(α|Ψ>+β|φ>)|s>]=αU(|Ψ>|s>)+βU(|φ>|s>)=α|Ψ (5)
[0082] >|Ψ>+β|φ>|φ>
[0083] Based on this, it can be seen that when the two quantum states |φ> and |Ψ> are cloned and superimposed, the results are contradictory. Therefore, it is proved that quantum states cannot be cloned. Furthermore, transaction participants or other non-transaction parties cannot obtain the quantum state used for quantum keys through cloning.
[0084] Furthermore, the indistinguishability of non-orthogonal states specifically means that all measurements and operations on quantum and quantum states cannot correctly distinguish two non-orthogonal quantum states, and thus cannot discover the difference between them. This principle is fully reflected in the BB84 protocol in this embodiment. Among them, in the BB84 protocol, when two quantum states are aligned, the alignment can be successful only by using orthogonal quantum states and generating the corresponding quantum key.
[0085] Among them, by selecting different measurement bases, the same measurement result may be produced even if the measured quantum state is different. Therefore, even if the same measurement result is obtained, the quantum state cannot be accurately determined, and the quantum state sent for the same measurement result may also be different.
[0086] Because it is impossible to correctly distinguish between two non-orthogonal quantum states, when an orthogonal quantum state is used to generate a quantum key, it is impossible to use a non-orthogonal quantum state to crack the quantum key.
[0087] The following is combined with Figure 2 and attached Figure 3 Here we introduce the payment method provided in the embodiment of the present application.
[0088] In this embodiment, the first user end, the platform end, and the second user end act as transaction participants. Before the transaction, the first user end and the platform end generate their own quantum keys based on KGP through the interaction of quantum states. At the same time, the first user end and the platform end also generate their own quantum keys based on KGP through the interaction of quantum states.
[0089] Specifically, when each transaction participant generates a quantum key based on KGP, a quantum state space can be mapped to a vector space, where a quantum state space can be used to describe the state in an isolated system. Based on this, it can be considered that the quantum state space contains all the information of the system, and each quantum state therein, that is, the quantum polarization state, is defined as a vector basis in the Hilbert space. For example, |0> and |1> represent basic vectors that are orthogonal to each other in the Hilbert space of dimension 2, and the combination of the two is used as the Z basis, expressed as {|0>, |1>}.
[0090] Among them, |0> and |1> can be defined as shown in the following formula (6):
[0091] as well as,
[0092] Furthermore, another pair of mutually orthogonal basic vectors |+> and |-> are used as the X basis and are defined as shown in the following formula (7):
[0093] as well as,
[0094] Based on this, any two transaction participants can use the quantum polarization state, that is, the quantum state, to generate a quantum key, and based on the aforementioned quantum Heisenberg uncertainty principle, the no-cloning theorem and the non-orthogonal state indistinguishability principle, the quantum key generated by the quantum state cannot be accurately observed and therefore cannot be cracked.
[0095] Furthermore, any two parties involved in the transaction can complete the generation and distribution of quantum keys through the interaction of quantum states.
[0096] The following takes the first user end and the platform end among the transaction participants as an example to explain in detail the process of generating quantum keys based on KGP.
[0097] Specifically, each transaction participant divides the above four quantum states into two groups of mutually orthogonal bases and encodes them as shown in Table 1 below.
[0098] Table 1. Encoding table of quantum states
[0099]
[0100] Among them, the two basic vectors of Z basis |0> are expressed as and is encoded as 0, the basic vector |1> is represented as and are encoded as 1; and the two basis vectors |+> of the X basis are represented as and is encoded as 0, and the basic vector |-> is represented as and is encoded as 1.
[0101] Based on this, the two transaction participants first select the basis and make measurements.
[0102] Specifically, a transaction participant, such as a first user terminal, selects multiple quantum states from the above-mentioned quantum states and sends them to another transaction participant, such as a platform terminal.
[0103] After receiving multiple quantum states, the platform randomly selects one of the two bases mentioned above, uses the selected basis to observe the received quantum state, and records the results. In actual situations, the sent single quantum may be affected by the loss of the communication channel, resulting in failure to reach the receiving end.
[0104] Furthermore, the platform end and the first user end are compared.
[0105] Specifically, the platform uses a classical communication channel to send information to the first user end, so that the first user end can clearly understand the basis used by the platform end, so that the first user end can compare the basis used by the platform end with the basis selected by the first user end.
[0106] Furthermore, after the first user end makes the comparison, the cases where different bases are used are deleted, and the retained parts are notified to the platform end.
[0107] Based on the reserved basis, the platform end and the first user end generate their own quantum keys.
[0108] Specifically, the first user end and the platform end randomly select multiple quantum states from the above-mentioned reserved part to calculate the bit error rate. If the bit error rate is within a predetermined bit error rate range, the selected multiple quantum states are deleted, and the remaining quantum states are used to generate respective quantum keys.
[0109] In this embodiment, Table 2 shown below shows a specific example of generating a quantum key by pairing a basis.
[0110] Table 2. Base execution results table
[0111]
[0112]
[0113] Among them, the quantum states in the Send column are the quantum states sent by the first user end, the quantum states in the Select Basis column are the bases selected by the platform end for measurement, the quantum states in the Measure column are the quantum states used for measurement by the platform end, the Basis column indicates the basis result of the platform end, × indicates that the basis fails, √ indicates that the basis is successful, the Key column indicates the bit value of each bit in the key generated based on the basis result, that is, the encoding corresponding to each quantum state in Table 1, and the missing measurement result indicates that the platform end failed to receive the quantum state sent by the first user end due to the loss of the communication channel.
[0114] It can be seen that only when the platform end and the first user end select the same basis can the basis be successfully matched and the following key process be completed. Otherwise, even if the quantum state used for measurement is the same as the quantum state sent, the basis cannot be successfully matched.
[0115] Based on this, the coding combination obtained after the above basis pairing is: a string of characters 00110011 including multiple bits, and it is used as the initial quantum key for quantum signature by the platform end and the first user end.
[0116] In some embodiments, in order to prevent any transaction participant from denying the quantum signature information of the key signature during the execution of the protocol, any two transaction participants can exchange a part of the quantum key they each hold, and at the same time inform the other party of the position of the exchanged part of the quantum key among all the keys.
[0117] Accordingly, after executing this process, any transaction participant can use the part of the quantum key he or she retains or the part of the quantum key exchanged by the other party to quantum sign the information.
[0118] Based on this, the platform end and the first user end can obtain their own quantum keys for quantum signature. In this embodiment, the platform end and the second user end can also obtain their own quantum keys for quantum signature through the same KGP process mentioned above.
[0119] It should be noted that the KGP in this embodiment is the basis of the BB84 protocol. The process in which any two transaction participants generate their own quantum keys based on KGP is also part of the process of quantum key distribution in accordance with the BB84 protocol. That is to say, when any two transaction participants complete the KGP process, they also complete part of the BB84 protocol process, but the execution of KGP does not include other operations in the BB84 protocol such as error correction and amplification.
[0120] In the embodiment of the present application, based on the quantum keys respectively possessed by the platform end, the first user end and the second user end, Figure 1 In the transaction scenario shown, according to Figure 2 The process shown exchanges transaction information and completes the product transaction.
[0121] In a specific embodiment of the present application, as the purchaser of the first user end, by performing the above-mentioned quantum state interaction with the platform end, the first user quantum key can be obtained. As a financial platform on the platform side, by performing the above-mentioned quantum state interaction with the first user side, the first platform quantum key can be obtained.
[0122] Furthermore, as the seller of the second user end, by performing the above-mentioned quantum state interaction with the platform end, the second user quantum key can be obtained. As a financial platform on the platform side, by performing the above-mentioned quantum state interaction with the second user side, the second platform quantum key can be obtained
[0123] Based on this, when the first user terminal intends to purchase a product from the second user terminal, the first user terminal can first encapsulate the relevant information related to the purchase of the product into first transaction information, and use the first user quantum key to sign the encapsulated first transaction information to obtain first quantum signature information. The first user terminal can then send the first quantum signature information to the platform terminal.
[0124] In a specific example, the purchaser as the first user terminal may use the purchased product G, the first resource M1 to be paid, the time TA at which the purchase is made to the second user terminal, and the account ACC used by the purchaser for payment as relevant information for purchasing the product G.
[0125] Furthermore, the first user terminal encapsulates the above-mentioned related information into the first transaction information m1, and expresses it as, m1 = (G, M1, TA, ACC), wherein the first resource M1 can be, for example, the amount of money used to pay for the product G, and the purchased product G can be, for example, a physical product, or a virtual product, such as a membership that can be used for transactions, etc.
[0126] Furthermore, the purchaser uses the first user quantum key obtained above Sign m1 to obtain the first quantum signature information S A , and expressed as
[0127] like Figure 2 As shown, the payment method includes the following steps S201 to S206.
[0128] The first user terminal executes S201 and sends first quantum signature information.
[0129] The first quantum signature information is obtained by the first user terminal signing the first transaction information based on the first user quantum key.
[0130] In this step, the purchaser (i.e., the first user end) sends the first quantum signature information S A Send it to the financial platform so that the financial platform (i.e., the platform end) can use the first quantum signature information S A To transfer the corresponding first resource M1 from the purchaser, thereby completing the payment process of the purchaser.
[0131] S202: The platform matches a first platform quantum key of the platform with a first user quantum key in the first quantum signature information.
[0132] Among them, the first platform quantum key and the first user quantum key are generated by negotiation between the first user end and the platform end.
[0133] The platform side can use the first platform quantum key to match the first user quantum key in the first quantum signature information.
[0134] In a specific example, after receiving the first quantum signature information S from the buyer, the financial platform A After that, the financial platform used the quantum key held by the first platform To the first quantum signature information S A The first user quantum key in to make a match.
[0135] As mentioned above, due to the first user quantum key With the first platform quantum key Each is a string of multiple bits, so the financial platform can use the first platform quantum key With the first user quantum key The bits in are matched one by one.
[0136] In one example, after the financial platform completes the bit-by-bit matching, the financial platform determines the number of bits with inconsistent value matching. If the number of bits is less than a preset first matching threshold, the financial platform can consider that the mismatch rate meets the requirement and determine the first platform quantum key With the first user quantum key The match was successful.
[0137] When the first platform quantum key matches the first user quantum key successfully, the platform executes S203 and S204; when the first platform quantum key matches the first user quantum key unsuccessfully, the payment is terminated.
[0138] S203: When the first platform quantum key matches the first user quantum key successfully, obtain the first transaction information in the first quantum signature information, and transfer the first resource corresponding to the first transaction information from the first user terminal.
[0139] S204. The platform sends the first quantum signature information to the second user terminal.
[0140] The second user terminal receives the first quantum signature information and performs a transaction based on the first quantum signature information.
[0141] In one example, the financial platform can obtain the first quantum signature information S A The first transaction information m1 of the buyer is obtained.
[0142] Furthermore, the first transaction information m1 includes the first resource M1 that the buyer needs to pay and the account ACC used by the buyer for payment. Accordingly, the financial platform can transfer the corresponding first resource M1 from the account ACC used by the buyer for payment according to the first resource M1 in the first transaction information m1, thereby completing the payment process from the buyer to the financial platform.
[0143] Based on this, the financial platform will receive the first quantum signature information S A Forwarded to the seller, so that the seller can use the first quantum signature information S A To complete the transaction with the buyer.
[0144] It can be seen that this embodiment is based on receiving the first quantum signature information from the first user end. Due to the characteristics of quantum signature that cannot be forged or denied, after the platform end successfully matches the first user quantum key in the first quantum signature information using the first platform quantum key, the first user end cannot deny the first transaction information obtained by the platform end from the first quantum signature information. At the same time, when the platform end transfers the corresponding first resource to the first user end according to the first transaction information, in view of the unbreakable characteristics of quantum signature, the platform end can undoubtedly confirm that the first transaction information has not been tampered with, and confirm that the first information is authentic and reliable information from the first user end, thereby ensuring the reliability of the first transaction information during transmission.
[0145] The second user terminal executes S205 to match the second user quantum key of the second user terminal with the first user quantum key in the first quantum signature information.
[0146] Among them, the second user quantum key is negotiated between the second user end and the platform end.
[0147] The second user terminal receives the first quantum signature information sent by the platform terminal, and matches the second user quantum key with the first user quantum key in the first quantum signature information.
[0148] In a specific example, based on the first quantum signature information S received by the financial platform from the buyer in the above embodiment, A Forward to the seller, the seller receives the first quantum signature information S A After that, the seller can use the second user's quantum key To the first quantum signature information S A The first user quantum key in to make a match.
[0149] Specifically, since the first user quantum key With the second user quantum key are all strings containing multiple bits, so the seller can With the first user quantum key The bits in are matched one by one.
[0150] After the seller matches the bits one by one, the seller determines the number of bits with inconsistent values. If the number of bits is less than the preset second matching threshold, the seller can consider that the mismatch rate meets the requirement and determine the second user quantum key. With the first user quantum key The match was successful.
[0151] If the second user quantum key matches the first user quantum key successfully, the second user terminal executes S206 and S207; if the second user quantum key matches the first user quantum key unsuccessfully, the second user terminal terminates the transaction.
[0152] S206. When the second user quantum key successfully matches the first user quantum key, obtain the first transaction information in the first quantum signature information.
[0153] S207: Send product resources corresponding to the first transaction information to the first user terminal.
[0154] In one embodiment, the second matching threshold adopted by the seller may be less than or equal to the first matching threshold adopted by the platform.
[0155] In one example, the seller can obtain the first quantum signature information S A The first transaction information m1 of the buyer is obtained.
[0156] Furthermore, the first transaction information m1 includes the product G that the buyer needs to purchase. Accordingly, the seller can send the product G to the buyer based on the product G in the first transaction information m1, and the seller thereby completes the delivery process to the buyer.
[0157] It can be seen that in this embodiment, after the platform end forwards the successfully matched first quantum signature information to the second user end, the second user end, based on the first quantum signature information received from the platform end, also because of the characteristics of quantum signature that cannot be forged or denied, therefore, after the second user end successfully matches the first user quantum key in the first quantum signature information using the second user quantum key, the first user end cannot deny the first information obtained by the second user end from the first quantum signature information. At the same time, when the second user end transfers the corresponding product resources to the first user end according to the first transaction information, in view of the characteristics of quantum signature that cannot be cracked, the second user end can undoubtedly confirm that the first transaction information has not been tampered with, and confirm that the first information is authentic and reliable information from the first user end, thereby ensuring the reliability of the first transaction information during transmission.
[0158] Based on the above steps, after the platform completes the transfer of the first resource from the first user terminal and the second user terminal completes sending the product resource to the first user terminal, the embodiment of the present application may further include S301 to S307, such as Figure 3 shown.
[0159] S301. The second user terminal receives confirmation information sent by the first user terminal.
[0160] The confirmation information is the receipt information of the product resources.
[0161] In a specific example, after the seller completes sending the product resources to the buyer in the aforementioned steps, the buyer can send a confirmation message to the seller after receiving the product resources to confirm to the seller that the product resources have been received by the buyer.
[0162] Among them, when the product resource is a virtual product, the product resource can be received by the first user terminal, or by other electronic devices authorized by the first user terminal. When the product resource is a physical product, the product resource can be received by the user using the first user terminal or other persons authorized by the first user terminal.
[0163] S302. The second user terminal encapsulates the information used to describe the product resources sent by the second user terminal into second transaction information, and uses the second user quantum key to sign the second transaction information to obtain second quantum signature information.
[0164] In this embodiment, the second user terminal may encapsulate the relevant information of the sent product resources into the second transaction information, and the second user terminal signs it.
[0165] In a specific example, when the seller receives the confirmation information sent by the buyer, the seller can take the issued product G, the second resource M2 that needs to be paid by the financial platform, the time TB of issuing the product G to the first user terminal, and the account BCC used by the seller to receive the second resource as relevant information related to the issuance of the product G, and encapsulate it into the second transaction information m2 by the seller, and express it as, m2 = (G, M2, TB, BCC), where the second resource M2 can be, for example, the amount of money that needs to be paid for the product.
[0166] Furthermore, the seller uses the second user quantum key obtained above Sign m2, so that the seller obtains the second quantum signature information S B , and expressed as
[0167] S303: The second user terminal sends second quantum signature information to the platform terminal.
[0168] The second quantum signature information is obtained by the second user end signing the second transaction information based on the second user quantum key.
[0169] The platform receives the second quantum signature information sent by the second user terminal and performs a transaction based on the second quantum signature information.
[0170] In this embodiment, the second user terminal sends the second quantum signature information to the platform terminal, and accordingly, the platform terminal can pay the corresponding second resource to the second user terminal according to the second quantum signature information.
[0171] In a specific example, the seller will obtain the second quantum signature information S B Send it to the financial platform so that the financial platform can use the second quantum signature information S B To transfer the corresponding second resource M2 to the seller, thereby completing the payment process to the buyer.
[0172] S304. The platform side matches the second platform quantum key of the platform side with the second user quantum key in the second quantum signature information.
[0173] Specifically, the financial platform receives the second quantum signature information S from the buyer. B After that, the financial platform uses the quantum key held by the second platform To the second quantum signature information S B The second user quantum key in to make a match.
[0174] As mentioned above, due to the second user quantum key With the second platform quantum key are all strings containing multiple bits, so the financial platform can use the second user’s quantum key With the second platform quantum key The bits in are matched one by one.
[0175] After the financial platform matches the bits one by one, the financial platform determines the number of bits with inconsistent values. If the number of bits is less than the preset first matching threshold, the financial platform can consider that the mismatch rate meets the requirement and determine the second user quantum key. With the second platform quantum key The match was successful.
[0176] If the second platform quantum key matches the second user quantum key successfully, the financial platform executes S305 and S306; if the second platform quantum key matches the second user quantum key unsuccessfully, the financial platform terminates the transaction.
[0177] S305. When the second platform quantum key matches the second user quantum key, obtain the second transaction information in the second quantum signature information.
[0178] S306: Transfer the second resource corresponding to the second transaction information to the second user terminal.
[0179] Specifically, the financial platform can obtain the second quantum signature information S B The second transaction information m2 of the seller is obtained.
[0180] As mentioned above, the second transaction information m2 includes the second resource M2 that needs to be paid to the seller and the account BCC used to pay the seller. Accordingly, the financial platform can transfer the corresponding second resource M2 to the account BCC used to pay the seller based on the second resource M2 in the second transaction information m2, thereby completing the payment process to the seller.
[0181] It can be seen that in this embodiment, during the interaction between the second user end and the platform end, the second transaction information is sent to the platform end by using the second quantum signature information that cannot be changed and denied, so that after the platform end receives the second quantum signature information and successfully matches it, it can be considered that the obtained second transaction information has not been tampered with, so that it can be determined that the second resource paid to the second user end based on the second transaction information is correct.
[0182] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, an embodiment of the present application further provides a payment device.
[0183] refer to Figure 4 , the payment device, comprises: a receiving module 401, a matching module 402 and an execution module 403;
[0184] The receiving module 401 is used to receive first quantum signature information sent by the first user terminal, where the quantum signature information is obtained by the first user terminal signing the first transaction information based on the first user quantum key;
[0185] A matching module 402, configured to match a first platform quantum key on the platform side with a first user quantum key in the first quantum signature information;
[0186] The execution module 403 is used to obtain the first transaction information in the first quantum signature information when the first platform quantum key matches the first user quantum key, transfer the first resource corresponding to the first transaction information from the first user terminal, and send the first quantum signature information to the second user terminal, so that the second user terminal can perform transactions based on the first quantum signature information, wherein the first platform quantum key and the first user quantum key are generated by negotiation between the first user terminal and the platform terminal.
[0187] The matching module 402 is specifically used to: match the first platform quantum key with the first user quantum key in the first quantum signature information bit by bit;
[0188] Determine the number of bits where the match is inconsistent;
[0189] When the number of bits is less than a preset first matching threshold, it is determined that the first platform quantum key on the platform side matches the first user quantum key successfully.
[0190] Wherein, the first platform quantum key and the first user quantum key are both character strings;
[0191] The execution module 403 is specifically used to: after sending the first quantum signature information to the second user terminal, execute:
[0192] Receiving second quantum signature information sent by a second user terminal, where the second quantum signature information is obtained by the second user terminal signing the second transaction information based on a second user quantum key;
[0193] Matching the second platform quantum key on the platform end with the second user quantum key in the second quantum signature information;
[0194] When the second platform quantum key matches the second user quantum key, obtaining the second transaction information in the second quantum signature information, and transferring the second resource corresponding to the second transaction information to the second user terminal;
[0195] Among them, the second user quantum key and the second platform quantum key are negotiated between the second user end and the platform end.
[0196] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the embodiments of the present application also provide another payment device.
[0197] refer to Figure 5 , the payment device, comprises: a receiving module 501, a matching module 502 and an execution module 503;
[0198] The receiving module 501 is used to receive the first quantum signature information sent by the platform end, where the first quantum signature information is sent by the first user end to the platform end, and the first quantum signature information is obtained by the first user end signing the first transaction information based on the first user quantum key;
[0199] A matching module 502, configured to match a second user quantum key of a second user terminal with a first user quantum key in the first quantum signature information;
[0200] The execution module 503 is used to obtain the first transaction information in the first quantum signature information when the second user quantum key successfully matches the first user quantum key, and send the product resources corresponding to the first transaction information to the first user terminal, wherein the first user quantum key is generated by negotiation between the first user terminal and the platform terminal, and the second user quantum key is obtained by negotiation between the second user terminal and the platform terminal.
[0201] The matching module 502 is specifically used to: match the second user quantum key with the first user quantum key in the first quantum signature information bit by bit;
[0202] Determine the number of bits where the match is inconsistent;
[0203] When the number of bits is less than a preset second matching threshold, it is determined that the second user quantum key matches the first user quantum key successfully.
[0204] The second user quantum key and the first user quantum key are both character strings.
[0205] The execution module 503 is specifically used to: after sending the product resource corresponding to the first transaction information to the first user terminal, execute:
[0206] Receiving confirmation information sent by the first user terminal, where the confirmation information is reception information of the product resource;
[0207] Encapsulating information used to describe product resources sent by the second user end into second transaction information, and signing the second transaction information with the second user quantum key to obtain second quantum signature information;
[0208] The second quantum signature information is sent to the platform end, so that the platform end can perform transactions based on the second quantum signature information.
[0209] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0210] The electronic device may include a processor 601 and a memory 602 storing computer program instructions.
[0211] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0212] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.
[0213] In certain embodiments, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.
[0214] The processor 601 implements any one of the payment methods in the above embodiments by reading and executing the computer program instructions stored in the memory 602 .
[0215] In one example, the electronic device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.
[0216] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0217] Bus 610 includes hardware, software or both, and the components of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front-end bus (FSB), hypertransmission (Hyper Transport, HT) interconnection, industry standard architecture (IndustryStandard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0218] In addition, in combination with the payment method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the payment methods in the above embodiment is implemented.
[0219] An embodiment of the present application also provides a computer program product, including a computer program, which implements any one of the payment methods in the above embodiments when the computer program is processed and executed.
[0220] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0221] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0222] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0223] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0224] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A payment method, characterized in that: Applied to the platform side, the method includes: Receiving first quantum signature information sent by a first user terminal, where the first quantum signature information is obtained by the first user terminal signing first transaction information based on a first user quantum key; Matching a first platform quantum key of the platform end with a first user quantum key in the first quantum signature information; When the first platform quantum key successfully matches the first user quantum key, first transaction information in the first quantum signature information is obtained, a first resource corresponding to the first transaction information is transferred from the first user terminal, and the first quantum signature information is sent to a second user terminal, so that the second user terminal can perform a transaction based on the first quantum signature information; The first platform quantum key and the first user quantum key are generated by negotiation between the first user terminal and the platform terminal.
2. The payment method according to claim 1, characterized in that: The first platform quantum key and the first user quantum key are both strings; The matching of the first platform quantum key of the platform end with the first user quantum key in the first quantum signature information includes: Matching the first platform quantum key with the first user quantum key in the first quantum signature information bit by bit; Determine the number of bits where the match is inconsistent; When the number of bits is less than a preset first matching threshold, it is determined that the first platform quantum key of the platform end matches the first user quantum key successfully.
3. The payment method according to claim 1, characterized in that: After sending the first quantum signature information to the second user terminal, the method further includes: Receiving second quantum signature information sent by a second user terminal, where the second quantum signature information is obtained by the second user terminal signing the second transaction information based on the second user quantum key; Matching a second platform quantum key of the platform end with a second user quantum key in the second quantum signature information; When the second platform quantum key matches the second user quantum key successfully, obtaining the second transaction information in the second quantum signature information, and transferring the second resource corresponding to the second transaction information to the second user terminal; The second user quantum key and the second platform quantum key are obtained through negotiation between the second user terminal and the platform terminal.
4. A payment method, characterized in that: Applied to a second user terminal, the method includes: Receiving first quantum signature information sent by the platform end, where the first quantum signature information is sent by the first user end to the platform end, and the first quantum signature information is obtained by the first user end signing first transaction information based on a first user quantum key; Matching a second user quantum key of the second user terminal with a first user quantum key in the first quantum signature information; When the second user quantum key successfully matches the first user quantum key, obtaining the first transaction information in the first quantum signature information, and sending the product resources corresponding to the first transaction information to the first user terminal; Among them, the first user quantum key is generated by negotiation between the first user terminal and the platform terminal, and the second user quantum key is obtained by negotiation between the second user terminal and the platform terminal.
5. The payment method according to claim 4, characterized in that: The second user quantum key and the first user quantum key are both character strings; and the matching of the second user quantum key of the second user end with the first user quantum key in the first quantum signature information includes: Matching the second user quantum key with the first user quantum key in the first quantum signature information bit by bit; Determine the number of bits where the match is inconsistent; When the number of bits is less than a preset second matching threshold, it is determined that the second user quantum key matches the first user quantum key successfully.
6. The payment method according to claim 4, characterized in that: After sending the product resource corresponding to the first transaction information to the first user terminal, the method further includes: Receiving confirmation information sent by the first user terminal, wherein the confirmation information is reception information of the product resource; Encapsulating information used to describe the product resources sent by the second user end into second transaction information, and signing the second transaction information with the second user quantum key to obtain second quantum signature information; The second quantum signature information is sent to the platform end, so that the platform end performs a transaction based on the second quantum signature information.
7. A payment device, characterized in that: The device comprises: A receiving module, configured to receive first quantum signature information sent by a first user terminal, where the first quantum signature information is obtained by the first user terminal signing first transaction information based on a first user quantum key; A matching module, used to match a first platform quantum key on the platform end with a first user quantum key in the first quantum signature information; An execution module is used to obtain first transaction information in the first quantum signature information when the first platform quantum key matches the first user quantum key successfully, transfer a first resource corresponding to the first transaction information from the first user terminal, and send the first quantum signature information to a second user terminal, so that the second user terminal can perform a transaction based on the first quantum signature information, wherein the first platform quantum key and the first user quantum key are generated by negotiation between the first user terminal and the platform terminal.
8. A payment device, characterized in that: The device comprises: A receiving module, configured to receive first quantum signature information sent by the platform end, where the first quantum signature information is sent by the first user end to the platform end, and the first quantum signature information is obtained by the first user end signing the first transaction information based on the first user quantum key; A matching module, used to match a second user quantum key of a second user terminal with a first user quantum key in the first quantum signature information; An execution module is used to obtain the first transaction information in the first quantum signature information when the second user quantum key successfully matches the first user quantum key, and send the product resources corresponding to the first transaction information to the first user terminal, wherein the first user quantum key is generated by negotiation between the first user terminal and the platform terminal, and the second user quantum key is obtained by negotiation between the second user terminal and the platform terminal.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the payment method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the payment method according to any one of claims 1 to 6 is implemented.
11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the payment method as described in any one of claims 1 to 6.