WO2020000766A1 - 区块链红包的处理方法、装置、电子设备及介质 - Google Patents

区块链红包的处理方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2020000766A1
WO2020000766A1 PCT/CN2018/109563 CN2018109563W WO2020000766A1 WO 2020000766 A1 WO2020000766 A1 WO 2020000766A1 CN 2018109563 W CN2018109563 W CN 2018109563W WO 2020000766 A1 WO2020000766 A1 WO 2020000766A1
Authority
WO
WIPO (PCT)
Prior art keywords
red envelope
contract
red
payment
blockchain
Prior art date
Application number
PCT/CN2018/109563
Other languages
English (en)
French (fr)
Inventor
侯建
Original Assignee
北京金山安全软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京金山安全软件有限公司 filed Critical 北京金山安全软件有限公司
Publication of WO2020000766A1 publication Critical patent/WO2020000766A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Definitions

  • the present application relates to the field of Internet technology, and in particular, to a method, a device, an electronic device, and a medium for processing a block chain red envelope.
  • Blockchain technology has been widely used in e-commerce, securities trading, and the Internet of Things.Blockchain technology, with its characteristics of decentralization, immutability and traceability, provides users with Activities such as financial transactions facilitated.
  • the method of transferring funds on the blockchain platform is mainly between individuals, and the method of transferring funds is relatively simple.
  • This application is intended to solve at least one of the technical problems in the related technology.
  • the first purpose of this application is to propose a method for processing a block chain red envelope.
  • This method introduces a server as an intermediary between the client and the smart contract for task interaction.
  • the server implements the issuance and receipt of blockchain red envelopes, which makes up for the shortcomings of smart contracts that cannot handle complex fund transfer tasks. Users can obtain red envelopes by grabbing red envelopes.
  • the amount of money has enriched the way in which the blockchain platform transfers funds, and has increased the interest of the blockchain platform in transferring funds.
  • the second purpose of this application is to propose a processing device for a blockchain red envelope.
  • a third object of the present application is to propose an electronic device.
  • a fourth object of the present application is to propose a computer-readable storage medium.
  • an embodiment of the first aspect of the present application proposes a method for processing a blockchain red envelope, including the following steps:
  • red envelope request Receiving a red envelope request and corresponding payment information sent by the initiating terminal, where the red envelope request includes red envelope information
  • a red packet grab request of the receiving terminal is obtained, and a corresponding amount is allocated to the red packet grab request, and the corresponding amount is forwarded to the account of the receiving terminal.
  • the method for processing a red envelope of a blockchain in the embodiment of the present application first receives a red envelope request and corresponding payment information sent by an originating terminal, and then generates a red envelope contract according to the red envelope information in the red envelope request, and pays the red envelope contract according to the payment information.
  • the main chain of the blockchain is polled to determine whether the payment of the red envelope contract by the payment information is successful. If the payment is determined to be successful, a red packet grab request from the receiving terminal is obtained, and a corresponding amount is allocated to the red packet grab request, and Forward the corresponding amount to the account of the receiving terminal. Therefore, this method introduces a server as an intermediary for client-to-smart task interactions.
  • the server implements the issuance and receipt of blockchain red envelopes, which makes up for the lack of smart contracts that cannot handle complex fund transfer tasks. Users can grab red envelopes by Obtaining the amount in the red envelope enriches the way the blockchain platform transfers funds, and improves the fun of the blockchain platform's transfer of funds.
  • the method for processing a block chain red envelope further includes: if it is determined that the payment is unsuccessful, returning the payment amount corresponding to the payment information minus the reserved fee Gas amount to the originating terminal. Account.
  • the method for processing a blockchain red envelope further includes: generating a red envelope link according to the red envelope contract, and returning to the originating terminal so that the originating terminal is shared with the receiving terminal.
  • paying the red envelope contract according to the payment information specifically includes: paying the red envelope contract after subtracting the reserved Gas amount according to the payment amount corresponding to the payment information.
  • the method for processing a blockchain red envelope further includes: judging whether the red envelope contract has expired; if it is judged that the red envelope contract has expired, a gas amount corresponding to the number of remaining unrobbed red envelope receiving clients And the remaining amount of the red envelope is returned to the account of the originating terminal.
  • an embodiment of the second aspect of the present application proposes a block chain red envelope processing device, including:
  • a receiving module configured to receive a red packet request and corresponding payment information sent by an originating terminal, wherein the red packet request includes red packet information
  • a generating module configured to generate a red envelope contract according to the red envelope information, and pay the red envelope contract according to the payment information;
  • a judging module configured to poll a blockchain main chain according to the payment information to determine whether the payment made to the red envelope contract by the payment information is successful
  • a processing module is configured to, if it is judged that the payment is successful, obtain a red packet grab request of the receiving terminal, allocate a corresponding amount to the red packet grab request, and forward the corresponding amount to the account of the receiving terminal.
  • the block chain red envelope processing device in the embodiment of the present application first receives a red envelope request and corresponding payment information sent by an originating terminal, and then generates a red envelope contract according to the red envelope information in the red envelope request, and pays the red envelope contract according to the payment information.
  • the main chain of the blockchain is polled to determine whether the payment of the red envelope contract by the payment information is successful. If the payment is determined to be successful, a red packet grab request from the receiving terminal is obtained, and a corresponding amount is allocated to the red packet grab request, and Forward the corresponding amount to the account of the receiving terminal. Therefore, the device introduces a server as an intermediary between the client and the smart contract for task interaction.
  • the server implements the issuance and reception of blockchain red envelopes, which makes up for the lack of smart contracts that cannot handle complex fund transfer tasks. Users can grab red envelopes by Obtaining the amount in the red envelope enriches the way the blockchain platform transfers funds, and improves the fun of the blockchain platform's transfer of funds.
  • processing device of the blockchain red envelope may also have the following additional technical features:
  • the processing module is further configured to, if it is determined that the payment is unsuccessful, return the payment amount corresponding to the payment information to the account of the originating terminal after deducting the reserved handling fee Gas amount.
  • the block chain red envelope processing device further includes: a sharing module for generating a red envelope link according to the red envelope contract, and returning to the originating terminal to enable the originating terminal to share to the originating terminal.
  • a sharing module for generating a red envelope link according to the red envelope contract, and returning to the originating terminal to enable the originating terminal to share to the originating terminal.
  • the generating module is specifically configured to pay the red envelope contract after a payment amount corresponding to the payment information minus a reserved Gas amount.
  • the processing device for a blockchain red envelope further includes: a refund module for determining whether the red envelope contract has expired; if it is judged that the red envelope contract has expired, receiving the remaining unrobbed red envelopes The Gas amount corresponding to the number of clients and the remaining amount of the red envelope are returned to the account of the originating terminal.
  • an embodiment of the third aspect of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor.
  • the processor executes the program, , To realize the method for processing the blockchain red envelope as described in the above embodiment.
  • an embodiment of the fourth aspect of the present application proposes a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the processing of the blockchain red envelope according to the foregoing embodiment is performed. method.
  • FIG. 1 is a schematic flowchart of a method for processing a blockchain red envelope according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a specific method for processing a blockchain red envelope according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of a block chain red envelope processing device according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of another block chain red envelope processing device according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the execution subject of the method for processing a blockchain red envelope may be a blockchain red envelope processing server.
  • FIG. 1 is a schematic flowchart of a method for processing a blockchain red envelope according to an embodiment of the present application. As shown in Figure 1, the processing method of the blockchain red envelope includes the following steps:
  • Step 101 Receive a red envelope request and corresponding payment information sent by an originating terminal, where the red envelope request includes red envelope information.
  • the initiating terminal receives a user operation and sends a red envelope request and payment information corresponding to the red envelope request to the server.
  • the red envelope request includes the red envelope information input by the user at the originating terminal.
  • the user can operate in the interface of the originating terminal to input red envelope information.
  • the red envelope information can include the amount of red envelopes, the number of red envelopes, and curses.
  • the originating terminal can generate a red envelope request based on the red envelope information input by the user.
  • payment information corresponding to the red envelope request is generated, and the payment information includes the red envelope amount corresponding to the red envelope request and the name information of the red envelope transaction.
  • the originating terminal after the originating terminal initiates a red envelope request, the originating terminal calls the transfer module in the blockchain platform to transfer the amount of the red envelope from the account registered by the originating terminal to the account registered by the server, so that Subsequent payments are made to the red envelope contract on the blockchain platform.
  • the server After successfully transferring the amount of the red envelope to the account registered by the server, the server receives the red envelope request and the corresponding payment information sent by the initiating terminal, which facilitates the next step of generating the red envelope contract.
  • the red envelope contract generation process will be described in subsequent steps. This step is not repeated here.
  • Step 102 Generate a red envelope contract according to the red envelope information, and pay the red envelope contract according to the payment information.
  • the red envelope contract is a smart contract for processing red envelope transactions on the blockchain platform.
  • the red envelope contract specifies the steps and rules that the red envelope sending and receiving terminals need to perform during the processing of the red envelope of the blockchain.
  • the server Based on the rules preset by the blockchain platform, the server generates a red envelope contract that is suitable for this red envelope transaction based on the red envelope information sent by the initiating terminal.
  • the red envelope contract is transmitted on the blockchain network through point-to-point transmission.
  • Each verification node in the chain network receives and stores the red envelope contract, in order to trigger consensus and processing of the red envelope contract when the contract trigger conditions are subsequently met.
  • the server needs to verify the payment information before paying the red envelope contract according to the payment information.
  • the blockchain can be polled to determine whether the originating terminal will red envelope. The amount is transferred from the account registered by the originating terminal to the account registered by the server.
  • the server pays the red envelope contract according to the payment information.
  • the server may pay the red envelope contract according to the payment amount corresponding to the payment information minus the reserved Gas amount.
  • the server transfers the remaining amount of the payment amount minus the Gas amount from the account of the server to the account of the red envelope contract to realize payment of the red envelope contract.
  • the gas amount is the additional consumption amount generated during the processing of the red envelope contract, and the gas amount is determined by the complexity of the content of the red envelope contract. For example, the more code is executed during the processing of the red envelope contract, the larger the gas amount needs to be reserved . Therefore, the server reserves a corresponding Gas amount in the server account in advance according to the red envelope contract in order to pay the amount required for subsequent execution of the red envelope contract.
  • the server may enable the receiving end user to obtain the red envelope connection in different ways.
  • the server may enable the receiving end user to obtain the red envelope connection in different ways.
  • the server sends the red envelope connection to the user of the sending terminal, and the sending terminal user shares the red envelope link to the user of the receiving terminal through a social application.
  • Step 103 Polling the blockchain main chain according to the payment information to determine whether the payment of the red envelope contract by the payment information is successful.
  • the server polls the verification nodes on the main chain of the blockchain according to the payment information, and polls each verification node to determine whether there is a consensus on the payment result of the red envelope contract, so as to determine the payment of the red envelope contract in the red envelope task. whether succeed.
  • each node on the main chain of the blockchain first verifies the name information of the red envelope contract to determine the timeliness of the red envelope contract, and then sends the red envelope contract to the set to be consensus, By determining whether most of the verification nodes on the blockchain's main chain have reached a consensus of successful payment, it is determined whether the payment made by the red envelope contract is successful.
  • Step 104 if it is determined that the payment is successful, obtain a red packet grab request of the receiving terminal, allocate a corresponding amount to the red packet grab request, and forward the corresponding amount to the account of the receiving terminal.
  • the server starts to execute a subsequent red packet grabbing process.
  • the server After the server obtains the red packet grabbing request sent by the receiving terminal, it allows the receiving terminal to connect to the red packet grabbing interface of the server, and randomly generates an amount corresponding to the red packet grabbing request within the amount contained in the red envelope contract account, and then forwards the amount to the receiving terminal. Account.
  • the payment of the red envelope contract is unsuccessful.
  • the payment amount corresponding to the payment information minus the reservation The amount of the commission gas will be returned to the account of the originating terminal.
  • the server can further verify the red envelope contract's receipt status before transferring the account to the receiving terminal's account. If it is confirmed that the amount of the red envelope has reached the red envelope contract account, the server transfers the red envelope contract The transfer interface sends the corresponding amount of red envelopes to the receiving end account.
  • the method for processing the red envelope of the blockchain in the embodiment of the present application first receives the red envelope request and corresponding payment information sent by the initiating terminal, and then generates a red envelope contract based on the red envelope information in the red envelope request, and according to the payment information Pay for the red envelope contract, and then poll the blockchain main chain according to the payment information to determine whether the payment of the red envelope contract was successful. If the payment is determined to be successful, obtain the red packet grab request from the receiving terminal and allocate the red packet grab request. The corresponding amount is forwarded to the account of the receiving terminal. Therefore, this method introduces a server as an intermediary for client-to-smart task interactions.
  • the server implements the issuance and receipt of blockchain red envelopes, which makes up for the lack of smart contracts that cannot handle complex fund transfer tasks. Users can grab red envelopes by Obtaining the amount in the red envelope enriches the way the blockchain platform transfers funds, and improves the fun of the blockchain platform's transfer of funds.
  • FIG. 2 is a schematic flowchart of a specific method for processing a blockchain red envelope according to an embodiment of the present application. As shown in FIG. 2, the method includes:
  • Step 201 Determine whether the red envelope contract has expired.
  • the server first queries the generation date of the red envelope contract on the blockchain platform according to the name information of the red envelope contract, and then checks whether the existence time of the red envelope contract exceeds the preset validity period in the red envelope contract. If the red envelope contract exceeds the preset The validity period is judged to be expired.
  • step 202 if it is determined that the red envelope contract has expired, the Gas amount and the remaining amount of the red envelope corresponding to the remaining number of unrobbed red envelope receiving terminals are returned to the account of the originating terminal.
  • the server reserves a corresponding amount according to the number of receiving terminals as the amount of Gas transferred to the receiving terminal account. If the receiving terminal does not grab the red envelope within the valid period of the red envelope contract, the red envelope There is a corresponding amount of untransmitted red envelopes in the contract account, and a gas amount corresponding to the number of receiving and receiving terminals in the server account. Therefore, in order to avoid the loss of user funds, the server returns the Gas amount and the remaining amount of the red envelope corresponding to the number of remaining unrobbed red envelope receiving terminals to the account of the originating terminal.
  • the server first calls the transfer interface of the red envelope contract, transfers the remaining Gas amount to the account of the red envelope contract, and then confirms that the red envelope contract has been polled by polling the verification node of the main chain of the blockchain. After receiving the remaining Gas amount, the transfer interface of the red envelope contract is called, and the remaining Gas amount and the remaining amount of the Red envelope are returned to the account of the originating terminal together.
  • the method for processing a red envelope of a blockchain in the embodiment of the present application first determines whether a red envelope contract has expired. If a red envelope has not been received after the red envelope contract has expired, the remaining amount of the unreceived red envelope receiving terminal is corresponding to the Gas amount and the remaining red envelope. The amount is returned to the account of the originating terminal. Therefore, this method avoids the loss of end-user funds when the blockchain red envelope is not claimed, ensures the safety of the user's funds, and improves the reliability of the red envelope contract.
  • red envelope request When user A wishes to transfer funds to friends by sending red envelopes, user A can initiate a red envelope request through a decentralized application (Dapp) in the terminal device.
  • Dapp decentralized application
  • user A can send a red envelope in the Dapp Browser
  • the red envelope interface enters the red envelope page, and enters the red envelope amount, number of red envelopes, and $9s on the red envelope page.
  • voice red envelope When user A chooses to send a voice red envelope, he can also set a red envelope voice password.
  • the Dapp Browser client invokes the transfer function of the blockchain platform. After user A pays the red envelope amount on the transfer interface, clicks the confirmation button, and the red envelope amount is transferred to the account of the Dapp Browser server.
  • the DappBrowser server generates a red envelope contract and pays the red envelope contract according to the red envelope information confirmed by user A.
  • the red envelope amount transferred by the user can be a currency applied on the blockchain platform such as ether and bitcoin.
  • the Dapp Browser client generates a red packet grab link, and the user A can share the red packet grab link to a friend in the DappBrowser address book to remind the user A's friend to grab a red packet.
  • users B and C received the red envelope grabbing link on the Dapp Browser client, click the link to enter the red envelope grabbing interface, and then the Dapp Browser server randomly allocated a certain amount of money to the client accounts of the red envelope grabbing users such as User B and User C. in.
  • FIG. 3 is a schematic structural diagram of a block chain red envelope processing device provided in an embodiment of the present application, as shown in FIG. 3,
  • the processing device of the blockchain red envelope includes: a receiving module 100, a generating module 200, a determining module 300, and a processing module 400.
  • the receiving module 100 is configured to receive a red packet request and corresponding payment information sent by an initiating terminal, where the red packet request includes red packet information.
  • the generating module 200 is configured to generate a red envelope contract according to the red envelope information, and pay the red envelope contract according to the payment information.
  • the judging module 300 is configured to poll the blockchain main chain according to the payment information to determine whether the payment of the red envelope contract by the payment information is successful.
  • the processing module 400 is configured to, if it is determined that the payment is successful, obtain a red packet grab request of the receiving terminal, allocate a corresponding amount to the red packet grab request, and forward the corresponding amount to the account of the receiving terminal.
  • the generating module 200 is specifically configured to pay the red envelope contract after the payment amount corresponding to the payment information minus the reserved Gas amount.
  • processing module 400 is further configured to, if it is judged that the payment is unsuccessful, return the payment amount corresponding to the payment information to the account of the originating terminal after deducting the reserved handling fee Gas amount.
  • the method further includes a sharing module 310 and a refund module 610.
  • the sharing module 310 is configured to generate a red envelope link according to the red envelope contract, and return the link to the originating terminal to share the originating terminal to the receiving terminal.
  • the refund module 610 is used to determine whether the red envelope contract has expired; if it is judged that the red envelope contract has expired, the Gas amount and the remaining amount of the red envelope corresponding to the number of remaining unrobbed red envelope receiving clients are returned to the account of the originating terminal.
  • the block chain red envelope processing device in the embodiment of the present application first receives the red envelope request and corresponding payment information sent by the initiating terminal, and then generates a red envelope contract based on the red envelope information in the red envelope request, and according to the payment information Pay for the red envelope contract, and then poll the blockchain main chain according to the payment information to determine whether the payment of the red envelope contract was successful. If the payment is determined to be successful, obtain the red packet grab request from the receiving terminal and allocate the red packet grab request. The corresponding amount is forwarded to the account of the receiving terminal. Therefore, the device introduces a server as an intermediary between the client and the smart contract for task interaction.
  • the server implements the issuance and reception of blockchain red envelopes, which makes up for the lack of smart contracts that cannot handle complex fund transfer tasks. Users can grab red envelopes by Obtaining the amount in the red envelope enriches the way the blockchain platform transfers funds, and improves the fun of the blockchain platform's transfer of funds.
  • the present application also proposes an electronic device including: a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the program, the implementation is implemented as described above.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 5 shows a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application.
  • the electronic device 12 shown in FIG. 5 is merely an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present application.
  • the electronic device 12 is expressed in the form of a general-purpose computing device.
  • the components of the electronic device 12 may include, but are not limited to, one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
  • the bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local area bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, Industry Standard Architecture (hereinafter referred to as ISA) bus, Micro Channel Architecture (hereinafter referred to as MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
  • ISA Industry Standard Architecture
  • MAC Micro Channel Architecture
  • VESA Video Electronics Standards Association
  • PCI Peripheral Component Interconnection
  • Electronic device 12 typically includes a variety of computer system-readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
  • the system memory 28 may include a computer system readable medium in the form of volatile memory, such as Random Access Memory (hereinafter referred to as RAM) 30 and / or cache memory 32.
  • RAM Random Access Memory
  • the electronic device 12 may further include other removable / non-removable, volatile / nonvolatile computer system storage media.
  • the storage system 34 may be used to read and write non-removable, non-volatile magnetic media (not shown in FIG. 5 and is commonly referred to as a "hard drive").
  • a disk drive for reading and writing to a removable non-volatile disk (for example, a “floppy disk”) and a removable non-volatile optical disk (for example, a compact disk read-only memory (Compact Disc ReadRead Only Memory (hereinafter referred to as: CD-ROM), Digital Video Disc (Digital Video Read Read Only Memory; hereinafter referred to as: DVD-ROM) or other optical media) read and write optical disc drive.
  • each drive may be connected to the bus 18 through one or more data medium interfaces.
  • the system memory 28 may include at least one program product having a set (eg, at least one) program module configured to perform the functions of the embodiments of the present application.
  • a program / utility tool 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28.
  • Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and programs Data, each or some combination of these examples may include an implementation of the network environment.
  • the program module 42 generally performs functions and / or methods in the embodiments described in this application.
  • the electronic device 12 may also communicate with one or more external devices 14 (such as a keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or with Any device (such as a network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. This communication can be performed through an input / output (I / O) interface 22.
  • the electronic device 12 may also be connected to one or more networks (such as a local area network (hereinafter referred to as a LAN), a wide area network (hereinafter referred to as a WAN), and / or a public network such as the Internet through the network adapter 20. ) Communication. As shown in FIG.
  • the network adapter 20 communicates with other modules of the electronic device 12 through the bus 18. It should be understood that although not shown in FIG. 5, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tapes Drives and data backup storage systems.
  • the processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, to implement the processing method of the blockchain red envelope mentioned in the foregoing embodiment.
  • the present application also proposes a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the method for processing a blockchain red envelope according to the foregoing embodiment is implemented.
  • each part of the application may be implemented by hardware, software, firmware, or a combination thereof.
  • multiple steps or methods may be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it may be implemented using any one or a combination of the following techniques known in the art: Discrete logic circuits, application specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or integrated.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, the indirect coupling or communication connection of the device or unit, and may be electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium , Including a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
  • the foregoing storage media include: U disks, Read-Only Memory (ROM), Random Access Memory (RAM), mobile hard disks, magnetic disks, or optical disks, and other media that can store program codes .

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种区块链红包的处理方法、装置、电子设备及介质,其中,方法包括:接收发起终端发送的发红包请求和对应的支付信息,其中,发红包请求包括红包信息(S101);根据红包信息生成红包合约,并根据支付信息对红包合约进行支付(S102);根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支付是否成功(S103);如果判断支付成功,则获取接收终端的抢红包请求,并对抢红包请求分配相应的金额,并将相应的金额转发至接收终端的账户(S104)。由此,该方法通过服务器实现区块链红包的发放和接收,丰富了区块链平台转移资金的方式,提高了区块链平台转移资金的趣味性。

Description

区块链红包的处理方法、装置、电子设备及介质
相关申请的交叉引用
本申请要求北京金山安全软件有限公司于2018年06月29日提交的、申请名称为“区块链红包的处理方法、装置、电子设备及介质”的、中国专利申请号“201810714373.3”的优先权。
技术领域
本申请涉及互联网技术领域,尤其涉及一种区块链红包的处理方法、装置、电子设备及介质。
背景技术
随着互联网技术的发展,区块链技术已经广泛应用于电子商务、证券交易和物联网等领域,区块链技术凭借其去中心化、不可篡改和可追踪等特点,为用户在支付清算和金融交易等方面的活动提供了便利。
然而,在区块链平台上进行资金转移的方式主要是个人间的转账,资金转移方式较为单一。
申请内容
本申请旨在至少在一定程度上解决相关技术中的技术问题之一。
为此,本申请的第一个目的在于提出一种区块链红包的处理方法。该方法引入服务器作为客户端与智能合约进行任务交互的中介,通过服务器实现区块链红包的发放和接收,弥补了智能合约无法处理复杂的资金转移任务的不足,用户可以通过抢红包获取红包中的金额,丰富了区块链平台转移资金的方式,提高了区块链平台转移资金的趣味性。
本申请的第二个目的在于提出一种区块链红包的处理装置。
本申请的第三个目的在于提出一种电子设备。
本申请的第四个目的在于提出一种计算机可读存储介质。
为达上述目的,本申请第一方面实施例提出了一种区块链红包的处理方法,包括以下步骤:
接收发起终端发送的发红包请求和对应的支付信息,其中,发红包请求包括红包信息;
根据红包信息生成红包合约,并根据支付信息对红包合约进行支付;
根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支付是否成功;以及
如果判断所述支付成功,则获取接收终端的抢红包请求,并对所述抢红包请求分配相应的金额,并将相应的金额转发至所述接收终端的账户。
本申请实施例的区块链红包的处理方法,首先接收发起终端发送的发红包请求和对应的支付信息,然后根据发红包请求中的红包信息生成红包合约,并根据支付信息对红包合约进行支付,进而根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支付是否成功,若判断支付成功,则获取接收终端的抢红包请求,并对抢红包请求分配相应的金额,并将相应的金额转发至接收终端的账户。由此,该方法引入服务器作为客户端与智能合约进行任务交互的中介,通过服务器实现区块链红包的发放和接收,弥补了智能合约无法处理复杂的资金转移任务的不足,用户可以通过抢红包获取红包中的金额,丰富了区块链平台转移资金的方式,提高了区块链平台转移资金的趣味性。
另外,根据本申请上述实施例的区块链红包的处理方法,还可以具有如下附加的技术特征:
在本申请一个实施例中,区块链红包的处理方法还包括:如果判断支付不成功,则将所述支付信息对应的支付金额减去预留手续费Gas金额之后返还给所述发起终端的账户。
在本申请一个实施例中,区块链红包的处理方法还包括:根据所述红包合约生成红包链接,并返回至所述发起终端以使所述发起终端分享至所述接收终端。
在本申请一个实施例中,根据所述支付信息对所述红包合约进行支付具体包括:根据支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
在本申请一个实施例中,区块链红包的处理方法还包括:判断所述红包合约是否过期;如果判断所述红包合约过期,则将剩余的未抢红包的接收客户端数量对应的Gas金额和红包剩余金额返回至所述发起终端的账户。
为达上述目的,本申请第二方面实施例提出了一种区块链红包的处理装置,包括:
接收模块,用于接收发起终端发送的发红包请求和对应的支付信息,其中,所述发红包请求包括红包信息;
生成模块,用于根据所述红包信息生成红包合约,并根据所述支付信息对所述红包合约进行支付;
判断模块,用于根据所述支付信息轮询区块链主链以判断所述支付信息对所述红包合约进行的支付是否成功;以及
处理模块,用于如果判断所述支付成功,则获取接收终端的抢红包请求,并对所述抢红包请求分配相应的金额,并将相应的金额转发至所述接收终端的账户。
本申请实施例的区块链红包的处理装置,首先接收发起终端发送的发红包请求和对应 的支付信息,然后根据发红包请求中的红包信息生成红包合约,并根据支付信息对红包合约进行支付,进而根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支付是否成功,若判断支付成功,则获取接收终端的抢红包请求,并对抢红包请求分配相应的金额,并将相应的金额转发至接收终端的账户。由此,该装置引入服务器作为客户端与智能合约进行任务交互的中介,通过服务器实现区块链红包的发放和接收,弥补了智能合约无法处理复杂的资金转移任务的不足,用户可以通过抢红包获取红包中的金额,丰富了区块链平台转移资金的方式,提高了区块链平台转移资金的趣味性。
另外,根据本申请上述实施例的区块链红包的处理装置,还可以具有如下附加的技术特征:
在本申请一个实施例中,处理模块,还用于如果判断支付不成功,则将所述支付信息对应的支付金额减去预留手续费Gas金额之后返还给所述发起终端的账户。
在本申请一个实施例中,区块链红包的处理装置,还包括:分享模块,用于根据所述红包合约生成红包链接,并返回至所述发起终端以使所述发起终端分享至所述接收终端。
在本申请一个实施例中,生成模块具体用于:所述支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
在本申请一个实施例中,区块链红包的处理装置,还包括:退款模块,用于判断所述红包合约是否过期;如果判断所述红包合约过期,则将剩余的未抢红包的接收客户端数量对应的Gas金额和红包剩余金额返回至所述发起终端的账户。
为达上述目的,本申请第三方面实施例提出了一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如上述实施例所述的区块链红包的处理方法。
为达上述目的,本申请第四方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述实施例所述的区块链红包的处理方法。
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种区块链红包的处理方法的流程示意图;
图2为本申请实施例所提供的一种具体的区块链红包的处理方法的流程示意图;
图3为本申请实施例所提供的一种区块链红包的处理装置的结构示意图;
图4为本申请实施例所提供的另一种区块链红包的处理装置的结构示意图;以及
图5为本申请实施例所提供的一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
下面参考附图描述本申请实施例的区块链红包的处理方法、装置、电子设备及介质。
其中,本申请实施例的区块链红包的处理方法的执行主体可以是区块链红包处理服务器。
图1为本申请实施例所提供的一种区块链红包的处理方法的流程示意图。如图1所示,该区块链红包的处理方法包括以下步骤:
步骤101,接收发起终端发送的发红包请求和对应的支付信息,其中,红包请求包括红包信息。
具体的,发起终端接收用户操作,将发红包请求和与发红包请求对应的支付信息发给服务器。其中,发红包请求包括用户在发起终端输入的红包信息。具体来说,用户可以在发起终端的界面内操作,从而输入红包信息,例如红包信息可以包括红包金额、红包个数及祝福语等,发起终端可以根据用户输入的红包信息生成发红包请求。进而生成发红包请求对应的支付信息,支付信息包括本次发红包请求对应的红包金额和发红包交易的名称信息等。
在一种可能的实现方式中,当发起终端发起发红包请求后,发起终端调用区块链平台中的转账模块,将红包金额从发起终端注册的账户中转移到服务端注册的账户中,以便后续对区块链平台上的红包合约进行支付。
进一步的,在成功将红包金额转移到服务端注册的账户之后,服务器接收发起终端发送的发红包请求和对应的支付信息,便于下一步生成红包合约,红包合约生成过程将在后续步骤中描述,本步骤中不再赘述。
步骤102,根据红包信息生成红包合约,并根据支付信息对红包合约进行支付。
其中,红包合约是区块链平台上处理红包交易的智能合约,红包合约规定了处理区块链红包过程中,红包发送终端和接收终端需要执行的步骤及遵守的规则等。服务器在区块 链平台预设的规则的基础上,根据发起终端发送的红包信息生成适用于本次红包交易的红包合约后,红包合约通过点对点传输的方式在区块链网络中传播,区块链网络中的各验证节点接收并存储该红包合约,以便在后续满足合约触发条件时,触发对该红包合约的共识和处理。
需要说明的是,为了进一步保证本次红包交易的可靠性,服务器根据支付信息对红包合约进行支付之前,需要对支付信息进行验证,具体可以通过轮询区块链,以确定发起终端是否将红包金额从发起终端注册的账户中转移到服务端注册的账户中。
进一步的,为了实现执行红包合约的触发条件,服务器根据支付信息对红包合约进行支付。作为一种可能的实现方式,服务器可以根据支付信息对应的支付金额减去预留Gas金额后对红包合约进行支付。
具体的,服务器将支付金额减去Gas金额后的剩余金额从服务器的账户中转移到红包合约的账户中,实现对红包合约的支付。其中,Gas金额是处理红包合约过程中产生的额外的消耗金额,Gas金额由红包合约内容的复杂程度确定,比如,处理红包合约的过程中执行的代码越多,则需要预留Gas金额越大。从而,服务器根据红包合约预先在服务器账户中预留相应的Gas金额,以便支付后续执行红包合约所需的金额。
需要说明的是,为了使接收终端用户获取红包中的金额,服务器可以通过不同的方式使接收终端用户获取红包连接。作为一种示例,服务器根据红包合约生成红包链接后,把红包连接发送给发送终端的用户,发送终端用户通过社交应用将红包链接分享给接收终端的用户。
步骤103,根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支付是否成功。
具体的,服务器根据支付信息轮询区块链主链上的验证节点,通过轮询各验证节点是否对该红包合约的支付结果产生共识,以判断本次发红包任务中对红包合约进行的支付是否成功。
具体实现时,作为一种可能的实现方式,区块链主链上的各节点首先对红包合约的名称信息进行验证,以判断该红包合约的时效性,然后将红包合约发送至待共识集合,通过确定区块链主链上的多数验证节点是否达成支付成功的共识,以判断红包合约进行的支付是否成功。
步骤104,如果判断支付成功,则获取接收终端的抢红包请求,并对抢红包请求分配相应的金额,并将相应的金额转发至接收终端的账户。
具体的,如果确定支付成功,服务器则开始执行后续的抢红包过程。
下面将对抢红包过程进行详细说明。
服务器获取到接收终端发送的抢红包请求后,允许接收终端连接服务器的抢红包接口,并在红包合约账户含有的金额范围内随机产生该抢红包请求对应的金额,然后将该金额转发至接收终端的账户。
当然,实际应用中受外界因素的影响,可能存在对红包合约支付不成功的情况,比如,在本申请一个实施例中,如果判断支付不成功,则将支付信息对应的支付金额减去预留手续费Gas金额之后返还给发起终端的账户。
需要说明的是,为了进一步降低执行红包合约的风险,服务器在向接收终端的账户转账之前,可以进一步核实红包合约的到账情况,若确认红包金额到达红包合约账户中,则服务器调起红包合约的转账接口,将相应的红包金额发送至接收端账户。
综上所述,本申请实施例的区块链红包的处理方法,首先接收发起终端发送的发红包请求和对应的支付信息,然后根据发红包请求中的红包信息生成红包合约,并根据支付信息对红包合约进行支付,进而根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支付是否成功,若判断支付成功,则获取接收终端的抢红包请求,并对抢红包请求分配相应的金额,并将相应的金额转发至接收终端的账户。由此,该方法引入服务器作为客户端与智能合约进行任务交互的中介,通过服务器实现区块链红包的发放和接收,弥补了智能合约无法处理复杂的资金转移任务的不足,用户可以通过抢红包获取红包中的金额,丰富了区块链平台转移资金的方式,提高了区块链平台转移资金的趣味性。
基于上述实施例,在实际应用中,可能存在红包在规定期限内没有被领取而导致红包过期的现象,为了避免用户资金的丢失,本申请实施例提出了一种具体的区块链红包的处理方法,图2为本申请实施例所提供的一种具体的区块链红包的处理方法的流程示意图,如图2所示,该方法包括:
步骤201,判断红包合约是否过期。
具体的,服务器首先根据红包合约的名称信息,在区块链平台上查询红包合约的生成日期,然后检测红包合约的存在时间是否超出红包合约内预设的有效期限,若红包合约超出预设的有效期限,则判断红包合约过期。
步骤202,如果判断红包合约过期,则将剩余的未抢红包的接收终端数量对应的Gas金额和红包剩余金额返回至发起终端的账户。
需要说明的是,服务器对红包合约进行支付前,会根据接收终端数量预留相应的金额作为向接收终端账户转账的Gas金额,若在红包合约的有效期限内部分接收终端未抢红包,则红包合约账户中存在未转账的红包的相应金额,以及服务器账户中存在收终端数量对应的Gas金额。从而,为了避免用户资金的丢失,服务器将剩余的未抢红包的接收终端数量对应的Gas金额和红包剩余金额返回至发起终端的账户。
具体实现时,作为一种可能的实现方式,服务器首先调用红包合约的转账接口,将剩余的Gas金额转移到红包合约的账户中,然后通过轮询区块链主链的验证节点确认红包合约已收到剩余的Gas金额后,调用红包合约的转账接口,将剩余的Gas金额和红包剩余金额一起退还到发起终端的账户中。
本申请实施例的区块链红包的处理方法,首先判断红包合约是否过期,若红包合约过期后存在未被领取的红包,则将剩余的未抢红包的接收终端数量对应的Gas金额和红包剩余金额返回至发起终端的账户。由此,该方法避免了区块链红包未被领取时,发起终端用户资金的丢失,保证了用户的资金安全,提高了红包合约的可靠性。
为了更加清楚地描述前述实施例中所述的区块链红包处理方法的实现过程,下面以一个具体实施例进行详细说明。
当用户A希望通过以发红包的方式向朋友转移资金时,用户A可以通过终端设备中的去中心化应用(Decentralized Application,简称Dapp)发起发红包请求,比如,用户A可以在Dapp Browser的发红包接口进入发红包页面,并在发红包页面上输入红包金额、红包个数及祝福语,当用户A选择发送语音红包时,还可以设置红包的语音口令等。用户A确认输入的红包信息后,Dapp Browser客户端调用区块链平台的转账功能,用户A在转账界面支付红包金额后,点击确认按键,然后红包金额转移到Dapp Browser服务器的账户中,进一步的Dapp Browser服务器根据用户A确认的红包信息生成红包合约,并对红包合约进行支付,其中,用户转移的红包金额可以是以太币和比特币等在区块链平台上应用的货币。进一步的,Dapp Browser客户端产生抢红包链接,用户A可以将抢红包链接分享给Dapp Browser通讯录中的好友,提醒用户A的好友抢红包。用户B和用户C等在Dapp Browser客户端接受到抢红包链接后,点击链接进入抢红包界面,进而Dapp Browser服务器随机分配一定量的金额转移到用户B和用户C等抢红包用户的客户端账户中。用户A和抢红包的用户还可以通过Dapp Browser客户端的红包详情页,查看红包的到账情况,以及每个人抢到的红包金额等。由此,通过Dapp Browser服务器实现区块链红包的发放和接收,丰富了在用户A和好友间转移资金的方式。
为了实现上述实施例,本申请还提出了一种区块链红包的处理装置,图3为本申请实施例所提供的一种区块链红包的处理装置的结构示意图,如图3所示,该区块链红包的处理装置包括:接收模块100、生成模块200、判断模块300和处理模块400。
其中,接收模块100,用于接收发起终端发送的发红包请求和对应的支付信息,其中,发红包请求包括红包信息。
生成模块200,用于根据红包信息生成红包合约,并根据支付信息对红包合约进行支付。
判断模块300,用于根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支 付是否成功。
处理模块400,用于如果判断支付成功,则获取接收终端的抢红包请求,并对抢红包请求分配相应的金额,并将相应的金额转发至接收终端的账户。
具体的,生成模块200具体用于支付信息对应的支付金额减去预留Gas金额后对红包合约进行支付。
进一步的,处理模块400还用于如果判断支付不成功,则将所述支付信息对应的支付金额减去预留手续费Gas金额之后返还给所述发起终端的账户。
在本申请实施例一种可能的实现方式中,如图4所示,在如图3所示实施例的基础上,还包括:分享模块310和退款模块610。
其中,分享模块310用于根据红包合约生成红包链接,并返回至发起终端以使发起终端分享至接收终端。
退款模块610,用于判断红包合约是否过期;如果判断红包合约过期,则将剩余的未抢红包的接收客户端数量对应的Gas金额和红包剩余金额返回至发起终端的账户。
需要说明的是,前述对区块链红包的处理方法实施例的描述,也适用于本申请实施例的区块链红包的处理装置,其实现原理类似,在此不再赘述。
综上所述,本申请实施例的区块链红包的处理装置,首先接收发起终端发送的发红包请求和对应的支付信息,然后根据发红包请求中的红包信息生成红包合约,并根据支付信息对红包合约进行支付,进而根据支付信息轮询区块链主链以判断支付信息对红包合约进行的支付是否成功,若判断支付成功,则获取接收终端的抢红包请求,并对抢红包请求分配相应的金额,并将相应的金额转发至接收终端的账户。由此,该装置引入服务器作为客户端与智能合约进行任务交互的中介,通过服务器实现区块链红包的发放和接收,弥补了智能合约无法处理复杂的资金转移任务的不足,用户可以通过抢红包获取红包中的金额,丰富了区块链平台转移资金的方式,提高了区块链平台转移资金的趣味性。
为了实现上述实施例,本申请还提出了一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行所述程序时,实现如上述实施例所述的区块链红包的处理方法。
图5为本申请实施例所提供的一种电子设备的结构示意图。
图5示出了适于用来实现本申请实施方式的示例性计算机设备的框图。图5显示的电子设备12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图5所示,电子设备12以通用计算设备的形式表现。电子设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture;以下简称:ISA)总线,微通道体系结构(Micro Channel Architecture;以下简称:MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association;以下简称:VESA)局域总线以及外围组件互连(Peripheral Component Interconnection;以下简称:PCI)总线。
电子设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory;以下简称:RAM)30和/或高速缓存存储器32。电子设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图5未显示,通常称为“硬盘驱动器”)。尽管图5中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如:光盘只读存储器(Compact Disc Read Only Memory;以下简称:CD-ROM)、数字多功能只读光盘(Digital Video Disc Read Only Memory;以下简称:DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。系统存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请各实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如系统存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。
电子设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该电子设备12交互的设备通信,和/或与使得该电子设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,电子设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network;以下简称:LAN),广域网(Wide Area Network;以下简称:WAN)和/或公共网络,例如因特网)通信。如图5所示,网络适配器20通过总线18与电子设备12的其它模块通信。应当明白,尽管图5中未示出,可以结合电子设备12使用其它硬件和/或软件模块,包括但不限于:微代码、 设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现前述实施例中提及的区块链红包的处理方法。
为了实现上述实施例,本申请还提出了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述实施例所述的区块链红包的处理方法。
需要说明的是,对于装置、电子设备及存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
可以理解,本申请实施例所述的方法中的步骤可以根据实际需要进行顺序调整、合并和删减。相应地,本申请实施例所述的装置中的单元也可以根据实际需要进行合并、划分和删减。
以上所揭露的仅为本申请的较佳实施例而已,当然不能以此来限定本申请的权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本申请权利要求所作的等同变化,仍属于申请所涵盖的范围。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任 何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
值得说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,其中,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (19)

  1. 一种区块链红包的处理方法,其特征在于,包括:
    接收发起终端发送的发红包请求和对应的支付信息,其中,所述发红包请求包括红包信息;
    根据所述红包信息生成红包合约,并根据所述支付信息对所述红包合约进行支付;
    根据所述支付信息轮询区块链主链以判断所述支付信息对所述红包合约进行的支付是否成功;以及
    如果判断所述支付成功,则获取接收终端的抢红包请求,并对所述抢红包请求分配相应的金额,并将相应的金额转发至所述接收终端的账户。
  2. 如权利要求1所述的区块链红包的处理方法,其特征在于,还包括:
    如果判断支付不成功,则将所述支付信息对应的支付金额减去预留手续费Gas金额之后返还给所述发起终端的账户。
  3. 如权利要求1所述的区块链红包的处理方法,其特征在于,还包括:
    根据所述红包合约生成红包链接,并返回至所述发起终端以使所述发起终端分享至所述接收终端。
  4. 如权利要求1所述的区块链红包的处理方法,其特征在于,所述根据所述支付信息对所述红包合约进行支付具体包括:
    根据所述支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
  5. 如权利要求2所述的区块链红包的处理方法,其特征在于,所述根据所述支付信息对所述红包合约进行支付具体包括:
    根据所述支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
  6. 如权利要求3所述的区块链红包的处理方法,其特征在于,所述根据所述支付信息对所述红包合约进行支付具体包括:
    根据所述支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
  7. 如权利要求1所述的区块链红包的处理方法,其特征在于,还包括:
    判断所述红包合约是否过期;
    如果判断所述红包合约过期,则将剩余的未抢红包的接收终端数量对应的Gas金额和红包剩余金额返回至所述发起终端的账户。
  8. 如权利要求3所述的区块链红包的处理方法,其特征在于,还包括:
    判断所述红包合约是否过期;
    如果判断所述红包合约过期,则将剩余的未抢红包的接收终端数量对应的Gas金额和 红包剩余金额返回至所述发起终端的账户。
  9. 如权利要求4所述的区块链红包的处理方法,其特征在于,还包括:
    判断所述红包合约是否过期;
    如果判断所述红包合约过期,则将剩余的未抢红包的接收终端数量对应的Gas金额和红包剩余金额返回至所述发起终端的账户。
  10. 如权利要求6所述的区块链红包的处理方法,其特征在于,还包括:
    判断所述红包合约是否过期;
    如果判断所述红包合约过期,则将剩余的未抢红包的接收终端数量对应的Gas金额和红包剩余金额返回至所述发起终端的账户。
  11. 一种区块链红包的处理装置,其特征在于,包括:
    接收模块,用于接收发起终端发送的发红包请求和对应的支付信息,其中,所述发红包请求包括红包信息;
    生成模块,用于根据所述红包信息生成红包合约,并根据所述支付信息对所述红包合约进行支付;
    判断模块,用于根据所述支付信息轮询区块链主链以判断所述支付信息对所述红包合约进行的支付是否成功;以及
    处理模块,用于如果判断所述支付成功,则获取接收终端的抢红包请求,并对所述抢红包请求分配相应的金额,并将相应的金额转发至所述接收终端的账户。
  12. 如权利要求11所述的区块链红包的处理装置,其特征在于,
    所述处理模块,还用于如果判断支付不成功,则将所述支付信息对应的支付金额减去预留手续费Gas金额之后返还给所述发起终端的账户。
  13. 如权利要求11所述的区块链红包的处理装置,其特征在于,还包括:
    分享模块,用于根据所述红包合约生成红包链接,并返回至所述发起终端以使所述发起终端分享至所述接收终端。
  14. 如权利要求11所述的区块链红包的处理装置,其特征在于,所述生成模块具体用于:
    所述支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
  15. 如权利要求12所述的区块链红包的处理装置,其特征在于,所述生成模块具体用于:
    所述支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
  16. 如权利要求13所述的区块链红包的处理装置,其特征在于,所述生成模块具体用于:
    所述支付信息对应的支付金额减去预留Gas金额后对所述红包合约进行支付。
  17. 如权利要求11所述的区块链红包的处理装置,其特征在于,还包括:
    退款模块,用于判断所述红包合约是否过期;如果判断所述红包合约过期,则将剩余的未抢红包的接收客户端数量对应的Gas金额和红包剩余金额返回至所述发起终端的账户。
  18. 一种电子设备,其特征在于,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如权利要求1-10中任一项所述的区块链红包的处理方法。
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-10中任一项所述的区块链红包的处理方法。
PCT/CN2018/109563 2018-06-29 2018-10-10 区块链红包的处理方法、装置、电子设备及介质 WO2020000766A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810714373.3 2018-06-29
CN201810714373.3A CN108921525B (zh) 2018-06-29 2018-06-29 区块链红包的处理方法、装置、电子设备及介质

