CN106095877A - A kind of red packet data processing method and device - Google Patents

A kind of red packet data processing method and device Download PDF

Info

Publication number
CN106095877A
CN106095877A CN201610395873.6A CN201610395873A CN106095877A CN 106095877 A CN106095877 A CN 106095877A CN 201610395873 A CN201610395873 A CN 201610395873A CN 106095877 A CN106095877 A CN 106095877A
Authority
CN
China
Prior art keywords
red packet
red
rob
data
data base
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.)
Pending
Application number
CN201610395873.6A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN201610395873.6A priority Critical patent/CN106095877A/en
Publication of CN106095877A publication Critical patent/CN106095877A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries

Abstract

The invention provides red packet data processing method and device, the method includes: creating red packet data according to the request of giving bonus, described red packet data include the red packet number being cached in distributed caching;According to one or more red packet numbers robbing red packet data described in red packet requesting query, if red packet number is not more than zero, then returns and rob red packet failure information, if red packet number is more than zero, then described red packet number is subtracted one, and the related information of red packet success robbed is inserted into data base.In accordance with the invention it is possible to improve the treatment effeciency of red packet data, improve request answer speed.

Description

A kind of red packet data processing method and device
Technical field
The present invention relates to data processing field, specifically for, relate to a kind of red packet data processing method and device.
Background technology
Electronics red packet is the invisible red packet that can send in the network platform, and user has only to input the relevant letters such as the amount of money Red packet just can be divided into and one or more is sent to other users one or more by breath, or robbed by one or more users Arrive.In existing red packet data transmission procedure, the quantity of the client receiving or robbing red packet is bigger, and the moment robbed is also Send out amount very big, how to keep higher response speed to become when concurrency is the biggest in moment and need the important of solution badly One of technical problem, additionally, on the premise of keeping preferable concurrency, keep red packet sends the one of the related datas such as record Cause property also becomes one of important technological problems needing solution badly.
Summary of the invention
For solving above-mentioned technical problem, the invention provides a kind of red packet data processing method and device, it is possible to increase red The treatment effeciency of bag data, improves request answer speed.
First aspect according to embodiment of the present invention, it is provided that a kind of red packet data processing method, the method includes: root Creating red packet data according to the request of giving bonus, described red packet data include the red packet number being cached in distributed caching;According to one Or the multiple red packet number robbed in red packet data described in red packet requesting query, if red packet number is not more than zero, then returns and rob red packet Failure information, if red packet number is more than zero, then subtracts one by described red packet number, and the related information of red packet success robbed is inserted Enter to data base.
Second aspect according to embodiment of the present invention, it is provided that a kind of red packet data processing equipment, described device includes: Give bonus module, and for creating red packet data according to the request of giving bonus, described red packet data include being cached in distributed caching Red packet number;Rob red packet module, be used for: according to one or more red packets robbed in red packet data described in red packet requesting query Number, if red packet number is not more than zero, then returns and robs red packet failure information, if red packet number is more than zero, then by described red packet number Subtract one, and the related information of red packet success robbed is inserted into data base.
The red packet data processing method of present invention enforcement and device, using red packet number as the key message in red packet data It is cached in distributed caching, the data access efficiency during being conducive to lifting to rob red packet;And, robbing the process of red packet In, first inquiry red packet number, when residue number is not more than zero, directly returns failure information, no longer carry out other The data manipulation of red packet association, it is possible to improve the response speed robbing red packet request;And determining the red packet number feelings more than zero Under shape, just carry out the Correlation method for data processing of red packet, it is possible to carry out effective flow-control to robbing red packet request, improve robbing red packet The response speed of request.
Accompanying drawing explanation
Fig. 1 is the integrated stand composition of the integration red packet according to one embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the red packet data processing method according to one embodiment of the present invention;
Fig. 3 is the schematic flow sheet given bonus according to one embodiment of the present invention;
Fig. 4 is the schematic flow sheet that red packet is robbed in the inquiry according to one embodiment of the present invention;
Fig. 5 is the schematic flow sheet tearing red packet open according to one embodiment of the present invention;
Fig. 6 is the schematic flow sheet getting red packet according to one embodiment of the present invention;
Fig. 7 is the structural representation of the red packet data processing equipment according to one embodiment of the present invention.
Detailed description of the invention
It is described in detail to various aspects of the present invention below in conjunction with the drawings and specific embodiments.Wherein, many institute's weeks Module, unit and the connection each other thereof known, link, communicate or operate and be shown without or do not elaborate.Further, institute The feature, framework or the function that describe can combine in one or more embodiments by any way.People in the art Member should be appreciated that following various embodiments are served only for illustrating, not for limiting the scope of the invention.Also may be used With easy to understand, module in each embodiment described herein and shown in the drawings or unit or processing mode can by various not It is combined with configuration and designs.
The red packet of embodiment of the present invention can be to be the form of integration or other products similar with integration, such as, at certain The integration (such as, the integration etc. of deposit card, the credit card) that one mechanism (such as, bank and other financial mechanism) accumulates, it is also possible to be to remove Other forms outside integration, such as, currency etc..In embodiment below, mainly as a example by the red packet of integrated form It is described, but the red packet of the present invention can be applicable to the situation of non-integrated form, at the data of the red packet of non-integrated form Reason process, similar with the flow process that the red packet data of integrated form process, difference essentially consist in the integration involved by red packet or The quantity of currency adjusts, and for integration red packet, can be adjusted, for goods by the balance adjustment transaction of integrating system For coin red packet, by corresponding currency managing system, remaining sum etc. can be adjusted.
Red packet data for integrated form process, and the information of red packet is integration.During sending red packet, need to adjust Adjusting transaction by the balance of points of integrated integral system, deduction sends the corresponding integration of the client of red packet.Client get red Bag, during getting red packet, needs to call the balance adjustment transaction of integrated integral system, forwards to rob by the red packet integration got In client's points account of red packet.As a example by the integration red packet of bank of Construction Bank, client sends, rob red packet is all that integration is red Bag, the client sending red packet needs the client for Construction Bank, gets the client of red packet after becoming the client of Construction Bank, Successfully the integration red packet got can be forwarded in the points account of self.
Below as a example by Fig. 1, the overall architecture of integration red packet is carried out simple illustration.Wechat bank 11, may be used for Initiate the request of integration red packet associative operation, and the contact person that red packet message informing is sent to specify will be robbed, such as, it is intended that wechat The contact person of circle of friends.Distributed caching 12, for preserving the key message of red packet data, such as, red packet number etc., at this In some bright embodiments, the number of red packet can also be described by the residue number of red packet;It is additionally operable to each red Bag integrated value calculates logic serialization.Integrated integral red packet module 13, can ask with receiving front-end client's integration red packet, and to asking Ask and be scheduling.Data base 14, may be used for preserving red packet, red packet granting and the related information of red packet such as getting.Integrated integral System 15, can receive integrated integral red packet module balance adjustment transaction request, it is achieved gives bonus and deducts integration, get red packet increasing Accretion grades process logic.Can be based on HTML (Hypertext Markup Language) between integrated integral red packet module 13 integrated integral system 15 (Hyper Text Transfer Protocol, HTTP) calls communication, it is also possible to use the remote procedure call of Netty (Remote Procedure Call, RPC) agreement, thus improve the communication efficiency of communication and the concurrency called.
Fig. 2 is the schematic flow sheet of the red packet data processing method according to one embodiment of the present invention.
As in figure 2 it is shown, the red packet data processing method of the present invention comprises the steps that step S11, S12, S13 and S14.It follows that Above-mentioned step is specifically described.
Step S11, creates red packet data according to the request of giving bonus, and wherein, described red packet data can include being cached in distribution The red packet number of formula caching.Such as, user can be by interface requests of giving bonus such as wechat banks, such as, it may include long-pending The quantity etc. divided.After the request of giving bonus receiving user, according to the request of giving bonus to asking the integrating state related to, tiring out The long-pending upper limit of integral that sends verifies, if verification is not passed through, in the information that back-checking is failed, if verification is passed through, Then creating the red packet data of transmission in data base, red packet state is for having been filed on.Red packet data comprise the steps that red packet ID, give bonus The ID of people/users/customers, the channel ID of method red packet people/users/customers, the channel title of the people // users/customers that give bonus, send out The red packet of red packet people/users/customers wishes that language, red packet issuing time, red packet type, red packet number, red packet total amount, integration lost efficacy Date, red packet state, rob red packet elapsed time, maximum the red packet amount of money, mobile phone optimal red packet Customer ID, tinea manus optimal red packet wechat One or more in ID.Then, deduction is issued the client of red packet and is given bonus used integrated value, and the operation of this deduction is to pass through The balance of points adjustment transaction calling integrated integral system is carried out.Next, it is determined that deduction integration is the most successful, if unsuccessful, then Update red packet state, and notify client's unsuccessful deduction integration;If successfully deducting integration, then updating red packet state is balance adjustment Success.Then, distributed caching creates red packet record, such as, it may include red packet number (or residue red packet number) with And residue red packet integration information etc., if caching creates successfully, then updating red packet state is to complete, if caching creates unsuccessful, Then update red packet state and create unsuccessfully for caching, throw exception.The distributed caching of the present invention can use oracle Coherence, it can carry out distributed storage based on key-value to data, have higher inquiry based on key effect Rate.
It should be noted that the red packet data processing method of the present invention is not necessary to comprise each step described above, And can be dispensed with one or more step.Such as, the situation that the integration of the integration red packet to be sent of client is sufficient Under, the verification step to integrating state and upper limit of integral can be saved.
Step S12, according to one or more red packet numbers robbing red packet data described in red packet requesting query, if red packet number It is not more than zero, i.e. less than or equal to zero, then performs step S13, return and rob red packet failure information, if red packet number is more than zero, then Perform step S14, described red packet number is subtracted one, and the related information of red packet success robbed inserts data base.
The red packet data processing method of the present invention may also include that before step S12, carries out the flow robbing red packet request Control, for example, it is possible to be controlled based on transaction code, and flow-control can be carried out on every station server, such as, will be every The number of the concurrent transaction robbing red packet request of station server is set to predetermined quantity, such as, and 20,15,25 etc..To robbing red packet After the flow of request is controlled, the red packet data processing method of the present invention may also include that to judge to send robs red packet request Client had got red packet, if this client had got red packet, then returned the red packet information that this user gets, if not Got red packet, then in distributed caching inquire about red packet number, if do not remain red packet or residue red packet number be not more than zero, Then perform S13, directly return and rob the information that red packet is failed.Wherein, ask at distributed caching according to one or more red packets of robbing The red packet number of middle inquiry red packet data comprises the steps that asks to carry out serialization process, wherein, serial to one or more red packets of robbing Change is processed and can be carried out by the interface of distributed caching, such as, and Enty processor interface.Enty processor interface energy Enough concurrent red packet request of robbing major key (Key) based on request is carried out serialized scheduling, first the request of client is stored in one In queue, then carry out serialized scheduling, perform the process logic specified.The present invention utilizes the spy of enty processor interface Property to rob red packet request carry out serialized scheduling, it is ensured that the concordance of red packet data.
Embodiments of the present invention are when determining that client did not got red packet, according to robbing red packet requesting query red packet Number, when red packet number is not more than zero, directly returns failure information to client, no longer carries out other data manipulations, The concurrent flow robbing red packet request is limited, significantly improves the response speed robbing red packet request;And, by by red The key messages such as bag number are cached in distributed caching, rob red packet request moment high concurrent when, it is possible to significantly improve The reading efficiency of the data such as red packet number, improves the response speed that user robs red packet request.
After Querying Distributed caches, when determining red packet number more than zero, before performing step S14, this Bright red packet data processing method may also include that judge send rob red packet request client whether there is the authority robbing red packet, if Do not rob the authority of red packet, then return it to this client and do not have and rob the authority of red packet;If having the authority robbing red packet, the most further Judge whether the integration of the red packet that this client got this month exceedes predetermined limit value, if exceeding predetermined limit value, then to this client Return the message alreading more than predetermined limit value, if not less than predetermined limit value, then returning the information robbing red packet, ejecting and tear red packet open Interface.
In step S14, red packet number is subtracted one, and the related information of red packet success got is inserted into data Storehouse.Specifically, it may include: after red packet number is subtracted one, obtain the red packet number after subtracting, calculate the red packet got Integration, and the number and integration to the red packet in distributed caching update accordingly;Next, it is determined that the red packet after subtracting Whether number, more than or equal to zero, if it is not, then return the message that red packet has been robbed, and no longer receives other and robs red packet request, Advantageously reduce the concurrency robbing red packet request, improve the speed of response to request.If so, it is to say, red after subtracting one Bag number is more than or equal to zero, then insert the related information of the red packet successfully got in described data base, such as, successfully tear open red The record of bag, this record can include red packet ID, the Customer ID robbing red packet people, rob the channel ID of red packet people, robs the channel of red packet people Title, the red packet amount of money, red packet state, rob the red packet time, message information, tinea manus most preferably indicate in one or more etc..Get Red packet state initial markers for not get.Data base is cassandra data base.Under inserting successful situation, Ke Yigeng The integrated value that this user new has got this month.When inserting failed, update the red packet number in distributed caching, will Red packet number adds one, it is ensured that the concordance of red packet data.
The present invention uses cassandra data base, and it is more that and red packet more for red packet number sends detail record Situation, can meet and carry out query performance based on associating major key inquiry from substantial amounts of data, improve the process of data query Efficiency.
The red packet data processing method of the present invention may also include that to be inserted red to data base (such as, cassandra data base) Bag related information after, according to the red packet of user get requesting query success robbed red packet get state, if getting shape State is not for get, then in being updated to get by the state of getting of red packet to be got for the described request of getting, and to oracle That inserts red packet to be got in coherence data base gets flowing water, described in get flowing water include red packet ID with get red The Customer ID of bag.If state of getting is for get, then return, to user, the information that red packet has been got.Reality in the present invention Execute in mode, use cassandra data base to preserve the detailed data that red packet sends, such as, red packet ID, rob red packet people client ID, channel ID etc., but cassandra data base cannot carry out repeatability judgement to inserting the identical data of major key, or concurrently Con current control is cannot be carried out, in extreme situations, it is impossible to get concomitantly together two or more when updating same data The red packet request of getting of one red packet carries out con current control, so to insert one in oracle coherene data getting stream Water, carries out con current control carrying out the red packet request of getting.The method of the present invention also includes: to oracle coherence data Storehouse is inserted red packet to be got get flowing water after, it is judged that flowing water inserts whether success, if it is not, then failure is got in return Information or red packet to be got got recovering state for not get.Specifically, unsuccessful feelings are inserted at flowing water Under shape, if the information returned is major key, conflict is abnormal, then return and get failure information;If return is other abnormal informations, then Red packet to be got got recovering state for not get.Under flowing water inserts successful situation, perform balance of points and adjust Whole operation, under balance adjustment operates successful situation, renewal red packet state is for get, and in the case of unsuccessful, updates State, for getting failure, is dished out and is got the abnormal information of failure.
Each flow process processed below in conjunction with the red packet data of the concrete flow chart explanation present invention.
Fig. 3 is the schematic flow sheet given bonus according to one embodiment of the present invention;Fig. 4 is real according to one of the present invention The schematic flow sheet of red packet is robbed in the inquiry executing mode;Fig. 5 is the flow process signal tearing red packet open according to one embodiment of the present invention Figure;And Fig. 6 is the schematic flow sheet getting red packet according to one embodiment of the present invention.
As it is shown on figure 3, the flow process given bonus comprises the steps that S101, the request of giving bonus;S102, to integrating state, accumulation Provide upper limit of integral etc. to verify, if verification is not passed through, then perform step S103, return corresponding error message, if logical Crossing verification, then perform step S104, create the red packet information of issue in data base, state is for having been filed on;S105, deduction is issued The corresponding integration of the client of red packet, such as, can call balance of points by internals and adjust transaction;S106, deducts integration Success, if unsuccessful, then perform step S107, updates red packet state, notify client, if success, then performs step S108, updates Red packet state is balance adjustment success;S109, creates in caching and issues red packet record;S110, caching creates successfully, if created Unsuccessful, then perform step S111, update red packet state and create unsuccessfully for caching, throw exception, if creating successfully, then perform Step S112, updates red packet state for complete.
As shown in Figure 4, inquiry is robbed the flow process of red packet and is comprised the steps that S201, sends red packet request of robbing, S202, and flow-control is led to Cross, if not by flow-control, then perform step S203, return the busy information of system, if passing through, performing step S204, sentencing Disconnected client had got red packet, if getting, then performing step S205, returning the red packet information got, if not getting Cross red packet, then perform step S206, it may be judged whether also remain red packet, if not remaining red packet, then perform step S207, returned The information robbed, if also remaining red packet, then performing step S208, it is judged that client rights, if not having authority, then performing step S209, returns client and does not rob the authority of red packet, if having permission, then performs step S210, it is judged that client robbed red packet integration this month Whether exceeding maximum, if exceeding, then performing step S211, return client robbed red packet integration this month and alreadyd more than maximum, if It is not above, then performs step S212, return red packet information of robbing, eject and tear red packet interface open.
As it is shown in figure 5, the flow process tearing red packet open comprises the steps that S301, send and tear red packet request, S302 open, it may be judged whether also have surplus Remaining red packet, if not having, then performs step S303, and return red packet is by the information of having robbed, if also having, then performs step S304, surplus Remaining red packet number subtracts one, and obtains the numerical value after subtracting one, calculates the red packet integrated value got, S305, it is judged that residue red packet Whether number, more than or equal to zero, if it is not, then perform step S303, the most then performs step S306, inserts and successfully take red packet note apart Record, S307, if insert unsuccessfully, if inserting unsuccessfully, then performing step S308, updating distributed caching residue red packet information, if No, perform step S309, the integrated value that renewal this month has been got, S310, return the red packet information successfully got.
As shown in Figure 6, the flow process getting red packet comprises the steps that S401, sends the request getting red packet, S402, it is judged that red packet The most effective, if losing efficacy, then perform step S403, return the failed information of red packet, if effectively, then perform step S404, inspection Looking into red packet and get state, if not getting, then performing step S405, return being got, being got fair state information, if not leading Take, then perform step S406, in being updated to get by red packet state, S407, insert red packet and get flowing water, S408, insert state Judge, if failure, then perform step S409, if it is abnormal to return major key conflict, returns and get failure information, if returning other Abnormal information, then recover red packet state for not get, if inserting successfully, then execution step S410, execution balance of points adjustment Operation, S411, balance adjustment result, if unsuccessful, then execution step S412, more new state is for getting failure, dishes out and gets mistake The abnormal information lost, if success, then performs step S413, updates red packet state for get.
Below as a example by the integration red packet of Construction Bank sends, the flow process of the integration red packet transmission of the present invention be described, wherein, The operation of terminal unit (such as, mobile phone etc.) is passed through including user.Client sends out the flow process of integration red packet and comprises the steps that 1, with opening hands Machine wechat Construction Bank public number;2, system display wechat home interface;3, user selects in happy life, and clicks on " integrated integral " dish Single, click on " giving bonus " according to system prompt;4, whether system display wechat prompting navigation interface system check binds card, card-like Whether state, points account state be normal, and shows check results (the tail number list of all bindings wechat Construction Bank card and integrated integral Remaining sum), inquire about points account information trading, input: customer number;Output: whether bind card, balance of points, binding wechat is built The tail number list of row card, points account state, expiration date, remaining sum list information, binding bank card business dealing input: Ke Hubian Number, bank card is numbered, output: customer bank card binding result;5, user clicks on " Clicking here, operate ";6, system shows Show integration red packet interface;7, user inputs the Informations such as red packet quantity, red packet integrated value and red packet releasing mode, and " plug integration enters Red packet ";8, system display integration red packet validation of information interface;9, client clicks on transmission dynamic authentication note.Client receives note Rear input dynamic verification code, clicks on " confirmation ";10, system display sends red packet interface, and give bonus transaction, input: Ke Hubian Number, # wechat ID, wechat title, red packet type, red packet number, integration sum, integration red packet wish language, output: give bonus numbering.
The flow process robbing integration red packet comprises the steps that 1, and user opens and robs red packet interface;2, system shows robs red packet interface;3, use Integration red packet is clicked at family;4, system shows tears red packet interface (standby event stream " interface robbed by system display red packet "), inquiry open Rob red packet information trading: input: Customer ID, red packet ID, output: red packet is numbered, remain red packet number;5, user clicks on and " tears open red Bag ";6, system shows that to tear other people red packet result interface (standby event stream " system show tear open me red packet result interface ") open (abnormal The flow of event peak of month to date " integration that this month robs exceeded ") (anomalous event stream " points account abnormal state "), rob red Bag transaction: input: rob red packet people's Customer ID, red packet ID, rob red packet people's wechat ID, rob red packet people's wechat title, output: tear red packet open Success Flag, give bonus wechat ID, the wechat that gives bonus title, and integration red packet is wished language, got the integrated value of red packet, and red packet is the most individual Number, robs red packet and always uses the time, and (wechat title, gets the integrated value of red packet, robs the red packet time, stays to be robbed red packet list information Speech, tinea manus most preferably indicates);7, user may select and oneself " gives bonus " or check " my red packet record ";8, system shows to be looked into See red packet interface (standby event stream " system give bonus interface "), check the red packet transaction of transmission, input: customer number, wechat ID, wechat title, output: sent integration volume, accumulative send red packet number, transmission red packet list (red packet integration total value, Integration volume, date of shipping, red packet state are sent);9, client clicks on the red packet that I receives;10, system display client receives red Bag record interface, checks the red packet transaction that client receives: input: Customer ID, wechat ID, wechat title, output: accumulative receive Integrated value, the accumulative red packet number received, the optimal number of times of tinea manus, (client's wechat name issued by red packet to the red packet list information got Claim, the red packet integrated value got, rob the red packet date, state got by red packet);11, client clicks on " Unclaimed ";12, system shows Get red packet result interface (alternative flow of event " is got and robbed red packet integration Xu Bang Construction Bank card ") (anomalous event stream " points account shape State is abnormal "), get the transaction of integration red packet: input: customer number, wechat ID, wechat title, red packet ID, the red packet integration got Value exports: get red packet result.
Describe the red packet data processing method of the present invention above in conjunction with the drawings and specific embodiments, be described below with upper The red packet data processing equipment that method of stating is corresponding.
Fig. 7 is the structural representation of the red packet data processing equipment according to one embodiment of the present invention.
As it is shown in fig. 7, red packet data processing equipment can include giving bonus module 71 and robbing red packet module 72, wherein give bonus Module 71 and rob and can carry out data communication between red packet module 72, and these modules can also at other relevant data Reason module (such as, the integrated integral system of bank or core business system) etc. carries out data communication.The red packet number of the present invention According to processing means in addition to including giving bonus module 71 and robbing red packet module 72, it is also possible to include getting module.Below to respectively Individual module is specifically described.
The module that gives bonus 71 can create red packet data according to the request of giving bonus, and described red packet data include being cached in distributed The red packet number of caching, wherein, distributed caching can use oracle coherences data base.Wherein, establishment is concrete interior Hold the description that can be found in method part.
Rob red packet module 72 to can be used for according to one or more red packets robbed in red packet data described in red packet requesting query Number, if red packet number is not more than zero, i.e. less than or equal to zero, then returns and robs red packet failure information, if red packet number is more than zero, then Described red packet number is subtracted one, and the related information of red packet success robbed is inserted into data base.Wherein, red packet module root is robbed Include according to one or more red packet numbers robbed in red packet data described in red packet requesting query: rob red packet request to one or more Carrying out serialization process, wherein, described serialization is processed and is carried out by the interface of distributed caching.The related information of red packet includes Red packet ID, rob the Customer ID of red packet people, rob the channel ID of red packet people, rob the channel title of red packet people, the red packet amount of money, red packet shape State, rob the red packet time, message information, tinea manus most preferably indicate in one or more, described data base is cassandra data Storehouse.Rob red packet module 72 after described red packet number is subtracted one, also judge the red packet number after subtracting whether more than or etc. In zero, the most then the related information of red packet success robbed is inserted into data base, if it is not, then return what red packet had been robbed Information.Rob red packet module 72 insert described red packet related information failed when, also update in described distributed caching Red packet number.The description of above method part is can be found in about the particular content robbing red packet module.
Get module and get state, if state of getting is according to what red packet that success robbed got described in requesting query by red packet Do not get, then in being updated to get by the state of getting of red packet to be got for the described request of getting, and to oracle That inserts red packet to be got in coherence data base gets flowing water, described in get flowing water include red packet ID with get red The Customer ID of bag.Can be additionally used in insert in oracle coherence data base red packet to be got get flowing water it After, it is judged that flowing water inserts whether success, gets failure information if it is not, then return or red packet to be got is got state Revert to not get.The particular content got about red packet can be found in the description of above method part.
Through the above description of the embodiments, those skilled in the art is it can be understood that can be by the present invention The mode of software combined with hardware platform realizes.Based on such understanding, background technology is made tribute by technical scheme That offers can embody with the form of software product in whole or in part, and this computer software product can be stored in storage and be situated between In matter, such as ROM/RAM, magnetic disc, CD etc., instruct with so that a computer equipment (can be individual calculus including some Machine, server, smart mobile phone or the network equipment etc.) perform described in some part of each embodiment of the present invention or embodiment Method.
The term used in description of the invention and wording, just to illustrating, are not intended to constitute restriction.Ability Field technique personnel should be appreciated that on the premise of the ultimate principle without departing from disclosed embodiment, to above-mentioned embodiment In each details can carry out various change.Therefore, the scope of the present invention is only determined by claim, in the claims, unless Being otherwise noted, all of term should be understood by the broadest rational meaning.

