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

Red packet processing method, equipment and storage medium Download PDF

Info

Publication number
CN109934566A
CN109934566A CN201910110387.9A CN201910110387A CN109934566A CN 109934566 A CN109934566 A CN 109934566A CN 201910110387 A CN201910110387 A CN 201910110387A CN 109934566 A CN109934566 A CN 109934566A
Authority
CN
China
Prior art keywords
red packet
list
subaddressing
key
majesty
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
CN201910110387.9A
Other languages
Chinese (zh)
Other versions
CN109934566B (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 CN201910110387.9A priority Critical patent/CN109934566B/en
Publication of CN109934566A publication Critical patent/CN109934566A/en
Application granted granted Critical
Publication of CN109934566B publication Critical patent/CN109934566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of red packet processing method, equipment and storage medium, this method comprises: receiving the solicited message that gives bonus 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;The transaction that will give bonus return to the first user terminal for will 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 block chain;The first index in the first index list is sent to the user terminal for getting red packet, for 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 the solicited message that gives bonus of the first user terminal transmission;Wherein, the solicited message that gives bonus includes 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;
The transaction that will give bonus returns to the first user terminal for that 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 for execute with the red packet fund for paying red packet payment transaction be frozen in red packet close In about, 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 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 is from the first user terminal to server-side Transmission gives bonus solicited message, and server-side generates Your Majesty's key and generates first according to the red packet number that the solicited message that gives bonus includes Index list, generates subaddressing list according to Your Majesty's key and the first index list, generates hair according to Your Majesty's key and subaddressing list After red packet trades and returns to the first user terminal, will give bonus transaction and red packet payment transaction of the first user terminal is packaged and generates;
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:
Generation gives bonus solicited message and to be sent to server-side, so that server-side generates Your Majesty's key and according to giving bonus request The red packet number that information includes generates the first index list, generates subaddressing list, root according to Your Majesty's key and the first index list It gives bonus and transaction and returns according to Your Majesty's key and subaddressing list generation;
Reception gives bonus transaction, will give bonus transaction and red packet payment transaction is packaged as trading group and is sent to the first block The node of chain is frozen in red packet contract, by Your Majesty's key and son for executing with the red packet fund for paying red packet payment transaction In location list records to the first block chain.
Fourth 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 the solicited message that gives bonus that the first user terminal is sent by server-side, red packet that the solicited message that generates and give bonus includes The index of number same number 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 given bonus by server-side according to Your Majesty's key and subaddressing list generation and trade and return to the first user terminal, the first user End will give bonus transaction and red packet payment transaction is packaged as trading group and is sent to the node of the first block chain for executing with will The red packet fund of red packet payment transaction payment is frozen in red packet contract, by Your Majesty's key and subaddressing list records to the first block On chain.
5th aspect, the present invention provide another red packet processing method for being suitable for server-side, this method comprises:
Receive the solicited message that gives bonus of the first user terminal transmission;Wherein, the solicited message that gives bonus includes 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;
The transaction that will give bonus returns to the first user terminal for that 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 for execute with the red packet fund for paying red packet payment transaction be frozen in red packet close In about, will be on Your Majesty's key and subaddressing list records to 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 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.
6th 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 is from the first user terminal to server-side Transmission gives bonus solicited message, and server-side generates Your Majesty's key and generates first according to the red packet number that the solicited message that gives bonus includes Index list, generates subaddressing list according to Your Majesty's key and the first index list, generates hair according to Your Majesty's key and subaddressing list After red packet trades and returns to the first user terminal, will give bonus transaction and red packet payment transaction of the first user terminal is packaged and generates;
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.
7th 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.
Eighth 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 is the flow chart for the red packet processing method that the another kind that one embodiment of the invention provides is suitable for user terminal.
Fig. 8 be another embodiment of the present invention provides a kind of red packet processing method suitable for server-side flow chart.
Fig. 9 be another embodiment of the present invention provides a kind of red packet processing method suitable for block chain node process Figure.
Figure 10 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: the solicited message that gives bonus that the first user terminal is sent is received;Wherein, the solicited message that gives bonus 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: the transaction that will give bonus returns to the first user terminal for that 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 for execute be frozen in the red packet fund for paying red packet payment transaction it is red Inclusion about in, will be on Your Majesty's key and subaddressing list records to 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 is sent 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, red packet point With type: random, etc..
In step s101, server-side 10 receives the solicited message m1 that gives bonus that above-mentioned first user terminal 20 is sent.
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 the seed of CKD algorithm according to several parameters for the solicited message m1 that gives bonus or generate the first index Index in list, if generate seed or index parameter will not because on record to block chain by entire disclosure due to lead to safety Identical technical effect can be realized in hidden danger.
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, will the give bonus tx2 that trades of server-side 10 returns to the first user terminal 20 of user's first, and first uses After family end 20 receives tx2, tx1 and tx2 are packaged as trading group (tx1, tx2), which are sent to the first block chain Node 501;
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 is from the first user terminal to clothes Business end gives bonus solicited message, the red packet number generation that server-side generates Your Majesty's key and includes according to the solicited message that gives bonus First index list generates subaddressing list according to Your Majesty's key and the first index list, raw according to Your Majesty's key and subaddressing list It trades and after returning to the first user terminal at giving bonus, the first user terminal will give bonus transaction and red packet payment transaction is packaged life At;
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 first user terminal Method, comprising:
S301: generation gives bonus solicited message and to be sent to server-side, so that server-side generates Your Majesty's key and according to rubescent The red packet number that packet solicited message includes generates the first index list, generates subaddressing column according to Your Majesty's key and the first index list Table gives bonus and transaction and returns according to Your Majesty's key and subaddressing list generation;
S303: reception gives bonus transaction, will give bonus transaction and red packet payment transaction is packaged as trading group and is sent to the The node of one block chain is frozen in red packet contract, by Your Majesty's key for executing with the red packet fund for paying red packet payment transaction In 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 is a kind of flow chart for red packet processing method suitable for user terminal that one embodiment of the invention provides.Fig. 7 institute The method shown can cooperate method shown in Fig. 2-5 to execute.
As shown in fig. 7, in the present embodiment, the present invention also provides a kind of red packet processing suitable for above-mentioned second user end Method, comprising:
S401: after getting red packet, the first index in the first index list that server-side is sent is received;Wherein, first After index list is received the solicited message that gives bonus that the first user terminal is sent by server-side, the solicited message that generates and give bonus includes The index of red packet number same number formed;
S403: 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 generates, and is given bonus by server-side according to Your Majesty's key and subaddressing list generation and trade and return to the first user terminal, and first User terminal will give bonus transaction and red packet payment transaction is packaged as trading group and is sent to the node of the first block chain for executing It 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 first On block chain.
The red packet handling principle of method shown in Fig. 7 equally can refer to method shown in Fig. 2-3, and details are not described herein again.
Fig. 8 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. 8, in another embodiment, the present invention also provides another red packet processing methods for being suitable for server-side, comprising:
S501: the solicited message that gives bonus that the first user terminal is sent is received;Wherein, the solicited message that gives bonus includes red packet Number;
S503: 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;
S505: 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;
S507: the transaction that will give bonus returns to the first user terminal for that 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 for execute be frozen in the red packet fund for paying red packet payment transaction it is red Inclusion about in, will be on Your Majesty's key and subaddressing list records to the first block chain;
S509: 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 S505 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. 8 and method shown in Fig. 2 is, in method shown in Fig. 8, by servicing in step S509 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. 9 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. 9 can cooperate method shown in Fig. 8 to execute.
As shown in figure 9, in another embodiment, the present invention also provides another red packet processing for being suitable for block chain node Method, comprising:
S601: 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 is from the first user terminal to clothes Business end gives bonus solicited message, the red packet number generation that server-side generates Your Majesty's key and includes according to the solicited message that gives bonus First index list generates subaddressing list according to Your Majesty's key and the first index list, raw according to Your Majesty's key and subaddressing list It trades and after returning to the first user terminal at giving bonus, the first user terminal will give bonus transaction and red packet payment transaction is packaged life At;
S603: 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 S605: 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. 9 is same as the difference of method shown in Fig. 4 to be, in the method as shown in figure 9, 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.
Figure 10 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
As shown in Figure 10, as on the other hand, present invention also provides a kind of equipment 1000, including one or more centers Processing unit (CPU) 1001, can be according to the program being stored in read-only memory (ROM) 1002 or from storage section 1008 programs being loaded into random access storage device (RAM) 1003 and execute various movements appropriate and processing.In RAM1003 In, it is also stored with equipment 1000 and operates required various programs and data.CPU1001, ROM1002 and RAM1003 pass through total Line 1004 is connected with each other.Input/output (I/O) interface 1005 is also connected to bus 1004.
I/O interface 1005 is connected to lower component: the importation 1006 including keyboard, mouse etc.;Including such as cathode The output par, c 1007 of ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section including hard disk etc. 1008;And the communications portion 1009 of the network interface card including LAN card, modem etc..Communications portion 1009 passes through Communication process is executed by the network of such as internet.Driver 1010 is also connected to I/O interface 1005 as needed.It is detachable to be situated between Matter 1011, such as disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 1010, so as to In being mounted into storage section 1008 as needed from the computer program read thereon.
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 1009, and/or from Detachable media 1011 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 (18)

1. a kind of red packet processing method, which is characterized in that the method is suitable for server-side, which comprises
Receive the solicited message that gives bonus of the first user terminal transmission;Wherein, the solicited message that gives bonus includes 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;
The transaction that gives bonus is returned into first user terminal for giving bonus transaction and red packet payment transaction is beaten for described Packet is trading group and is sent to the node of the first block chain for executing the red packet fund to pay the red packet payment transaction Be frozen in red packet contract, will be on Your Majesty's key and the subaddressing list records to 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 is from the first user terminal to the clothes Business end gives bonus solicited message, red packet server-side generation Your Majesty's key and include according to the solicited message that gives bonus Number generates the first index list, subaddressing list is generated according to Your Majesty's key and first index list, according to described Your Majesty's key and subaddressing list generation give bonus after trading and returning to first user terminal, and first user terminal 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 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
Generation gives bonus solicited message and to be sent to server-side, Your Majesty's key and is given bonus according to described so that the server-side generates The red packet number that solicited message includes generates the first index list, generates son according to Your Majesty's key and first index list Address list gives bonus and transaction and returns according to Your Majesty's key and subaddressing list generation;
Give bonus transaction described in reception, gives bonus transaction and red packet payment transaction is packaged as trading group and is sent to first for described The node of block chain for execute be frozen in red packet contract with the red packet fund for paying red packet payment transaction, by Your Majesty's key and In subaddressing list records to the first block chain.
8. 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 the solicited message that gives bonus that the first user terminal is sent by the server-side, generate and the request packet that gives bonus The index of the red packet number same number included 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 Red packet trades and returns to first user terminal, and first user terminal hands over give bonus transaction and the red packet payment Easily it is packaged as trading group and is sent to the node of the first block chain for executing the red packet to pay the red packet payment transaction Fund is frozen in red packet contract, will be on Your Majesty's key and the subaddressing list records to the first block chain.
9. according to the method described in claim 8, 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: 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.
10. method according to claim 8 or claim 9, 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.
11. a kind of red packet processing method, which is characterized in that the method is suitable for server-side, which comprises
Receive the solicited message that gives bonus of the first user terminal transmission;Wherein, the solicited message that gives bonus includes 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;
The transaction that gives bonus is returned into first user terminal for giving bonus transaction and red packet payment transaction is beaten for described Packet is trading group and is sent to the node of the first block chain for executing the red packet fund to pay the red packet payment transaction Be frozen in red packet contract, will be on Your Majesty's key and the subaddressing list records to 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.
12. according to the method for claim 11, 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.
13. method according to claim 11 or 12, 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 (hardened key derivation, letter Claim HKD) the sub- list of public keys of algorithm generation;
Subaddressing list is generated according to sub- list of public keys.
14. 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 is from the first user terminal to the clothes Business end gives bonus solicited message, red packet server-side generation Your Majesty's key and include according to the solicited message that gives bonus Number generates the first index list, subaddressing list is generated according to Your Majesty's key and first index list, according to described Your Majesty's key and subaddressing list generation give bonus after trading and returning to first user terminal, and first user terminal will Give bonus transaction and the packing generation of red packet payment transaction;
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.
15. according to the method for claim 14, 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.
16. method according to claim 14 or 15, 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.
17. 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-16.
18. 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-16.
CN201910110387.9A 2019-02-11 2019-02-11 Red packet processing method, device and storage medium Active CN109934566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910110387.9A CN109934566B (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
CN201910110387.9A CN109934566B (en) 2019-02-11 2019-02-11 Red packet processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109934566A true CN109934566A (en) 2019-06-25
CN109934566B CN109934566B (en) 2023-04-14

Family

ID=66985556

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN109934566B (en)

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
CN110827006A (en) * 2019-11-06 2020-02-21 杭州复杂美科技有限公司 Code scanning red packet generating method, equipment and storage medium
CN110955407A (en) * 2019-11-21 2020-04-03 杭州趣链科技有限公司 Random number taking method based on block chain

Citations (4)

* 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
CN108876359A (en) * 2018-01-03 2018-11-23 上海指旺信息科技有限公司 Stored value card platform based on block chain
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 (4)

* 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
CN108876359A (en) * 2018-01-03 2018-11-23 上海指旺信息科技有限公司 Stored value card platform based on block chain
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 (4)

* 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
CN110827006A (en) * 2019-11-06 2020-02-21 杭州复杂美科技有限公司 Code scanning red packet generating method, equipment and storage medium
CN110955407A (en) * 2019-11-21 2020-04-03 杭州趣链科技有限公司 Random number taking method based on block chain
CN110955407B (en) * 2019-11-21 2022-04-01 杭州趣链科技有限公司 Random number taking method based on block chain

Also Published As

Publication number Publication date
CN109934566B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN109816362A (en) Red packet processing method, equipment and storage medium
CN109784888A (en) Red packet processing method, equipment and storage medium
Ferraro et al. Distributed ledger technology for smart cities, the sharing economy, and social compliance
CN109727009A (en) Red packet processing method, equipment and storage medium
CN110175913B (en) Data processing system, method, computing device and storage medium based on block chain
CN108492105A (en) Transaction in assets monitoring and managing method, system, equipment and storage medium based on block chain
CN109886677B (en) Commodity purchasing method and device based on block chain
CN109741052A (en) Red packet processing method, equipment and storage medium
CN109325762A (en) Across the chain method of commerce of parallel chain, equipment and storage medium
CN109934566A (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
CN105469510A (en) Encryption currency wallet capable of noticing in advance delayed payment or finding
CN108470401A (en) A kind of intelligent gas meter system of the light wallet of band
CN108053198A (en) A kind of Digital Media transaction system based on block chain technology
CN110113409A (en) Parallel chain authorization node configuration method, equipment and storage medium
CN109558454A (en) Parallel chain digs mine common recognition method, equipment and storage medium
CN109272388A (en) A kind of purchase method based on block chain, equipment and storage medium
CN109359959A (en) Across chain assets transfer method, equipment and storage medium
CN107346511A (en) A kind of big data method for secure transactions
CN110443610A (en) For reducing method and system, equipment and the storage medium of trading group repeated broadcast
CN109410039A (en) Pledge loaning bill method, equipment and storage medium
CN110009365A (en) User group's detection method, device and the equipment of improper transfer electronic asset
CN108446968A (en) A kind of method, apparatus and terminal device of accounting entry
CN109034766A (en) Loaning bill method and system, equipment and storage medium
CN109146488A (en) Assets match method, assets match system, equipment and storage medium

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