Publications (1)

Publication Number Publication Date
WO2020000766A1 true WO2020000766A1 (zh) 2020-01-02

Family

ID=64425233

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109563 WO2020000766A1 (zh) 2018-06-29 2018-10-10 区块链红包的处理方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN108921525B (zh)
WO (1) WO2020000766A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507748A (zh) * 2020-03-13 2020-08-07 安徽辰讯信息科技有限公司 一种基于区块链的快速划价分拣系统
CN111582862A (zh) * 2020-06-26 2020-08-25 腾讯科技(深圳)有限公司 信息处理方法、装置、系统、计算机设备及存储介质
CN112862467A (zh) * 2021-01-14 2021-05-28 支付宝(杭州)信息技术有限公司 一种红包发放和领取方法、装置、设备及可读介质
CN113570419A (zh) * 2021-08-30 2021-10-29 上海通联金融服务有限公司 结合达标模型进行红包发送的方法、存储介质、终端
WO2022237574A1 (zh) * 2021-05-13 2022-11-17 支付宝(杭州)信息技术有限公司 权益分享处理的方法及装置

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727009B (zh) * 2019-01-28 2023-11-24 杭州复杂美科技有限公司 红包处理方法、设备和存储介质
CN109816362B (zh) * 2019-01-28 2021-07-06 杭州复杂美科技有限公司 红包处理方法、设备和存储介质
CN109741052A (zh) * 2019-01-28 2019-05-10 杭州复杂美科技有限公司 红包处理方法、设备和存储介质
CN109784888A (zh) * 2019-01-28 2019-05-21 杭州复杂美科技有限公司 红包处理方法、设备和存储介质
CN109903025B (zh) * 2019-02-11 2023-01-13 杭州复杂美科技有限公司 红包处理方法、设备和存储介质
CN109934566B (zh) * 2019-02-11 2023-04-14 杭州复杂美科技有限公司 红包处理方法、设备和存储介质
CN110363512B (zh) * 2019-07-12 2022-12-20 上海唯链信息科技有限公司 区块链红包的处理、创建、领取方法和装置、介质及计算机程序
CN110533404B (zh) * 2019-09-05 2023-02-24 郁配华 基于商业银行中介的红包支付方法及系统
CN111028081A (zh) * 2019-12-11 2020-04-17 深圳市亦区科技有限公司 资产转移方法、装置、电子设备及存储介质
CN112801790B (zh) * 2021-01-29 2024-02-09 中国工商银行股份有限公司 基于区块链的红包分配方法、终端、服务器及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105139192A (zh) * 2015-07-31 2015-12-09 腾讯科技(深圳)有限公司 一种电子资源处理方法、装置及服务器
CN106875164A (zh) * 2016-12-29 2017-06-20 北京握奇智能科技有限公司 一种基于区块链技术的去中心化电力交易方法和系统
CN106960315A (zh) * 2016-01-08 2017-07-18 深圳市星电商科技有限公司 资源信息处理方法、装置及系统
CN107705125A (zh) * 2017-08-28 2018-02-16 杭州云象网络技术有限公司 一种基于区块链的支付标记化方法
CN108062671A (zh) * 2017-11-03 2018-05-22 深圳市轱辘车联数据技术有限公司 数据交易方法、区块链节点服务器及数据提交终端

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140310243A1 (en) * 2010-08-16 2014-10-16 Mr. Steven James McGee Heart beacon cycle
CN106327169A (zh) * 2015-07-08 2017-01-11 阿里巴巴集团控股有限公司 电子转账的方法及装置
US11941588B2 (en) * 2015-11-06 2024-03-26 Cable Television Laboratories, Inc. Systems and methods for blockchain virtualization and scalability
CN106960329A (zh) * 2016-01-08 2017-07-18 深圳市星电商科技有限公司 一种电子红包的处理方法、处理设备及服务器
CN105956880A (zh) * 2016-04-27 2016-09-21 天津三千里云信息技术有限公司 销售推广系统
US9635000B1 (en) * 2016-05-25 2017-04-25 Sead Muftic Blockchain identity management system based on public identities ledger
CN107341724A (zh) * 2016-11-02 2017-11-10 阳光保险集团股份有限公司 一种基于区块链技术的保险卡单
CN106815764B (zh) * 2017-01-18 2020-12-08 中钞信用卡产业发展有限公司杭州区块链技术研究院 一种基于联盟链的数字资产的管理方法及系统
CN107563882A (zh) * 2017-09-01 2018-01-09 邓小峰 基于消费平台的电子红包派送方法及装置
CN108171606A (zh) * 2018-01-11 2018-06-15 北京欧链科技有限公司 区块链资产的分配方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105139192A (zh) * 2015-07-31 2015-12-09 腾讯科技(深圳)有限公司 一种电子资源处理方法、装置及服务器
CN106960315A (zh) * 2016-01-08 2017-07-18 深圳市星电商科技有限公司 资源信息处理方法、装置及系统
CN106875164A (zh) * 2016-12-29 2017-06-20 北京握奇智能科技有限公司 一种基于区块链技术的去中心化电力交易方法和系统
CN107705125A (zh) * 2017-08-28 2018-02-16 杭州云象网络技术有限公司 一种基于区块链的支付标记化方法
CN108062671A (zh) * 2017-11-03 2018-05-22 深圳市轱辘车联数据技术有限公司 数据交易方法、区块链节点服务器及数据提交终端

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507748A (zh) * 2020-03-13 2020-08-07 安徽辰讯信息科技有限公司 一种基于区块链的快速划价分拣系统
CN111507748B (zh) * 2020-03-13 2023-08-18 安徽辰讯信息科技有限公司 一种基于区块链的快速划价分拣系统
CN111582862A (zh) * 2020-06-26 2020-08-25 腾讯科技(深圳)有限公司 信息处理方法、装置、系统、计算机设备及存储介质
CN111582862B (zh) * 2020-06-26 2023-06-27 腾讯科技(深圳)有限公司 信息处理方法、装置、系统、计算机设备及存储介质
CN112862467A (zh) * 2021-01-14 2021-05-28 支付宝(杭州)信息技术有限公司 一种红包发放和领取方法、装置、设备及可读介质
CN112862467B (zh) * 2021-01-14 2023-05-09 支付宝(杭州)信息技术有限公司 一种红包发放和领取方法、装置、设备及可读介质
WO2022237574A1 (zh) * 2021-05-13 2022-11-17 支付宝(杭州)信息技术有限公司 权益分享处理的方法及装置
CN113570419A (zh) * 2021-08-30 2021-10-29 上海通联金融服务有限公司 结合达标模型进行红包发送的方法、存储介质、终端