Claims (16)

1. a red packet data processing method, it is characterised in that described method includes:
Creating red packet data according to the request of giving bonus, described red packet data include the red packet number being cached in distributed caching;
According to one or more red packet numbers robbed in red packet data described in red packet requesting query,
If red packet number is not more than zero, then returns and rob red packet failure information,
If red packet number is more than zero, then described red packet number is subtracted one, and the related information of red packet success robbed is inserted into Data base.
Method the most according to claim 1, it is characterised in that described distributed caching uses oracle coherences Data base.
Method the most according to claim 2, it is characterised in that described rob described in red packet requesting query according to one or more Red packet number in red packet data includes:
Asking to carry out serialization process to one or more red packets of robbing, wherein, described serialization processes by distributed caching Interface is carried out.
Method the most according to claim 2, it is characterised in that the related information of described red packet includes red packet ID, robs red packet The Customer ID of people, rob red packet people channel ID, rob the channel title of red packet people, the red packet amount of money, red packet state, rob the red packet time, Message information, tinea manus most preferably indicate in one or more, described data base is cassandra data base.
Method the most according to claim 4, it is characterised in that described method also includes:
State is got according to what red packet that success robbed got described in requesting query by red packet, if state of getting is not for get, then general During the state of getting of the red packet that the described request of getting is to be got is updated to get, and in oracle coherence data base That inserts red packet to be got gets flowing water, described in get flowing water and include red packet ID and get the Customer ID of red packet.
Method the most according to claim 5, it is characterised in that described method also includes:
Insert in oracle coherence data base red packet to be got get flowing water after, it is judged that flowing water insertion is No success, gets failure information if it is not, then return or red packet to be got is got recovering state for not get.
Method the most according to claim 1, it is characterised in that described method also includes:
After described red packet number is subtracted one, it is judged that whether the red packet number after subtracting more than or equal to zero, the most then will The related information of the red packet that success is robbed is inserted into data base, if it is not, then return the information that red packet has been robbed.
Method the most according to claim 7, it is characterised in that described method also includes:
When the related information inserting described red packet is failed, update the red packet number in described distributed caching.
9. a red packet data processing equipment, it is characterised in that described device includes:
Give bonus module, and for creating red packet data according to the request of giving bonus, described red packet data include being cached in distributed delaying The red packet number deposited;
Rob red packet module, be used for: according to one or more red packet numbers robbed in red packet data described in red packet requesting query, if red Bag number is not more than zero, then return and rob red packet failure information, if red packet number is more than zero, then subtract one by described red packet number, and The related information of red packet success robbed is inserted into data base.
Device the most according to claim 9, it is characterised in that described distributed caching uses oracle coherences Data base.
11. devices according to claim 10, it is characterised in that described in rob red packet module and rob red packet according to one or more Red packet number in red packet data described in requesting query includes:
Asking to carry out serialization process to one or more red packets of robbing, wherein, described serialization processes by distributed caching Interface is carried out.
12. devices according to claim 10, it is characterised in that the related information of described red packet include red packet ID, rob red The Customer ID of bag people, rob the channel ID of red packet people, rob the channel title of red packet people, the red packet amount of money, red packet state, when robbing red packet Between, message information, tinea manus most preferably indicate in one or more, described data base is cassandra data base.
13. devices according to claim 12, it is characterised in that described device also includes:
Getting module, getting state, if getting state for get described in requesting query, according to red packet, red packet that success robbed For not getting, then in being updated to get by the state of getting of red packet to be got for the described request of getting, and to oracle That inserts red packet to be got in coherence data base gets flowing water, described in get flowing water include red packet ID with get red The Customer ID of bag.
14. devices according to claim 13, it is characterised in that described in get module, be additionally operable to oracle Coherence data base inserts red packet to be got get flowing water after, it is judged that flowing water inserts the most successfully, if it is not, Then return and get failure information or red packet to be got got recovering state for not get.
15. devices according to claim 9, it is characterised in that described in rob red packet module, be additionally operable to by described red packet After number subtracts one, it is judged that whether the red packet number after subtracting is more than or equal to zero, the most then by the pass of the successful red packet robbed Connection information is inserted into data base, if it is not, then return the information that red packet has been robbed.
16. devices according to claim 15, it is characterised in that described in rob red packet module, be additionally operable to insert described red When the related information of bag is failed, update the red packet number in described distributed caching.
CN201610395873.6A 2016-06-07 2016-06-07 A kind of red packet data processing method and device Pending CN106095877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610395873.6A CN106095877A (en) 2016-06-07 2016-06-07 A kind of red packet data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610395873.6A CN106095877A (en) 2016-06-07 2016-06-07 A kind of red packet data processing method and device

