[go: up one dir, main page]

CN109903025A - Red packet processing method, equipment and storage medium - Google Patents

Red packet processing method, equipment and storage medium Download PDF

Info

Publication number
CN109903025A
CN109903025A CN201910110386.4A CN201910110386A CN109903025A CN 109903025 A CN109903025 A CN 109903025A CN 201910110386 A CN201910110386 A CN 201910110386A CN 109903025 A CN109903025 A CN 109903025A
Authority
CN
China
Prior art keywords
red packet
list
subaddressing
key
index
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.)
Granted
Application number
CN201910110386.4A
Other languages
Chinese (zh)
Other versions
CN109903025B (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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN201910110386.4A priority Critical patent/CN109903025B/en
Publication of CN109903025A publication Critical patent/CN109903025A/en
Application granted granted Critical
Publication of CN109903025B publication Critical patent/CN109903025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Slot Machines And Peripheral Devices (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a kind of red packet processing method, equipment and storage medium, this method comprises: receiving give bonus solicited message and red packet payment transaction that the first user terminal is sent;Generate Your Majesty's key and the first index list;Subaddressing list is generated according to Your Majesty's key and the first index list, the transaction that gives bonus is generated according to Your Majesty's key and subaddressing list;To give bonus transaction and red packet payment transaction be packaged as trading group and be sent to block chain node for executing so that the red packet fund of payment to be frozen in red packet contract, will be on Your Majesty's key and subaddressing list records to the first block chain;The first index in the first index list is sent to the user terminal for getting red packet, for according to first index generate red packet get trade and be sent to node for execute with by red packet contract verifying according to Your Majesty's key and first index generate the first subaddressing whether be recorded in subaddressing list: be then to provide red packet.The application realizes the red packet processing scheme that centralization is combined with decentralization.

Description

Red packet processing method, equipment and storage medium
Technical field
This application involves Internet technical fields, and in particular to a kind of red packet processing method, equipment and storage medium.
Background technique
Current red packet processing scheme is all based on traditional giving bonus for centralized server processing user and requests or rob Red packet request, and carry out the centralization scheme of the processing such as red packet distribution.It there is no mature decentralization or center on Vehicles Collected from Market Change the red packet processing scheme combined with decentralization.
The red packet processing scheme of complete decentralization especially robs the such reception user of red packet mode and does not know mode In red packet processing scheme, there remains be difficult to compromise between security and ease for use.For example, system can give bonus User automatically generates verification mode, but by block chain disclose verify data can make as rob red packet user audient user it Outer other block chain users equally have an opportunity to get red packet;And verify data is supplied to by way of being exchanged under line and is robbed To the user of red packet, the ease for use of scheme can be made to decline to a great extent, it is difficult to user be attracted to use.
Summary of the invention
In view of drawbacks described above in the prior art or deficiency, be intended to provide a kind of centralization combined with decentralization it is red Packet processing method, equipment and storage medium.
In a first aspect, the present invention provides a kind of red packet processing method suitable for server-side, this method comprises:
Receive give bonus solicited message and the red packet payment transaction of the transmission of the first user terminal;Wherein, give bonus solicited message Including red packet number;
Your Majesty's key is generated, and the first index list is generated according to red packet number;Wherein, the first index list includes and red packet The index of the identical quantity of number;
Subaddressing list is generated according to Your Majesty's key and the first index list, is generated according to Your Majesty's key and subaddressing list rubescent Packet transaction;
It will give bonus transaction and red packet payment transaction be packaged as trading group and be sent to the node of the first block chain for holding Row is frozen in red packet contract with the red packet fund for paying red packet payment transaction, by Your Majesty's key and subaddressing list records to the On one block chain;
The first index in the first index list is sent to the second user end for the user for getting red packet, for the second use Family end is got according to the first index generation red packet trades and is sent to the node of the first block chain for executing to close by red packet It about verifies according to whether the first subaddressing that Your Majesty's key and the first index generate is recorded in subaddressing list: being that then red packet closes About red packet is provided to the account of user.
Second aspect, the present invention provide a kind of red packet processing method suitable for block chain node, this method comprises:
It receives and the trading group for executing server-side transmission is frozen in red packet with the red packet fund for paying red packet payment transaction In contract, will be on Your Majesty's key and subaddressing list records to the first block chain;Wherein, trading group receives the first user by server-side Give bonus solicited message and the red packet payment transaction sent is held, the red packet for generating Your Majesty's key and including according to the solicited message that gives bonus Number generates the first index list, generates subaddressing list according to Your Majesty's key and the first index list, according to Your Majesty's key and son ground List generation in location gives bonus after transaction, and will give bonus transaction and the packing generation of red packet payment transaction;
It receives and the red packet for executing the second user end transmission for getting the user of red packet gets transaction to close by red packet It about verifies according to whether the first subaddressing that Your Majesty's key and the first index generate is recorded in subaddressing list: being that then red packet closes About red packet is provided to the account of user;Wherein, red packet gets transaction by second user end in the first rope for receiving server-side transmission After drawing the first index in list, generated according to the first index.
The third aspect, the present invention provide a kind of red packet processing method suitable for user terminal, this method comprises:
After getting red packet, the first index in the first index list that server-side is sent is received;Wherein, the first index column After table is received give bonus solicited message and the red packet payment transaction that the first user terminal is sent by server-side, generate and give bonus request The index for the red packet number same number that information includes is formed;
It is got according to the first index generation red packet and trades and be sent to the node of the first block chain for executing by red Inclusion is about verified according to whether the first subaddressing that Your Majesty's key and the first index generate is recorded in subaddressing list: be, then it is red Inclusion about provides red packet;Wherein, subaddressing list is by raw according to Your Majesty's key and the first index list after server-side generation Your Majesty's key At, and transaction will be given bonus and red packet payment transaction is beaten according to Your Majesty's key and subaddressing list the generation transaction that gives bonus by server-side Packet is trading group and is sent to the node of the first block chain and is freezed for executing with the red packet fund for paying red packet payment transaction In red packet contract, will be on Your Majesty's key and subaddressing list records to the first block chain.
Fourth aspect, the present invention provide another red packet processing method for being suitable for server-side, this method comprises:
Receive give bonus solicited message and the red packet payment transaction of the transmission of the first user terminal;Wherein, give bonus solicited message Including red packet number;
Your Majesty's key is generated, and the first index list is generated according to red packet number;Wherein, the first index list includes and red packet The index of the identical quantity of number;
Subaddressing list is generated according to Your Majesty's key and the first index list, is generated according to Your Majesty's key and subaddressing list rubescent Packet transaction;
It will give bonus transaction and red packet payment transaction be packaged as trading group and be sent to the node of the first block chain for holding Row is frozen in red packet contract with the red packet fund for paying red packet payment transaction, by Your Majesty's key and subaddressing list records to the On one block chain;
Red packet is generated according to the first index in the account information for the user for getting red packet and the first index list to get It trades and is sent to the node of the first block chain for executing to give birth to by the verifying of red packet contract according to Your Majesty's key and the first index At the first subaddressing whether be recorded in subaddressing list: be, then red packet contract to the account of user provide red packet.
5th aspect, the present invention provide another red packet processing method for being suitable for block chain node, this method comprises:
It receives and the trading group for executing server-side transmission is frozen in red packet with the red packet fund for paying red packet payment transaction In contract, will be on Your Majesty's key and subaddressing list records to the first block chain;Wherein, trading group receives the first user by server-side Give bonus solicited message and the red packet payment transaction sent is held, the red packet for generating Your Majesty's key and including according to the solicited message that gives bonus Number generates the first index list, generates subaddressing list according to Your Majesty's key and the first index list, according to Your Majesty's key and son ground List generation in location gives bonus after transaction, and will give bonus transaction and the packing generation of red packet payment transaction;
It receives and the red packet for executing server-side transmission gets transaction to verify by red packet contract according to Your Majesty's key and first Whether the first subaddressing that index generates is recorded in subaddressing list: being that then red packet contract provides red packet to the account of user; Wherein, red packet gets transaction by server-side according to first in the account information and the first index list of the user for getting red packet Index generates.
6th aspect, the present invention also provides a kind of equipment, including one or more processors and memory, wherein memory Comprising can by instruction that the one or more processors execute so that the one or more processors execute it is each according to the present invention The red packet processing method that embodiment provides.
7th aspect, the present invention also provides a kind of storage medium for being stored with computer program, which makes to count Calculation machine executes the red packet processing method that each embodiment provides according to the present invention.
Red packet processing method, equipment and the storage medium that many embodiments of the present invention provide are indexed by being generated by server-side List, and subaddressing list is generated according to Your Majesty's key and index column pellicle, by Your Majesty's key and subaddressing list records to block chain On, the first index verifying red packet for getting the red packet contract configured on block chain according to red packet in transaction gets permission, Realize the red packet processing scheme that centralization is combined with decentralization;
Red packet processing method, equipment and the storage medium that some embodiments of the invention provide are further by by red packet contract Red packet fund is distributed into the account of each subaddressing, and will be in the account of the corresponding subaddressing of the first index when providing red packet Red packet fund provided, ensured that an entry index can not be recycled and reused for red packet and get.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is the schematic diagram of a scenario of red packet processing scheme in one embodiment of the invention.
Fig. 2 is a kind of flow chart for red packet processing method suitable for server-side that one embodiment of the invention provides.
Fig. 3 is the flow chart of step S105 in a kind of embodiment of method shown in Fig. 2.
Fig. 4 is a kind of flow chart for red packet processing method suitable for block chain node that one embodiment of the invention provides.
Fig. 5 is a kind of flow chart of preferred embodiment of method shown in Fig. 4.
Fig. 6 is a kind of flow chart for red packet processing method suitable for user terminal that one embodiment of the invention provides.
Fig. 7 be another embodiment of the present invention provides a kind of red packet processing method suitable for server-side flow chart.
Fig. 8 be another embodiment of the present invention provides a kind of red packet processing method suitable for block chain node process Figure.
Fig. 9 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is the schematic diagram of a scenario of red packet processing scheme in one embodiment of the invention.To be with scene shown in FIG. 1 below Every solution provided by the invention is described in detail in example.
Fig. 2 is a kind of flow chart for red packet processing method suitable for server-side that one embodiment of the invention provides.Such as Fig. 2 Shown, in the present embodiment, the present invention provides a kind of red packet processing method suitable for server-side, comprising:
S101: give bonus solicited message and red packet payment transaction that the first user terminal is sent are received;Wherein, give bonus request Information includes red packet number;
S103: Your Majesty's key is generated, and the first index list is generated according to red packet number;Wherein, the first index list includes The index of quantity identical as red packet number;
S105: generating subaddressing list according to Your Majesty's key and the first index list, raw according to Your Majesty's key and subaddressing list At the transaction that gives bonus;
S107: will give bonus transaction and red packet payment transaction is packaged as trading group and be sent to the node of the first block chain with It is frozen in red packet contract for executing with the red packet fund for paying red packet payment transaction, by Your Majesty's key and subaddressing list records Onto the first block chain;
S109: sending the first index in the first index list to the second user end for the user for getting red packet, for Second user end is got according to the first index generation red packet trades and is sent to the node of the first block chain for executing to pass through Whether the verifying of red packet contract is recorded in subaddressing list according to the first subaddressing that Your Majesty's key and the first index generate: being, then Red packet contract provides red packet to the account of user.
Specifically, in the present embodiment, server-side 10 while the still server-side of certain immediate communication tool, user is by being somebody's turn to do The transmitting-receiving of immediate communication tool progress red packet;In more embodiments, server-side 10 is configurable to be exclusively used in red packet transmitting-receiving Server-side can be achieved or, being configured to the server-side of different communication tools of other this fields for carrying out red packet transmitting-receiving simultaneously Identical technical effect.
With in scene shown in Fig. 1, it is 100xxx coin that user's first has sent a total value in the group of the immediate communication tool 3 people's red packets, Yong Huyi, third, fourth got the red packet, Yong Huwu, oneself etc. do not get red packet for, to above-mentioned shown in Fig. 2 Method is described in detail:
User's first sends 3 people's red packets that a total value is 100xxx coin by the first user terminal 20, and the first user terminal 20 is raw It transfers accounts the red packet payment transaction tx1 of 100xxx coin at solicited message m1 and one is given bonus to red packet contract, and m1 and tx1 is sent out It send to server-side 10.Wherein, the solicited message that gives bonus m1 includes: red packet total value: 100, currency type: and xxx coin, red packet number: 3, it is red Packet distribution type: random, etc..
In step s101, server-side 10 receives give bonus solicited message m1 and the red packet that above-mentioned first user terminal 20 is sent Payment transaction tx1.
Preferably, in step slo, verifying can be compared to m1 and tx1 in server-side 10, if authentication failed, for example, The fund number of tx1 payment requests the red packet total value to give bonus less than m1, or, what the currency type of tx1 payment and request gave bonus Currency type difference, etc. then requests to fail.
In another embodiment, m1 does not include red packet total value and currency type information, server-side 10 according to the tx1 currency type paid and Number determines that m1 requests the currency type to give bonus and number.
In step s 103, server-side 10 is the above-mentioned solicited message m1 generation Your Majesty's key M that gives bonus, and according to the red packet of m1 It includes 3 the first index lists [r1, r2, r3] indexed that number (3), which generates,.
Specifically, in the present embodiment, server-side 10 is calculated using the CKD (child key derivation) of HD wallet Method generates main private key and main chain code further according to seed, further according to main private key according to the first generating random number seed generated at random Generate corresponding Your Majesty's key M;Each index in first index list is the random number generated at random;In more embodiments, Server 10 can also generate CKD algorithm according to several parameters for the solicited message m1 or red packet payment transaction tx1 that gives bonus Index in the first index list of seed or generation, as long as the parameter for generating seed or index will not be because of record to quilt on block chain Entire disclosure and lead to security risk, identical technical effect can be realized.
In step s105, server-side 10 is generated according to above-mentioned CKD algorithm, main chain code, Your Majesty's key M and the first index list Sub- list of public keys including 3 sub- public keys, and the subaddressing list including 3 subaddressings is generated according to the sub- list of public keys [add1, add2, add3], regeneration include the tx2 that trades that gives bonus of Your Majesty's key M and subaddressing list, and tx2 can also include red The information such as packet total value (100), currency type (xxx), red packet distribution type (random), red packet number (3);
In step s 107, tx1 and tx2 are packaged as trading group (tx1, tx2) by server-side 10, which is sent to The node 501 of first block chain;
Node 501 broadcasts trading group (tx1, tx2) to other each nodes 501 of the first block chain network 50, each node Trading group (tx1, tx2) is packed into block and is executed respectively by 501, and the 100xxx coin that user's first is paid is frozen in red packet and is closed In about, and Your Majesty's key M and subaddressing list [add1, add2, add3] are recorded on the first block chain.
Concurrently with above-mentioned steps S103-S107, server-side of the server-side 10 as immediate communication tool, according to giving bonus Solicited message m1 sends red packet information in group, and after the user terminal of each user receives red packet information in group, Yong Huyi, third, fourth are robbed Arrived the red packet, Yong Huwu, oneself etc. do not get red packet.
In step S109, server-side 10 respectively to get red packet user's second, third, the second user end 30 of fourth sends State index r1, r2, r3;
After the second user end 30 of user's second receives index r1, generating includes the account address add for indexing r1 and user's secondSecond Red packet get transaction tx3, and tx3 is sent to node 501;
Node 501, which is received, broadcasted and passes through red packet contract, executes tx3, generates the first son public affairs according to Your Majesty's key M, index r1 Key generates the first subaddressing add1 further according to the first sub- public key, and whether the first subaddressing add1 of verifying is recorded in subaddressing list In [add1, add2, add3]: it is then to be verified, a part of xxx coin in the 100xxx coin that above-mentioned red packet contract is freezed It transfers accounts to addSecondTo complete to provide red packet to user's second;
Similarly, the second user end 30 of user third and user's fourth generates red packet after receiving index r2 and r3 respectively respectively It gets transaction tx4 and tx5 and is sent to node 501;Node 501 passes through after red packet contract is verified respectively to user third and Ding Fafang Red packet.
Wherein, when red packet distribution type is configured to random, red packet contract can be by certain of scheduled first algorithm determination The block Hash of a block or the transaction Hash of certain transaction are as random number, and in conjunction with scheduled second algorithm, generation is at random The red packet number that user's second, third, fourth are distributed;Red packet contract can also utilize random number provided by block catenary system, such as Shen It asks someone the random digit generation method proposed in CN201811351787.0 patent random number generated, in conjunction with above-mentioned predetermined The second algorithm, generate at random for user's second, third, fourth distribution red packet number;
And when red packet distribution type is configured to respectively or when other nonrandom methods of salary distribution, red packet contract can direct basis The specified method of salary distribution is allocated.
Above-described embodiment generates subaddressing according to Your Majesty's key and index column pellicle by generating index list by server-side List allows the red packet contract configured on block chain according to red packet on Your Majesty's key and subaddressing list records to block chain The the first index verifying red packet got in transaction gets permission, realizes the red packet processing side that centralization is combined with decentralization Case.
In the above-described embodiments, it is transferred accounts with red packet payment transaction to red packet contract, it includes second that red packet, which gets transaction, For the address of user, red packet contract are transferred accounts to the address, illustrative elaboration has been carried out to the above method;
In another embodiment, red packet contract is configured with system of account, when keeping accounts to the account balance of each user, also It can configure red packet payment transaction to freeze remaining sum of first user in red packet contract, red packet is got into transaction and is configured to wrap Account identification information, the red packet contract for including second user are real by the account balance of the first user and second user in modification contract Red packet now is provided, it can be achieved that identical technical effect to second user.For example, system of account is configured in red packet contract, record There are the account balance 1000xxx coin of user's first, the account balance 0xxx coin of user's second, freezes to use by executing red packet payment transaction The 100xxx coin (the movable xxx coin of account balance 900, the 100 xxx coin freezed of user's first at this time) of family first, it is red by executing Packet get transaction tx3 modification red packet contract book keeping operation (the movable xxx coin of account balance 900 of user's first, 80 are freezed at this time Xxx coin, the account balance 20xxx coin of user's second).
In a preferred embodiment, red packet contract is configured with system of account as described above, above-mentioned by red packet payment transaction It includes: that each subaddressing included by subaddressing list is configured in red packet contract that the red packet fund of payment, which is frozen in red packet contract, Account;And the red packet fund that red packet payment transaction is paid is distributed into the account of each subaddressing;
Above-mentioned red packet contract to the account of user provide red packet include: will be in red packet contract in the account of the first subaddressing Red packet fund is issued to the account of user.
Specifically, red packet contract generates add1, add2, add3 3 accounts when executing trading group in red packet contract Family, and the red packet fund that user's first is paid is distributed by the above-mentioned method of salary distribution into 3 accounts;Hot inclusion about executes basis When the red packet that index r1 is generated is got transaction tx3 and is verified, the red packet fund in add1 account is issued to user's second Account (above-mentioned addSecondOr in red packet contract user's second account).
Above-described embodiment is being sent out further by being distributed red packet fund into the account of each subaddressing by red packet contract The red packet fund in the account of the first corresponding subaddressing of index is provided when putting red packet, has ensured that an entry index can not be by Red packet is recycled and reused for get.
Fig. 3 is the flow chart of step S105 in a kind of embodiment of method shown in Fig. 2.As shown in figure 3, in another implementation In example, step S105 includes:
S1051: according to Your Majesty's key, the first index list and enhancing key derivation (hardened key derivation, Abbreviation HKD) the sub- list of public keys of algorithm generation;
S1053: subaddressing list is generated according to sub- list of public keys;
S1055: the transaction that gives bonus is generated according to Your Majesty's key and subaddressing list.
Specifically, the difference of method shown in Fig. 3 and method shown in Fig. 2 is, server-side is calculated using the higher HKD of safety Method, rather than CKD algorithm.
Fig. 4 is a kind of flow chart for red packet processing method suitable for block chain node that one embodiment of the invention provides. Method shown in Fig. 4 can cooperate Fig. 2 or method shown in Fig. 3 to execute.
As shown in figure 4, in the present embodiment, the present invention also provides a kind of red packet processing sides suitable for block chain node Method, comprising:
S201: receiving and executes the trading group that server-side is sent is frozen in the red packet fund for paying red packet payment transaction In red packet contract, will be on Your Majesty's key and subaddressing list records to the first block chain;Wherein, trading group receives first by server-side Give bonus solicited message and the red packet payment transaction that user terminal is sent, generate Your Majesty's key and basis gives bonus what solicited message included Red packet number generates the first index list, generates subaddressing list according to Your Majesty's key and the first index list, according to Your Majesty's key and Subaddressing list generation gives bonus after transaction, and will give bonus transaction and the packing generation of red packet payment transaction;
S203: receiving and executes and gets the red packet that the second user end of the user of red packet is sent and get transaction with by red Inclusion is about verified according to whether the first subaddressing that Your Majesty's key and the first index generate is recorded in subaddressing list:
Be to then follow the steps S205: red packet contract provides red packet to the account of user.Wherein, red packet gets transaction by the After the first index of two user terminals in the first index list for receiving server-side transmission, generated according to the first index.
Preferably, above-mentioned subaddressing list is by server-side according to Your Majesty's key, the first index list and enhancing key derivation After (hardened key derivation, abbreviation HKD) algorithm generates sub- list of public keys, generated according to sub- list of public keys.
The red packet handling principle of method shown in Fig. 4 can refer to method shown in Fig. 2-3, and details are not described herein again.
Fig. 5 is a kind of flow chart of preferred embodiment of method shown in Fig. 4.Method shown in fig. 5 can cooperate Fig. 2 or figure Method provided by preferred embodiment shown in 3 executes.
As shown in figure 5, in a preferred embodiment, step S201 includes:
S2012: the account of each subaddressing included by subaddressing list is configured in red packet contract;
S2014: the red packet fund that red packet payment transaction is paid is distributed into the account of each subaddressing;
S2016: will be on Your Majesty's key and subaddressing list records to the first block chain;
Step S205 includes:
S2052: the red packet fund in red packet contract in the account of the first subaddressing is issued to the account of the user.
The method that the red packet handling principle of method shown in Fig. 5 can refer to the offer of preferred embodiment shown in Fig. 2-3, herein not It repeats again.
Fig. 6 is a kind of flow chart for red packet processing method suitable for user terminal that one embodiment of the invention provides.Fig. 6 institute The method shown can cooperate method shown in Fig. 2-5 to execute.
As shown in fig. 6, in the present embodiment, the present invention also provides a kind of red packet processing suitable for above-mentioned second user end Method, comprising:
S301: after getting red packet, the first index in the first index list that server-side is sent is received;Wherein, first Index list by server-side receive the first user terminal send give bonus solicited message and red packet payment transaction after, generate with it is rubescent The index for the red packet number same number that packet solicited message includes is formed;
S303: it is got according to the first index generation red packet and trades and be sent to the node of the first block chain for executing with logical It crosses whether the verifying of red packet contract is recorded in subaddressing list according to the first subaddressing that Your Majesty's key and the first index generate: being, Then red packet contract provides red packet;Wherein, subaddressing list by server-side generate Your Majesty's key after according to Your Majesty's key and the first index column Table generate, and by server-side according to Your Majesty's key and subaddressing list generation give bonus transaction will give bonus transaction and red packet payment hand over Easily it is packaged as trading group and is sent to the node of the first block chain for executing the red packet fund to pay red packet payment transaction Be frozen in red packet contract, will be on Your Majesty's key and subaddressing list records to the first block chain.
The red packet handling principle of method shown in Fig. 6 equally can refer to method shown in Fig. 2-3, and details are not described herein again.
Fig. 7 be another embodiment of the present invention provides a kind of red packet processing method suitable for server-side flow chart.Such as Shown in Fig. 7, in another embodiment, the present invention also provides another red packet processing methods for being suitable for server-side, comprising:
S401: give bonus solicited message and red packet payment transaction that the first user terminal is sent are received;Wherein, give bonus request Information includes red packet number;
S403: Your Majesty's key is generated, and the first index list is generated according to red packet number;Wherein, the first index list includes The index of quantity identical as red packet number;
S405: generating subaddressing list according to Your Majesty's key and the first index list, raw according to Your Majesty's key and subaddressing list At the transaction that gives bonus;
S407: will give bonus transaction and red packet payment transaction is packaged as trading group and be sent to the node of the first block chain with It is frozen in red packet contract for executing with the red packet fund for paying red packet payment transaction, by Your Majesty's key and subaddressing list records Onto the first block chain;
S409: red packet is generated according to the first index in the account information for the user for getting red packet and the first index list It gets and trades and be sent to the node of the first block chain for executing to verify by red packet contract according to Your Majesty's key and the first rope Whether the first subaddressing caused is recorded in subaddressing list: being that then red packet contract provides red packet to the account of user.
Preferably, it includes: to close in red packet that the above-mentioned red packet fund for paying red packet payment transaction, which is frozen in red packet contract, The account of each subaddressing included by configuration subaddressing list in about;And the red packet fund for paying red packet payment transaction point It is assigned in the account of each subaddressing;
Above-mentioned red packet contract to the account of user provide red packet include: will be in red packet contract in the account of the first subaddressing Red packet fund is issued to the account of user.
Preferably, step S405 includes: according to Your Majesty's key, the first index list and enhancing key derivation (hardened Key derivation, abbreviation HKD) the sub- list of public keys of algorithm generation;Subaddressing list is generated according to sub- list of public keys;And The transaction that gives bonus is generated according to Your Majesty's key and subaddressing list.
The difference of method shown in Fig. 7 and method shown in Fig. 2 is, in method shown in Fig. 7, by servicing in step S409 End 10 is got for second user generation red packet trades and is sent to node 501, and in method shown in Fig. 2, in step S109 It is got by the generation red packet of second user end 30 of second user and trades and be sent to node 501.
Fig. 8 be another embodiment of the present invention provides a kind of red packet processing method suitable for block chain node process Figure.Method shown in Fig. 8 can cooperate method shown in Fig. 7 to execute.
As shown in figure 8, in another embodiment, the present invention also provides another red packet processing for being suitable for block chain node Method, comprising:
S501: receiving and executes the trading group that server-side is sent is frozen in the red packet fund for paying red packet payment transaction In red packet contract, will be on Your Majesty's key and subaddressing list records to the first block chain;Wherein, trading group receives first by server-side Give bonus solicited message and the red packet payment transaction that user terminal is sent, generate Your Majesty's key and basis gives bonus what solicited message included Red packet number generates the first index list, generates subaddressing list according to Your Majesty's key and the first index list, according to Your Majesty's key and Subaddressing list generation gives bonus after transaction, and will give bonus transaction and the packing generation of red packet payment transaction;
S503: receiving and execute server-side transmission red packet get transaction with by the verifying of red packet contract according to Your Majesty's key and Whether the first subaddressing that the first index generates is recorded in subaddressing list:
Be to then follow the steps S505: red packet contract provides red packet to the account of user;Wherein, red packet gets transaction by taking End be engaged according to the first index generation in the account information and the first index list of the user for getting red packet.
Method shown in Fig. 8 is same as the difference of method shown in Fig. 4 to be, in method shown in Fig. 8, red packet gets transaction It is generated and sent by server-side 10 to node 501, and in method shown in Fig. 4, red packet gets transaction by second user end 30 It generates and sends to node 501.
Fig. 9 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
As shown in figure 9, present invention also provides a kind of equipment 900, including one or more centres as on the other hand Unit (CPU) 901 is managed, can be added according to the program being stored in read-only memory (ROM) 902 or from storage section 908 The program that is downloaded in random access storage device (RAM) 903 and execute various movements appropriate and processing.In RAM903, also deposit It contains equipment 900 and operates required various programs and data.CPU901, ROM902 and RAM903 pass through the phase each other of bus 904 Even.Input/output (I/O) interface 905 is also connected to bus 904.
I/O interface 905 is connected to lower component: the importation 906 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 907 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 908 including hard disk etc.; And the communications portion 909 of the network interface card including LAN card, modem etc..Communications portion 909 via such as because The network of spy's net executes communication process.Driver 910 is also connected to I/O interface 905 as needed.Detachable media 911, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 910, in order to read from thereon Computer program be mounted into storage section 908 as needed.
Particularly, in accordance with an embodiment of the present disclosure, the red packet processing method of any of the above-described embodiment description can be implemented For computer software programs.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in Computer program on machine readable media, the computer program include the program code for executing red packet processing method. In such embodiments, which can be downloaded and installed from network by communications portion 909, and/or from Detachable media 911 is mounted.
As another aspect, present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums Matter can be computer readable storage medium included in the device of above-described embodiment;It is also possible to individualism, it is unassembled Enter the computer readable storage medium in equipment.Computer-readable recording medium storage has one or more than one program, should Program is used to execute the red packet processing method for being described in the application by one or more than one processor.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depending on related function.Also it wants It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yitong The dedicated hardware based system of functions or operations as defined in executing is crossed to realize, or by specialized hardware and can be calculated The combination of machine instruction is realized.
Being described in the embodiment of the present application involved unit or module can be realized by way of software, can also be with It is realized by way of hardware.Described unit or module also can be set in the processor, for example, each unit can To be the software program being arranged in computer or intelligent movable equipment, it is also possible to the hardware device being separately configured.Wherein, this The title of a little units or module does not constitute the restriction to the unit or module itself under certain conditions.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from the application design, appointed by above-mentioned technical characteristic or its equivalent feature Other technical solutions of meaning combination and formation.Such as features described above and (but being not limited to) disclosed herein have similar functions Technical characteristic replaced mutually and the technical solution that is formed.

Claims (17)

1. a kind of red packet processing method, which is characterized in that the method is suitable for server-side, which comprises
Receive give bonus solicited message and the red packet payment transaction of the transmission of the first user terminal;Wherein, the solicited message that gives bonus Including red packet number;
Your Majesty's key is generated, and the first index list is generated according to the red packet number;Wherein, first index list include with The index of the identical quantity of the red packet number;
Subaddressing list is generated according to Your Majesty's key and first index list, according to Your Majesty's key and the subaddressing List generates the transaction that gives bonus;
By it is described give bonus transaction and the red packet payment transaction be packaged as trading group and be sent to the node of the first block chain with It is frozen in red packet contract with the red packet fund for paying the red packet payment transaction, for executing by Your Majesty's key and the son Address list is recorded on the first block chain;
The first index in first index list is sent to the second user end for the user for getting red packet, for described the Two user terminals are got according to the first index generation red packet trades and is sent to the node of the first block chain for executing Whether to be recorded in by red packet contract verifying according to the first subaddressing that Your Majesty's key and first index generate In the subaddressing list: being that then the red packet contract provides red packet to the account of the user.
2. the method according to claim 1, wherein the red packet fund that the red packet payment transaction is paid It is frozen in red packet contract and includes:
The account of each subaddressing included by the subaddressing list is configured in red packet contract;
The red packet fund that the red packet payment transaction is paid is distributed into the account of each subaddressing;
It includes: by the first subaddressing described in the red packet contract that the red packet contract, which provides red packet to the account of the user, Red packet fund in account is issued to the account of the user.
3. method according to claim 1 or 2, which is characterized in that described to be indexed according to Your Majesty's key with described first List generates subaddressing list
According to Your Majesty's key, first index list and enhancing key derivation (hardenedkey derivation, abbreviation HKD) algorithm generates sub- list of public keys;
Subaddressing list is generated according to sub- list of public keys.
4. a kind of red packet processing method, which is characterized in that the method is suitable for block chain node, which comprises
It receives and the trading group for executing server-side transmission is frozen in red packet contract with the red packet fund for paying red packet payment transaction In, will be on Your Majesty's key and subaddressing list records to the first block chain;Wherein, the trading group receives first by the server-side Give bonus solicited message and the red packet payment transaction that user terminal is sent generate Your Majesty's key and according to the request packet that gives bonus The red packet number included generates the first index list, generates subaddressing list according to Your Majesty's key and first index list, After generating the transaction that gives bonus according to Your Majesty's key and the subaddressing list, by give bonus transaction and the red packet payment Transaction, which is packaged, to be generated;
It receives and the red packet for executing the second user end transmission for getting the user of red packet gets transaction to close by the red packet It about verifies according to whether the first subaddressing that Your Majesty's key and the first index generate is recorded in the subaddressing list: being, Then the red packet contract provides red packet to the account of the user;Wherein, the red packet gets transaction by the second user end After receiving the first index in first index list that the server-side is sent, generated according to first index.
5. according to the method described in claim 4, it is characterized in that, the red packet fund that the red packet payment transaction is paid It is frozen in red packet contract and includes:
The account of each subaddressing included by the subaddressing list is configured in red packet contract;
The red packet fund that the red packet payment transaction is paid is distributed into the account of each subaddressing;
It includes: by the first subaddressing described in the red packet contract that the red packet contract, which provides red packet to the account of the user, Red packet fund in account is issued to the account of the user.
6. method according to claim 4 or 5, which is characterized in that the subaddressing list is by the server-side according to institute State Your Majesty's key, first index list and enhancing key derivation (hardened key derivation, abbreviation HKD) algorithm After generating sub- list of public keys, generated according to the sub- list of public keys.
7. a kind of red packet processing method, which is characterized in that the method is suitable for user terminal, which comprises
After getting red packet, the first index in the first index list that server-side is sent is received;Wherein, first index column After table is received give bonus solicited message and the red packet payment transaction that the first user terminal is sent by the server-side, generate and the hair The index for the red packet number same number that red packet solicited message includes is formed;
It is got according to the first index generation red packet and trades and be sent to the node of the first block chain for executing by red Inclusion is about verified according to whether the first subaddressing that Your Majesty's key and first index generate is recorded in subaddressing list: be, Then the red packet contract provides red packet;Wherein, the subaddressing list by the server-side generate Your Majesty's key after according to the master Public key and first index list generate, and generate hair according to Your Majesty's key and the subaddressing list by the server-side Give bonus transaction and the red packet payment transaction are packaged as trading group and are sent to the section of the first block chain by red packet transaction Point is frozen in red packet contract, by Your Majesty's key and institute for executing with the red packet fund for paying the red packet payment transaction It states in subaddressing list records to the first block chain.
8. the method according to the description of claim 7 is characterized in that the red packet fund that the red packet payment transaction is paid It is frozen in red packet contract and includes:
The account of each subaddressing included by the subaddressing list is configured in red packet contract;
The red packet fund that the red packet payment transaction is paid is distributed into the account of each subaddressing;
It includes: the red packet money in the account of the first subaddressing according to the red packet contract that the red packet contract, which provides red packet, Item provides red packet.
9. method according to claim 7 or 8, which is characterized in that the subaddressing list is by the server-side according to institute State Your Majesty's key, first index list and enhancing key derivation (hardened key derivation, abbreviation HKD) algorithm After generating sub- list of public keys, generated according to the sub- list of public keys.
10. a kind of red packet processing method, which is characterized in that the method is suitable for server-side, which comprises
Receive give bonus solicited message and the red packet payment transaction of the transmission of the first user terminal;Wherein, the solicited message that gives bonus Including red packet number;
Your Majesty's key is generated, and the first index list is generated according to the red packet number;Wherein, first index list include with The index of the identical quantity of the red packet number;
Subaddressing list is generated according to Your Majesty's key and first index list, according to Your Majesty's key and the subaddressing List generates the transaction that gives bonus;
By it is described give bonus transaction and the red packet payment transaction be packaged as trading group and be sent to the node of the first block chain with It is frozen in red packet contract with the red packet fund for paying the red packet payment transaction, for executing by Your Majesty's key and the son Address list is recorded on the first block chain;
Red packet is generated according to the first index in the account information for the user for getting red packet and first index list to get It trades and is sent to the node of the first block chain for executing to verify by the red packet contract according to Your Majesty's key With it is described first index generate the first subaddressing whether be recorded in the subaddressing list: be, then the red packet contract to The account of the user provides red packet.
11. according to the method described in claim 10, it is characterized in that, the red packet money that the red packet payment transaction is paid Item, which is frozen in red packet contract, includes:
The account of each subaddressing included by the subaddressing list is configured in red packet contract;
The red packet fund that the red packet payment transaction is paid is distributed into the account of each subaddressing;
It includes: by the first subaddressing described in the red packet contract that the red packet contract, which provides red packet to the account of the user, Red packet fund in account is issued to the account of the user.
12. method described in 0 or 11 according to claim 1, which is characterized in that described according to Your Majesty's key and first rope Drawing list generation subaddressing list includes:
According to Your Majesty's key, first index list and enhancing key derivation (hardenedkey derivation, abbreviation HKD) algorithm generates sub- list of public keys;
Subaddressing list is generated according to sub- list of public keys.
13. a kind of red packet processing method, which is characterized in that the method is suitable for block chain node, which comprises
It receives and the trading group for executing server-side transmission is frozen in red packet contract with the red packet fund for paying red packet payment transaction In, will be on Your Majesty's key and subaddressing list records to the first block chain;Wherein, the trading group receives first by the server-side Give bonus solicited message and the red packet payment transaction that user terminal is sent generate Your Majesty's key and according to the request packet that gives bonus The red packet number included generates the first index list, generates subaddressing list according to Your Majesty's key and first index list, After generating the transaction that gives bonus according to Your Majesty's key and the subaddressing list, by give bonus transaction and the red packet payment Transaction, which is packaged, to be generated;
It receives and executes the red packet that the server-side is sent and get transaction to verify by the red packet contract according to the Your Majesty Whether the first subaddressing that key and the first index generate is recorded in the subaddressing list: being that then the red packet contract is to institute The account for stating user provides red packet;Wherein, the red packet gets transaction by the server-side according to the user's for getting red packet The first index in account information and first index list generates.
14. according to the method for claim 13, which is characterized in that the red packet money for paying the red packet payment transaction Item, which is frozen in red packet contract, includes:
The account of each subaddressing included by the subaddressing list is configured in red packet contract;
The red packet fund that the red packet payment transaction is paid is distributed into the account of each subaddressing;
It includes: by the first subaddressing described in the red packet contract that the red packet contract, which provides red packet to the account of the user, Red packet fund in account is issued to the account of the user.
15. method described in 3 or 14 according to claim 1, which is characterized in that the subaddressing list by the server-side according to Your Majesty's key, first index list and enhancing key derivation (hardened key derivation, abbreviation HKD) are calculated After method generates sub- list of public keys, generated according to the sub- list of public keys.
16. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors Execute the method as described in any one of claim 1-15.
17. a kind of storage medium for being stored with computer program, which is characterized in that realize when the program is executed by processor as weighed Benefit requires method described in any one of 1-15.
CN201910110386.4A 2019-02-11 2019-02-11 Red packet processing method, device and storage medium Active CN109903025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910110386.4A CN109903025B (en) 2019-02-11 2019-02-11 Red packet processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910110386.4A CN109903025B (en) 2019-02-11 2019-02-11 Red packet processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109903025A true CN109903025A (en) 2019-06-18
CN109903025B CN109903025B (en) 2023-01-13

Family

ID=66944731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910110386.4A Active CN109903025B (en) 2019-02-11 2019-02-11 Red packet processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN109903025B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535664A (en) * 2019-09-20 2019-12-03 腾讯科技(深圳)有限公司 Data processing method, device, server and storage medium based on block chain
CN116452200A (en) * 2022-12-29 2023-07-18 胖迪科技(深圳)有限公司 Red packet receiving and sending method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018120121A1 (en) * 2016-12-30 2018-07-05 深圳前海达闼云端智能科技有限公司 Block chain permission control method, device, and node apparatus
CN108921525A (en) * 2018-06-29 2018-11-30 北京金山安全软件有限公司 Processing method and device for block chain red packet, electronic equipment and medium
CN108985760A (en) * 2018-06-15 2018-12-11 杭州复杂美科技有限公司 Method of payment and system, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018120121A1 (en) * 2016-12-30 2018-07-05 深圳前海达闼云端智能科技有限公司 Block chain permission control method, device, and node apparatus
CN108985760A (en) * 2018-06-15 2018-12-11 杭州复杂美科技有限公司 Method of payment and system, equipment and storage medium
CN108921525A (en) * 2018-06-29 2018-11-30 北京金山安全软件有限公司 Processing method and device for block chain red packet, electronic equipment and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535664A (en) * 2019-09-20 2019-12-03 腾讯科技(深圳)有限公司 Data processing method, device, server and storage medium based on block chain
CN116452200A (en) * 2022-12-29 2023-07-18 胖迪科技(深圳)有限公司 Red packet receiving and sending method and device, electronic equipment and storage medium
CN116452200B (en) * 2022-12-29 2024-05-31 胖迪科技(深圳)有限公司 Red packet receiving and sending method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109903025B (en) 2023-01-13

Similar Documents

Publication Publication Date Title
CN109816362A (en) Red packet processing method, equipment and storage medium
CN109727009A (en) Red envelope processing method, equipment and storage medium
JP7625675B2 (en) Method for distributing digital assets registered on a blockchain and autonomous computing agent
CN109784888A (en) Red packet processing method, equipment and storage medium
US10997551B2 (en) System and method for automotive inventory management and recordkeeping using multi-tiered distributed network transactional database
US20200099512A1 (en) System and method for security gateway for high security blockchain systems
CN108492105A (en) Transaction in assets monitoring and managing method, system, equipment and storage medium based on block chain
US11042804B2 (en) System and method for providing security gateways for high security blockchain systems
CN109325762A (en) Across the chain method of commerce of parallel chain, equipment and storage medium
CN109447648A (en) Method, accounting node and medium for recording data blocks in a blockchain network
CN108416650A (en) Vehicle sharing method, device, server and computer readable storage medium
KR20180112061A (en) Registry and automation management methods for smart contracts in block chain enforcement
CN109741052A (en) Red packet processing method, equipment and storage medium
US20200153793A1 (en) Security gateway for high security blockchain systems
CN109934566A (en) Red packet processing method, equipment and storage medium
CN109558454A (en) Parallel chain digs mine common recognition method, equipment and storage medium
CN110288346A (en) Block chain distributed storage method for down loading, equipment and storage medium
CN109146488A (en) Assets match method, assets match system, equipment and storage medium
CN108665363A (en) A kind of block chain common recognition reaches device
CN109903025A (en) Red packet processing method, equipment and storage medium
WO2020113139A1 (en) System and method for security gateway for high security blockchain systems
KR20220065256A (en) A method for providing exchange services of ownership item assets using non-fungible tokens based on block chain networks, an apparatus and a system using it
KR20220065258A (en) A method for providing exchange services of ownership item assets using non-fungible tokens based on block chain networks, an apparatus and a system using it
CN109948960A (en) Remove storehouse outbound, storage method and device and electronic equipment and storage medium
KR20220065257A (en) A method for providing exchange services of ownership item assets using non-fungible tokens based on block chain networks, an apparatus and a system using it

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