Also Published As

Publication number Publication date
CN108921525B (zh) 2022-05-20
CN108921525A (zh) 2018-11-30

Similar Documents

Publication Publication Date Title
WO2020000766A1 (zh) 区块链红包的处理方法、装置、电子设备及介质
US10997575B2 (en) Management of emailed payment receipts
WO2017041641A1 (zh) 业务功能的实现方法和装置
US20190156312A1 (en) Method, system and server system of payment based on a conversation group
US20180096416A1 (en) Virtual resource transfer method, client device, application server, and system
JP2021504813A (ja) ブロックチェーンネットワークのトランザクション処理方法、装置、機器及び記憶媒体
JP2016219014A (ja) リソース転送システム
US20080080679A1 (en) Method and apparatus for providing chat histories to invitees
JP2007507769A (ja) 担保付き貸付市場のシステム及び方法
CN111563743B (zh) 一种区块链的转账处理方法、装置、设备和介质
WO2006102841A1 (fr) Procede interactif de ressources propres et procede de traitement d’informations et de systeme de commerce electronique
CN111028081A (zh) 资产转移方法、装置、电子设备及存储介质
JP2009123201A (ja) データを処理するためのサーバ‐プロセッサ・ハイブリッド・システムおよび方法
WO2016197873A1 (zh) 事务处理方法和系统
TWI659382B (zh) 使用智能合約完成投保之系統及其方法
JP2009123202A (ja) データを処理するためのプロセッサ‐サーバ・ハイブリッド・システムおよび方法
CN114556863A (zh) 计算机实施的系统和方法
CN116402511A (zh) 一种资源结算方法、装置、电子设备及存储介质
US9767443B1 (en) Timing a notification of an online financial event
CN109615443A (zh) 基于区块链的用户处理方法、装置、服务器及存储介质
US20180040060A1 (en) Descending counter value matching for divisible goods
WO2021234649A1 (zh) 汇款执行方法及装置和电子设备
TWM584480U (zh) 線上租屋續約系統
JP7368993B2 (ja) 絵記号を用いた金融機関システム、処理方法及びプログラム
TWI531998B (zh) 一次性弱連結方法及系統

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18924148

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08/04/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18924148

Country of ref document: EP

Kind code of ref document: A1