CN108921525B - Processing method and device for block chain red packet, electronic equipment and medium - Google Patents

Processing method and device for block chain red packet, electronic equipment and medium Download PDF

Info

Publication number
CN108921525B
CN108921525B CN201810714373.3A CN201810714373A CN108921525B CN 108921525 B CN108921525 B CN 108921525B CN 201810714373 A CN201810714373 A CN 201810714373A CN 108921525 B CN108921525 B CN 108921525B
Authority
CN
China
Prior art keywords
red
contract
payment
red envelope
envelope
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN201810714373.3A
Other languages
Chinese (zh)
Other versions
CN108921525A (en
Inventor
侯建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201810714373.3A priority Critical patent/CN108921525B/en
Priority to PCT/CN2018/109563 priority patent/WO2020000766A1/en
Publication of CN108921525A publication Critical patent/CN108921525A/en
Application granted granted Critical
Publication of CN108921525B publication Critical patent/CN108921525B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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

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

The invention provides a processing method, a processing device, electronic equipment and a medium for a block chain red packet, wherein the method comprises the following steps: receiving a red packet request and corresponding payment information sent by an initiating terminal, wherein the red packet request comprises red packet information; generating a red envelope contract according to the red envelope information, and paying the red envelope contract according to the payment information; polling the block chain main chain according to the payment information to judge whether the payment of the payment information on the red envelope contract is successful; and if the payment is judged to be successful, acquiring a red packet robbing request of the receiving terminal, distributing corresponding amount to the red packet robbing request, and forwarding the corresponding amount to an account of the receiving terminal. Therefore, the method realizes the issuing and receiving of the blockchain red packet through the server, enriches the way of transferring funds of the blockchain platform, and improves the interest of transferring funds of the blockchain platform.

Description

Processing method and device for block chain red packet, electronic equipment and medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for processing a block chain red packet, an electronic device, and a medium.
Background
With the development of internet technology, the blockchain technology has been widely applied to the fields of e-commerce, security trading, internet of things and the like, and provides convenience for users in payment clearing, financial trading and other aspects by virtue of the characteristics of decentralization, no tampering, traceability and the like.
However, the mode of transferring funds on the blockchain platform is mainly personal transfer, and the mode of transferring funds is single.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a method for processing blockchain red packets. The method introduces the server as an intermediary for the client to perform task interaction with the intelligent contract, and realizes the issuing and receiving of the block chain red packet through the server, so that the defect that the intelligent contract cannot process complex fund transfer tasks is overcome, a user can acquire the amount of money in the red packet by robbing the red packet, the method for transferring the fund by the block chain platform is enriched, and the interest of transferring the fund by the block chain platform is improved.
The second objective of the present invention is to provide a processing apparatus for blockchain red packets.
A third object of the invention is to propose an electronic device.
A fourth object of the invention is to propose a computer-readable storage medium.
To achieve the above object, an embodiment of a first aspect of the present invention provides a method for processing blockchain red packets, including the following steps:
receiving a red packet request and corresponding payment information sent by an initiating terminal, wherein the red packet request comprises red packet information;
generating a red envelope contract according to the red envelope information, and paying the red envelope contract according to the payment information;
polling the block chain main chain according to the payment information to judge whether the payment of the payment information on the red envelope contract is successful; and
and if the payment is judged to be successful, acquiring a red packet robbing request of the receiving terminal, distributing corresponding amount to the red packet robbing request, and forwarding the corresponding amount to the account of the receiving terminal.
The processing method of the blockchain red packet comprises the steps of firstly receiving a red packet request and corresponding payment information sent by an initiating terminal, then generating a red packet contract according to the red packet information in the red packet request, paying the red packet contract according to the payment information, then polling a blockchain main chain according to the payment information to judge whether the payment of the payment information on the red packet contract is successful, if the payment is judged to be successful, obtaining the red packet robbing request of a receiving terminal, allocating corresponding amount to the red packet robbing request, and forwarding the corresponding amount to an account of the receiving terminal. Therefore, the method introduces the server as an intermediary for the client to perform task interaction with the intelligent contract, the server is used for realizing the issuing and receiving of the block chain red packet, the defect that the intelligent contract cannot process complex fund transfer tasks is overcome, a user can acquire the amount of money in the red packet by robbing the red packet, the method for transferring the fund by the block chain platform is enriched, and the interest of transferring the fund by the block chain platform is improved.
In addition, the processing method for the blockchain red packet according to the above embodiment of the present invention may further have the following additional technical features:
in an embodiment of the present invention, the method for processing blockchain red packets further includes: and if the payment is judged to be unsuccessful, returning the payment amount corresponding to the payment information to the account of the initiating terminal after subtracting the reserved commission Gas amount.
In an embodiment of the present invention, the method for processing blockchain red packets further includes: and generating a red envelope link according to the red envelope contract, and returning the red envelope link to the initiating terminal to enable the initiating terminal to share the red envelope link with the receiving terminal.
In an embodiment of the present invention, paying the red envelope contract according to the payment information specifically includes: and paying the red envelope contract after subtracting the reserved Gas amount from the payment amount corresponding to the payment information.
In an embodiment of the present invention, the method for processing blockchain red packets further includes: judging whether the red envelope contract is expired; and if the red envelope contract is judged to be overdue, returning the Gas amount and the red envelope residual amount corresponding to the number of the remaining un-robbed receiving clients to the account of the initiating terminal.
In order to achieve the above object, a second aspect of the present invention provides a processing apparatus for blockchain red packets, including:
the system comprises a receiving module, a sending module and a payment module, wherein the receiving module is used for receiving a red packet request and corresponding payment information sent by an initiating terminal, and the red packet request comprises red packet information;
the generating module is used for generating a red envelope contract according to the red envelope information and paying the red envelope contract according to the payment information;
the judging module is used for polling a block chain main chain according to the payment information to judge whether the payment of the payment information on the red envelope contract is successful; and
and the processing module is used for acquiring the red packet robbing request of the receiving terminal if the payment is judged to be successful, distributing corresponding amount to the red packet robbing request and forwarding the corresponding amount to the account of the receiving terminal.
The processing device of the blockchain red packet of the embodiment of the invention firstly receives a red packet request and corresponding payment information sent by an initiating terminal, then generates a red packet contract according to the red packet information in the red packet request, pays the red packet contract according to the payment information, and then polls a blockchain main chain according to the payment information to judge whether the payment of the payment information on the red packet contract is successful, if the payment is successful, obtains the red packet robbing request of a receiving terminal, allocates corresponding amount to the red packet robbing request, and forwards the corresponding amount to an account of the receiving terminal. Therefore, the device introduces the server as an intermediary for the client to perform task interaction with the intelligent contract, the issuing and receiving of the block chain red packet are realized through the server, the defect that the intelligent contract cannot process complex fund transfer tasks is overcome, the user can acquire the amount of money in the red packet through robbing the red packet, the mode of transferring the fund by the block chain platform is enriched, and the interest of transferring the fund by the block chain platform is improved.
In addition, the processing apparatus for block chain red packet according to the above embodiment of the present invention may further have the following additional technical features:
in an embodiment of the present invention, 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 initiating terminal after subtracting the reserved commission fees Gas amount.
In an embodiment of the present invention, the apparatus for processing blockchain red packets further includes: and the sharing module is used for generating a red envelope link according to the red envelope contract and returning the red envelope link to the initiating terminal so that the initiating terminal can share the red envelope link with the receiving terminal.
In an embodiment of the present invention, the generating module is specifically configured to: and after the reserved Gas amount is subtracted from the payment amount corresponding to the payment information, the red envelope contract is paid.
In an embodiment of the present invention, the apparatus for processing blockchain red packets further includes: the refund module is used for judging whether the red envelope contract is overdue or not; and if the red envelope contract is judged to be overdue, returning the Gas amount and the red envelope residual amount corresponding to the number of the remaining un-robbed receiving clients to the account of the initiating terminal.
To achieve the above object, a third aspect of the present invention provides an electronic device, including: the block chain red packet processing method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the block chain red packet processing method is realized according to the embodiment.
To achieve the above object, a fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the processing method for blockchain red packets according to the above embodiments.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart illustrating a processing method for block chain red packets according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a specific block chain red packet processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a processing apparatus for block chain red packets according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another processing apparatus for block chain red packets according to an embodiment of the present invention; and
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The following describes a processing method, an apparatus and an electronic device for blockchain red packets according to an embodiment of the present invention with reference to the drawings.
The execution main body of the processing method of the blockchain red packet in the embodiment of the invention can be a blockchain red packet processing server.
Fig. 1 is a flowchart illustrating a block chain red packet processing method according to an embodiment of the present invention. As shown in fig. 1, the method for processing blockchain red packets includes the following steps:
step 101, receiving a red packet request and corresponding payment information sent by an initiating terminal, wherein the red packet request includes red packet information.
Specifically, the initiating terminal receives the user operation and sends the red packet sending request and the payment information corresponding to the red packet sending request to the server. The red packet request comprises red packet information input by a user at the initiating terminal. Specifically, the user may operate in an interface of the initiating terminal, so as to input the red packet information, for example, the red packet information may include a red packet amount, a red packet number, a blessing word, and the like, and the initiating terminal may generate the red packet request according to the red packet information input by the user. And further generating payment information corresponding to the red packet sending request, wherein the payment information comprises the red packet amount corresponding to the red packet sending request, name information of the red packet sending transaction and the like.
In a possible implementation manner, after the initiating terminal initiates a red envelope sending request, the initiating terminal calls a transfer module in the blockchain platform to transfer the red envelope amount from an account registered by the initiating terminal to an account registered by the server, so that a red envelope contract on the blockchain platform can be paid subsequently.
Further, after the red envelope amount is successfully transferred to the account registered by the server, the server receives the red envelope request and the corresponding payment information sent by the initiating terminal, so that the red envelope contract is generated in the next step, the generation process of the red envelope contract will be described in the subsequent steps, and details in the step are omitted.
And 102, generating a red envelope contract according to the red envelope information, and paying the red envelope contract according to the payment information.
The red envelope contract is an intelligent contract for processing red envelope transactions on the block chain platform, and the red envelope contract specifies steps to be executed and rules to be followed by the red envelope sending terminal and the red envelope receiving terminal in the block chain red envelope processing process. The server generates a red packet contract suitable for the red packet transaction according to red packet information sent by the initiating terminal on the basis of a rule preset by the block chain platform, the red packet contract is transmitted in the block chain network in a point-to-point transmission mode, and each verification node in the block chain network receives and stores the red packet contract so as to trigger consensus and processing of the red packet contract when a contract triggering condition is met subsequently.
It should be noted that, in order to further ensure the reliability of the red envelope transaction, before the server pays the red envelope contract according to the payment information, the server needs to verify the payment information, and specifically, the server may poll the blockchain to determine whether the originating terminal transfers the red envelope amount from the account registered by the originating terminal to the account registered by the server.
Further, in order to realize the triggering condition for executing the red envelope contract, the server pays the red envelope contract according to the payment information. As a possible implementation manner, the server may pay the red envelope contract according to the payment amount corresponding to the payment information minus the reserved Gas amount.
Specifically, the server transfers the residual amount obtained by subtracting the Gas amount from the payment amount to the account of the red envelope contract from the account of the server, so as to realize the payment of the red envelope contract. The Gas amount is an extra consumption amount generated in the process of processing the red envelope contract, and is determined by the complexity of the content of the red envelope contract, for example, the more codes executed in the process of processing the red envelope contract, the larger the Gas amount needs to be reserved. Therefore, the server reserves corresponding Gas amount in the server account in advance according to the red envelope contract so as to pay the amount required by the subsequent execution of the red envelope contract.
It should be noted that, in order to enable the receiving terminal user to obtain the amount of money in the red envelope, the server may enable the receiving terminal user to obtain the red envelope connection in different manners. As an example, after generating a red envelope link according to a red envelope contract, the server sends the red envelope link to a user of the sending terminal, and the sending terminal user shares the red envelope link with the user of the receiving terminal through a social application.
And 103, polling the block chain main chain according to the payment information to judge whether the payment of the payment information on the red envelope contract is successful.
Specifically, the server polls the verification nodes on the block chain main chain according to the payment information, and judges whether the payment for the red envelope contract in the red envelope task is successful or not by polling whether the verification nodes generate consensus on the payment result of the red envelope contract or not.
In the concrete implementation, as a possible implementation manner, each node on the block chain main chain firstly verifies the name information of the red envelope contract to judge the timeliness of the red envelope contract, then sends the red envelope contract to the to-be-consensus set, and judges whether the payment of the red envelope contract is successful or not by determining whether the majority of verification nodes on the block chain main chain achieve the consensus of successful payment or not.
And 104, if the payment is judged to be successful, acquiring a red packet robbing request of the receiving terminal, distributing corresponding amount to the red packet robbing request, and forwarding the corresponding amount to an account of the receiving terminal.
Specifically, if the payment is determined to be successful, the server starts to perform a subsequent red envelope robbing process.
The procedure of getting red envelope will be explained in detail below.
The server allows the receiving terminal to be connected with a red packet robbing interface of the server after acquiring the red packet robbing request sent by the receiving terminal, randomly generates the amount of money corresponding to the red packet robbing request within the amount range contained in the red packet contract account, and then forwards the amount of money to the account of the receiving terminal.
Certainly, in practical application, there may be a case that payment for the red envelope contract is unsuccessful due to an influence of an external factor, for example, in an embodiment of the present invention, if the payment is determined to be unsuccessful, the payment amount corresponding to the payment information is returned to the account of the initiating terminal after subtracting the reserved commission Gas amount.
It should be noted that, in order to further reduce the risk of executing the red envelope contract, the server may further verify the account arrival condition of the red envelope contract before transferring the account of the receiving terminal, and if it is determined that the amount of the red envelope reaches the account of the red envelope contract, the server invokes the transfer interface of the red envelope contract, and sends the corresponding amount of the red envelope to the account of the receiving terminal.
In summary, in the method for processing a blockchain red packet according to the embodiment of the present invention, a red packet request and corresponding payment information sent by an initiating terminal are received, a red packet contract is generated according to the red packet information in the red packet request, payment is performed on the red packet contract according to the payment information, a blockchain main chain is polled according to the payment information to determine whether payment of the payment information on the red packet contract is successful, if the payment is determined to be successful, a red packet robbing request of a receiving terminal is obtained, a corresponding amount of money is allocated to the red packet robbing request, and the corresponding amount of money is forwarded to an account of the receiving terminal. Therefore, the method introduces the server as an intermediary for the client to perform task interaction with the intelligent contract, the server realizes the issuing and receiving of the block chain red packet, the defect that the intelligent contract cannot process complex fund transfer tasks is overcome, the user can acquire the amount of money in the red packet by robbing the red packet, the mode of transferring the fund by the block chain platform is enriched, and the interest of transferring the fund by the block chain platform is improved.
Based on the foregoing embodiment, in practical applications, there may be a phenomenon that a red packet is expired due to the red packet not being received within a specified time limit, and in order to avoid a loss of user funds, an embodiment of the present invention provides a specific block chain red packet processing method, and fig. 2 is a schematic flow diagram of the specific block chain red packet processing method provided by the embodiment of the present invention, as shown in fig. 2, the method includes:
step 201, judging whether the red envelope contract is overdue or not.
Specifically, the server firstly queries the generation date of the red envelope contract on the block chain platform according to the name information of the red envelope contract, then detects whether the existence time of the red envelope contract exceeds a preset valid period in the red envelope contract, and if the existence time of the red envelope contract exceeds the preset valid period, the server judges that the red envelope contract is overdue.
Step 202, if the red envelope contract is judged to be out of date, the Gas amount and the red envelope residual amount corresponding to the number of the receiving terminals of the remaining unreliated red envelope are returned to the account of the initiating terminal.
It should be noted that, before the server pays the red envelope contract, corresponding amount of money is reserved according to the number of the receiving terminals and is used as Gas amount transferred to the account of the receiving terminal, and if the receiving terminal does not rob the red envelope within the validity period of the red envelope contract, corresponding amount of the red envelope which is not transferred exists in the account of the red envelope contract, and Gas amount corresponding to the number of the receiving terminals exists in the account of the server. Therefore, in order to avoid the loss of user funds, the server returns the Gas amount and the remaining amount of the red packet corresponding to the number of the receiving terminals which do not rob the red packet to the account of the initiating terminal.
During specific implementation, as a possible implementation manner, the server firstly calls a transfer interface of the red envelope contract, transfers the residual Gas amount to an account of the red envelope contract, then calls the transfer interface of the red envelope contract after confirming that the red envelope contract receives the residual Gas amount through a verification node of a polling block chain main chain, and returns the residual Gas amount and the residual red envelope amount to the account of the initiating terminal.
The block chain red packet processing method of the embodiment of the invention firstly judges whether a red packet contract is overdue or not, and returns Gas amount and red packet residual amount corresponding to the number of the receiving terminals of the remaining unreceived red packets to the account of the initiating terminal if the red packet contract is overdue and the red packet contract is not received. Therefore, the method avoids the fund loss of the initiating terminal user when the block chain red packet is not picked up, ensures the fund security of the user and improves the reliability of the red packet contract.
In order to more clearly describe the implementation process of the blockchain red packet processing method in the foregoing embodiment, a detailed description is provided below with an embodiment.
When the user a wishes to transfer funds to a friend in a red package mode, the user a may initiate a red package sending request through a Decentralized Application (Dapp) in the terminal device, for example, the user a may enter a red package sending page at a red package sending interface of the Dapp Browser and input the red package amount, the red package number and a blessing word on the red package sending page, and when the user a selects to send a voice red package, a voice password of the red package may be set. After the user A confirms the input red packet information, the Dapp Browser client calls a transfer function of the block chain platform, the user A clicks a confirmation button after paying the red packet amount on a transfer interface, then the red packet amount is transferred to an account of the Dapp Browser server, the Dapp Browser server further generates a red packet contract according to the red packet information confirmed by the user A and pays the red packet contract, and the red packet amount transferred by the user A can be money applied to the block chain platform by Ethernet currency, bit currency and the like. Furthermore, the user A can share the red packet robbing link with friends in the address list of the Dapp Browser to remind the friends of the user A to grab the red packet. And after receiving the red envelope robbing link at the Dapp Browser client, the user B, the user C and the like click the link to enter the red envelope robbing interface, and then the Dapp Browser server randomly allocates a certain amount of money to transfer to the client accounts of the red envelope robbing users such as the user B, the user C and the like. The user A and the user who robs the red envelope can also check the account condition of the red envelope, the amount of the red envelope robbed by each person and the like through the red envelope detail page of the Dapp Browser client. Therefore, the Dapp Browser server realizes the issuing and receiving of the blockchain red packages, and enriches the fund transfer mode between the user A and the friends.
In order to implement the foregoing embodiment, the present invention further provides a processing apparatus for a blockchain red packet, and fig. 3 is a schematic structural diagram of the processing apparatus for a blockchain red packet according to the embodiment of the present invention, as shown in fig. 3, the processing apparatus for a blockchain red packet includes: the device comprises a receiving module 100, a generating module 200, a judging 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.
And 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 determining module 300 is configured to poll the blockchain main chain according to the payment information to determine whether payment of the payment information on the red envelope contract is successful.
And the processing module 400 is configured to, if it is determined that the payment is successful, obtain a red packet robbing request of the receiving terminal, allocate a corresponding amount to the red packet robbing request, and forward the corresponding amount to the account of the receiving terminal.
Specifically, the generating module 200 is specifically configured to pay the red envelope contract after subtracting the reserved Gas amount from the payment amount corresponding to the payment information.
Further, the processing module 400 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 initiating terminal after subtracting the reserved commission fees Gas amount.
In a possible implementation manner of the embodiment of the present invention, as shown in fig. 4, on the basis of the embodiment shown in fig. 3, 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 a red envelope contract, and return to the originating terminal to enable the originating terminal to share the red envelope link with the receiving terminal.
A refund module 610 for determining whether the red envelope contract is expired; and if the red envelope contract is judged to be overdue, returning the Gas amount and the residual red envelope amount corresponding to the number of the remaining un-robbed receiving clients to the account of the initiating terminal.
It should be noted that the foregoing description of the method embodiments is also applicable to the apparatus according to the embodiments of the present invention, and the implementation principles thereof are similar and will not be described herein again.
In summary, the processing apparatus for a blockchain red packet according to the embodiment of the present invention first receives a red packet request and corresponding payment information sent by an initiating terminal, then generates a red packet contract according to the red packet information in the red packet request, pays the red packet contract according to the payment information, polls a blockchain main chain according to the payment information to determine whether the payment of the payment information on the red packet contract is successful, and if the payment is determined to be successful, obtains a red packet robbing request of a receiving terminal, allocates a corresponding amount to the red packet robbing request, and forwards the corresponding amount to an account of the receiving terminal. Therefore, the device introduces the server as an intermediary for the client to perform task interaction with the intelligent contract, the issuing and receiving of the block chain red packet are realized through the server, the defect that the intelligent contract cannot process complex fund transfer tasks is overcome, the user can acquire the amount of money in the red packet through robbing the red packet, the mode of transferring the fund by the block chain platform is enriched, and the interest of transferring the fund by the block chain platform is improved.
In order to implement the above embodiments, the present invention further provides an electronic device, including: the block chain red packet processing method comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein when the processor executes the program, the block chain red packet processing method is realized according to the embodiment.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the processing method of the blockchain red packet according to the above embodiment.
FIG. 5 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application. The computer device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present application.
As shown in FIG. 5, computer device 12 is in the form of a general purpose computing device. The components of computer 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 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the computer system/server 12, and/or with any devices (e.g., network card, modem, etc.) that enable the computer system/server 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via Network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A method for processing a blockchain red packet includes:
receiving a red packet request and corresponding payment information sent by an initiating terminal, wherein the red packet request comprises red packet information;
generating a red envelope contract according to the red envelope information, and paying the red envelope contract according to the payment information;
polling a block chain main chain according to the payment information to judge whether the payment of the payment information on the red envelope contract is successful; and
if the payment is judged to be successful, acquiring a red packet robbing request of a receiving terminal, distributing corresponding amount to the red packet robbing request, and forwarding the corresponding amount to an account of the receiving terminal;
the method further comprises the following steps: and judging whether the red contract is overdue or not, if so, calling a transfer interface of the red contract to transfer the residual Gas amount to an account of the red contract, polling a verification node of the block chain main chain to confirm that the red contract is received to the residual Gas amount, calling the transfer interface of the red contract, and returning the residual Gas amount and the residual red contract amount to the account of the initiating terminal, wherein the Gas amount is the extra consumption amount generated in the process of processing the red contract.
2. The method of claim 1, further comprising:
and if the payment is judged to be unsuccessful, returning the payment amount corresponding to the payment information to the account of the initiating terminal after subtracting the reserved commission Gas amount.
3. The method of claim 1, further comprising:
and generating a red envelope link according to the red envelope contract, and returning the red envelope link to the initiating terminal to enable the initiating terminal to share the red envelope link with the receiving terminal.
4. The method for processing the blockchain red envelope according to claim 1, wherein the paying for the red envelope contract according to the payment information specifically includes:
and paying the red envelope contract after subtracting the reserved Gas amount from the payment amount corresponding to the payment information.
5. A device for processing blockchain red packets, comprising:
the system comprises a receiving module, a sending module and a payment module, wherein the receiving module is used for receiving a red packet request and corresponding payment information sent by an initiating terminal, and the red packet request comprises red packet information;
the generating module is used for generating a red envelope contract according to the red envelope information and paying the red envelope contract according to the payment information;
the judging module is used for polling a block chain main chain according to the payment information to judge whether the payment of the payment information on the red envelope contract is successful; and
the processing module is used for acquiring a red packet robbing request of a receiving terminal if the payment is judged to be successful, distributing corresponding amount to the red packet robbing request and forwarding the corresponding amount to an account of the receiving terminal;
and the refund module is used for judging whether the red envelope contract is overdue or not, calling a transfer interface of the red envelope contract to transfer the residual Gas amount to an account of the red envelope contract if the red envelope contract is judged to be overdue, calling the transfer interface of the red envelope contract after the verification node of the block chain main chain is polled to confirm that the red envelope contract has been received into the residual Gas amount, and returning the residual Gas amount and the residual red envelope amount to the account of the initiating terminal, wherein the Gas amount is the extra consumption amount generated in the process of processing the red envelope contract.
6. The device for processing blockchain red packets according to claim 5,
and the processing module is further used for returning the payment amount corresponding to the payment information to the account of the initiating terminal after subtracting the reserved commission fees Gas amount if the payment is judged to be unsuccessful.
7. The apparatus for processing blockchain red packets according to claim 5, further comprising:
and the sharing module is used for generating a red envelope link according to the red envelope contract and returning the red envelope link to the initiating terminal so that the initiating terminal can share the red envelope link with the receiving terminal.
8. The apparatus of claim 5, wherein the generating module is specifically configured to:
and after the reserved Gas amount is subtracted from the payment amount corresponding to the payment information, the red envelope contract is paid.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executing the program, implements the method of processing blockchain red packets according to any of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method for processing a blockchain red packet according to any one of claims 1 to 4.
CN201810714373.3A 2018-06-29 2018-06-29 Processing method and device for block chain red packet, electronic equipment and medium Expired - Fee Related CN108921525B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810714373.3A CN108921525B (en) 2018-06-29 2018-06-29 Processing method and device for block chain red packet, electronic equipment and medium
PCT/CN2018/109563 WO2020000766A1 (en) 2018-06-29 2018-10-10 Blockchain red packet processing method and apparatus, and electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810714373.3A CN108921525B (en) 2018-06-29 2018-06-29 Processing method and device for block chain red packet, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN108921525A CN108921525A (en) 2018-11-30
CN108921525B true CN108921525B (en) 2022-05-20

Family

ID=64425233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810714373.3A Expired - Fee Related CN108921525B (en) 2018-06-29 2018-06-29 Processing method and device for block chain red packet, electronic equipment and medium

Country Status (2)

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

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727009B (en) * 2019-01-28 2023-11-24 杭州复杂美科技有限公司 Red packet processing method, apparatus and storage medium
CN109816362B (en) * 2019-01-28 2021-07-06 杭州复杂美科技有限公司 Red packet processing method, device and storage medium
CN109741052A (en) * 2019-01-28 2019-05-10 杭州复杂美科技有限公司 Red packet processing method, equipment and storage medium
CN109784888A (en) * 2019-01-28 2019-05-21 杭州复杂美科技有限公司 Red packet processing method, equipment and storage medium
CN109934566B (en) * 2019-02-11 2023-04-14 杭州复杂美科技有限公司 Red packet processing method, device and storage medium
CN109903025B (en) * 2019-02-11 2023-01-13 杭州复杂美科技有限公司 Red packet processing method, device and storage medium
CN110363512B (en) * 2019-07-12 2022-12-20 上海唯链信息科技有限公司 Processing, creating and getting method and device for block chain red packet, medium and computer program
CN110533404B (en) * 2019-09-05 2023-02-24 郁配华 Red envelope payment method and system based on commercial bank intermediary
CN111028081A (en) * 2019-12-11 2020-04-17 深圳市亦区科技有限公司 Asset transfer method, device, electronic equipment and storage medium
CN111507748B (en) * 2020-03-13 2023-08-18 安徽辰讯信息科技有限公司 Quick price-dividing sorting system based on block chain
CN111582862B (en) * 2020-06-26 2023-06-27 腾讯科技(深圳)有限公司 Information processing method, device, system, computer equipment and storage medium
CN116757742A (en) * 2021-01-14 2023-09-15 支付宝(杭州)信息技术有限公司 Red packet issuing and receiving method, device, equipment and readable medium
CN112801790B (en) * 2021-01-29 2024-02-09 中国工商银行股份有限公司 Block chain-based red packet distribution method, terminal, server and system
CN116385063A (en) * 2021-05-13 2023-07-04 支付宝(杭州)信息技术有限公司 Rights and interests sharing processing method and device
CN113205323A (en) * 2021-05-28 2021-08-03 中国工商银行股份有限公司 Red packet circulation method and device based on block chain
CN113570419A (en) * 2021-08-30 2021-10-29 上海通联金融服务有限公司 Method for sending red packet by combining standard model, storage medium and terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106327169A (en) * 2015-07-08 2017-01-11 阿里巴巴集团控股有限公司 Electronic fund transferring method and apparatus
CN106815764A (en) * 2017-01-18 2017-06-09 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of management method and system of the digital asset based on alliance's chain

Family Cites Families (13)

* 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
CN105139192A (en) * 2015-07-31 2015-12-09 腾讯科技(深圳)有限公司 Electronic resource processing method, apparatus and server
US11941588B2 (en) * 2015-11-06 2024-03-26 Cable Television Laboratories, Inc. Systems and methods for blockchain virtualization and scalability
CN106960329A (en) * 2016-01-08 2017-07-18 深圳市星电商科技有限公司 A kind of processing method, processing equipment and the server of electronics red packet
CN106960315A (en) * 2016-01-08 2017-07-18 深圳市星电商科技有限公司 Resource information processing method, apparatus and system
CN105956880A (en) * 2016-04-27 2016-09-21 天津三千里云信息技术有限公司 Sales promotion system
US9635000B1 (en) * 2016-05-25 2017-04-25 Sead Muftic Blockchain identity management system based on public identities ledger
CN107341724A (en) * 2016-11-02 2017-11-10 阳光保险集团股份有限公司 A kind of insurance card list based on block chain technology
CN106875164A (en) * 2016-12-29 2017-06-20 北京握奇智能科技有限公司 A kind of decentralization electricity transaction method and system based on block chain technology
CN107705125A (en) * 2017-08-28 2018-02-16 杭州云象网络技术有限公司 A kind of payment marking method based on block chain
CN107563882A (en) * 2017-09-01 2018-01-09 邓小峰 Electronics red packet based on consumption platform sends method and device with charge free
CN108062671A (en) * 2017-11-03 2018-05-22 深圳市轱辘车联数据技术有限公司 Data trade method, block chain node server and data submit terminal
CN108171606A (en) * 2018-01-11 2018-06-15 北京欧链科技有限公司 The distribution method and device of block chain assets

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106327169A (en) * 2015-07-08 2017-01-11 阿里巴巴集团控股有限公司 Electronic fund transferring method and apparatus
CN106815764A (en) * 2017-01-18 2017-06-09 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of management method and system of the digital asset based on alliance's chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Blockchain based smart contract for bidding system;Yi-Hui Chen et al.;《2018 IEEE International Conference on Applied System Invention (ICASI)》;20180625;208-211 *
从阳光保险积分谈区块链应用风险;李赫;《Fintech论坛》;20161010;63-67 *

Also Published As

Publication number Publication date
WO2020000766A1 (en) 2020-01-02
CN108921525A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108921525B (en) Processing method and device for block chain red packet, electronic equipment and medium
US20190156312A1 (en) Method, system and server system of payment based on a conversation group
WO2019019490A1 (en) Method and system for paying transaction cost in blockchain network
US8413160B2 (en) Systems, methods, and computer program products for transaction based load balancing
CN112116334B (en) Cross-blockchain third party arbitration performance guarantee system and method thereof
US20090287601A1 (en) Network-Based Viral Payment System
WO2012112941A2 (en) Method and system for managing data and enabling payment transactions between multiple entities
US20140195276A1 (en) Ticket transfer
CN110322321B (en) Block chain-based electronic bill transfer method, device, equipment and medium
CN111028081A (en) Asset transfer method, device, electronic equipment and storage medium
CN111092814B (en) Service handling request message distribution method and equipment
CN108876373A (en) A kind of method of payment, device, server and system
JP6097984B2 (en) Real-time mobile payment processing system
CN113300937B (en) Resource allocation method, display method, device, system and equipment
CN111144889A (en) Block chain-based integral settlement method and block chain accounting system
CN114116174A (en) Queuing management method and device
CN117934075A (en) Electronic rights issuing method, electronic rights issuing device, electronic equipment and storage medium
CN113034149A (en) System and method for confirming electronic invoice and guaranteeing performance based on block chain
CN111612608A (en) Remittance execution method and device and electronic equipment
CN107507086B (en) Invoice processing method and invoice processing system
CN109325748A (en) Method is provided and is got in a kind of distribution of virtual objects
EP2662818A1 (en) Method, transaction server and account server for electronic payment in a computer network
CN113920595A (en) Parking fee deduction processing method and system
US12079786B2 (en) Systems and methods for transferring funds to a pre-paid account
CN111638954A (en) Virtual resource allocation method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220520

CF01 Termination of patent right due to non-payment of annual fee