Publications (1)

Publication Number Publication Date
CN106095877A true CN106095877A (en) 2016-11-09

Family

ID=57447401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610395873.6A Pending CN106095877A (en) 2016-06-07 2016-06-07 A kind of red packet data processing method and device

Country Status (1)

Country Link
CN (1) CN106095877A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649637A (en) * 2016-12-08 2017-05-10 武汉斗鱼网络科技有限公司 Red envelope processing method and system
CN106973319A (en) * 2017-03-28 2017-07-21 武汉斗鱼网络科技有限公司 A kind of virtual gift display method and system
CN107332988A (en) * 2017-06-26 2017-11-07 广东欧珀移动通信有限公司 Information processing method, mobile terminal and computer-readable recording medium
CN107528885A (en) * 2017-07-17 2017-12-29 阿里巴巴集团控股有限公司 A kind of service request processing method and device
CN108153796A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 A kind of data processing method, the device and system of electronics red packet
CN108153795A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 A kind of data processing method, system and the device of electronics red packet
CN108401079A (en) * 2018-02-11 2018-08-14 贵阳朗玛信息技术股份有限公司 A kind of method and device for robbing red packet by voice in IVR platforms
CN108830724A (en) * 2018-04-12 2018-11-16 平安科技(深圳)有限公司 A kind of resource data packet processing method and terminal device
CN109242454A (en) * 2018-08-14 2019-01-18 阿里巴巴集团控股有限公司 Distribution method, device, server and the readable storage medium storing program for executing of electronics red packet
CN109242457A (en) * 2018-09-21 2019-01-18 刘磊 A kind of method and system for robbing red packet
CN109565464A (en) * 2017-03-31 2019-04-02 华为技术有限公司 Red packet data processing method and equipment
CN109587364A (en) * 2017-09-29 2019-04-05 中国移动通信集团公司 Handle method, server and the equipment of data on flows red packet
CN109615423A (en) * 2018-11-29 2019-04-12 阿里巴巴集团控股有限公司 The processing method and processing device of business
CN110675133A (en) * 2019-09-30 2020-01-10 北京金山安全软件有限公司 Red packet robbing method and device, electronic equipment and readable storage medium
CN111709732A (en) * 2020-06-17 2020-09-25 北京字节跳动网络技术有限公司 Display method and device and electronic equipment
CN111752429A (en) * 2020-05-29 2020-10-09 维沃移动通信有限公司 Information display method, information display device, electronic equipment and medium
CN112308622A (en) * 2020-11-06 2021-02-02 广州博冠信息科技有限公司 Data processing method and device for virtual object, storage medium and electronic equipment
CN112308621A (en) * 2020-11-04 2021-02-02 深圳市欢太科技有限公司 Data processing method and device, computer storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954468A (en) * 2015-06-18 2015-09-30 小米科技有限责任公司 Resource allocation method and resource allocation device
CN104966214A (en) * 2015-06-29 2015-10-07 百度在线网络技术(北京)有限公司 Electronic ticket interaction method and device
CN105096065A (en) * 2014-04-16 2015-11-25 阿里巴巴集团控股有限公司 Inventory deduction method and inventory deduction device
CN105303430A (en) * 2015-11-10 2016-02-03 中国建设银行股份有限公司 Transaction indicator acquisition method and device
CN105354317A (en) * 2015-11-12 2016-02-24 携程计算机技术(上海)有限公司 Hotel database updating method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096065A (en) * 2014-04-16 2015-11-25 阿里巴巴集团控股有限公司 Inventory deduction method and inventory deduction device
CN104954468A (en) * 2015-06-18 2015-09-30 小米科技有限责任公司 Resource allocation method and resource allocation device
CN104966214A (en) * 2015-06-29 2015-10-07 百度在线网络技术(北京)有限公司 Electronic ticket interaction method and device
CN105303430A (en) * 2015-11-10 2016-02-03 中国建设银行股份有限公司 Transaction indicator acquisition method and device
CN105354317A (en) * 2015-11-12 2016-02-24 携程计算机技术(上海)有限公司 Hotel database updating method and system

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153796A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 A kind of data processing method, the device and system of electronics red packet
CN108153795B (en) * 2016-12-02 2023-12-26 阿里巴巴集团控股有限公司 Data processing method, system and device for electronic red packet
CN108153795A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 A kind of data processing method, system and the device of electronics red packet
CN106649637A (en) * 2016-12-08 2017-05-10 武汉斗鱼网络科技有限公司 Red envelope processing method and system
CN106973319A (en) * 2017-03-28 2017-07-21 武汉斗鱼网络科技有限公司 A kind of virtual gift display method and system
CN106973319B (en) * 2017-03-28 2020-05-12 武汉斗鱼网络科技有限公司 Virtual gift display method and system
CN109565464A (en) * 2017-03-31 2019-04-02 华为技术有限公司 Red packet data processing method and equipment
CN107332988A (en) * 2017-06-26 2017-11-07 广东欧珀移动通信有限公司 Information processing method, mobile terminal and computer-readable recording medium
CN107528885A (en) * 2017-07-17 2017-12-29 阿里巴巴集团控股有限公司 A kind of service request processing method and device
CN107528885B (en) * 2017-07-17 2021-01-26 创新先进技术有限公司 Service request processing method and device
CN109587364A (en) * 2017-09-29 2019-04-05 中国移动通信集团公司 Handle method, server and the equipment of data on flows red packet
CN108401079A (en) * 2018-02-11 2018-08-14 贵阳朗玛信息技术股份有限公司 A kind of method and device for robbing red packet by voice in IVR platforms
CN108401079B (en) * 2018-02-11 2021-10-15 贵阳朗玛信息技术股份有限公司 Method and device for robbing red envelope through voice on IVR platform
CN108830724A (en) * 2018-04-12 2018-11-16 平安科技(深圳)有限公司 A kind of resource data packet processing method and terminal device
CN108830724B (en) * 2018-04-12 2023-04-14 平安科技(深圳)有限公司 Resource data packet processing method and terminal equipment
CN109242454A (en) * 2018-08-14 2019-01-18 阿里巴巴集团控股有限公司 Distribution method, device, server and the readable storage medium storing program for executing of electronics red packet
CN109242457A (en) * 2018-09-21 2019-01-18 刘磊 A kind of method and system for robbing red packet
CN109615423A (en) * 2018-11-29 2019-04-12 阿里巴巴集团控股有限公司 The processing method and processing device of business
US11461503B2 (en) 2018-11-29 2022-10-04 Advanced New Technologies Co., Ltd. Service processing method and apparatus
CN110675133A (en) * 2019-09-30 2020-01-10 北京金山安全软件有限公司 Red packet robbing method and device, electronic equipment and readable storage medium
CN111752429A (en) * 2020-05-29 2020-10-09 维沃移动通信有限公司 Information display method, information display device, electronic equipment and medium
CN111752429B (en) * 2020-05-29 2022-03-29 维沃移动通信有限公司 Information display method, information display device, electronic equipment and medium
CN111709732A (en) * 2020-06-17 2020-09-25 北京字节跳动网络技术有限公司 Display method and device and electronic equipment
CN112308621A (en) * 2020-11-04 2021-02-02 深圳市欢太科技有限公司 Data processing method and device, computer storage medium and electronic equipment
CN112308622A (en) * 2020-11-06 2021-02-02 广州博冠信息科技有限公司 Data processing method and device for virtual object, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN106095877A (en) A kind of red packet data processing method and device
US20220147969A1 (en) Monetary transaction system
JP6626945B2 (en) Account and cash management
KR20200091882A (en) Incremental digital asset collateral wallet
WO2013009444A1 (en) Business to business mobile vault
CN108921690A (en) Money transfer transactions thing apoplexy control method and device
CN106570574A (en) Financial trading system based on real-time prediction using virtual currency
KR20160121576A (en) System and method for facilitating financial loans
WO2018189597A1 (en) Mobile bank account management systems
CN108009818A (en) A kind of on-line payment method and system based on distributed network
CN108230142A (en) A kind of risk prevention system method and system of business bank's generation visitor's operation
KR20170118563A (en) Bank transfer managing system and method thereof
CN109859412A (en) A kind of method, server and terminal deposited using unmanned technology
KR20180052839A (en) Method for Operating Mutual-Aid Group based on Crowd Funding
CN113450093B (en) Real-time consensus authentication method and system for digital change wallet based on cone block chain
CN110517027A (en) A kind of trustship of digital cash assets and transfer method based on intelligent contract
CN112334932A (en) Method and apparatus for allocating user-generated spending in a user group using a session proxy
KR102411264B1 (en) Method for providing moneybox service
RU125745U1 (en) ELECTRONIC PAYMENT SYSTEM
WO2014058349A1 (en) Electronic payment system
JP6224195B1 (en) Payment means switching system, method, and program
JP2006113816A (en) System for automatic payment by deduction from savings account
CN111815323B (en) Block chain donation method, electronic device and storage medium
KR101213562B1 (en) The system which manages the contribution account
CN106960317A (en) The sending method and dispensing device of electronic money

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161109

RJ01 Rejection of invention patent application after publication