CN106846024A - Reward voucher distribution method and system based on Redis - Google Patents
Reward voucher distribution method and system based on Redis Download PDFInfo
- Publication number
- CN106846024A CN106846024A CN201510889153.0A CN201510889153A CN106846024A CN 106846024 A CN106846024 A CN 106846024A CN 201510889153 A CN201510889153 A CN 201510889153A CN 106846024 A CN106846024 A CN 106846024A
- Authority
- CN
- China
- Prior art keywords
- certificate
- neck
- redis
- neck certificate
- reward voucher
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/387—Payment using discounts or coupons
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
- G06Q30/0222—During e-commerce, i.e. online transactions
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Development Economics (AREA)
- General Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- Economics (AREA)
- Marketing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention proposes a kind of reward voucher distribution method based on Redis, including:Reward voucher and corresponding sum are saved in Redis;When neck certificate request is received, reward voucher is got from Redis, create the neck logic asynchronous execution task of certificate and be simultaneously synchronized in Redis, and record Redis neck certificate information logs;And obtained from Redis and perform the neck logic asynchronous execution task of certificate, and record neck certificate execution journal.The present invention can efficiently and stably help reward voucher to be issued in time in user's hand.
Description
Technical field
The present invention relates to e-commerce field, and in particular to the distribution method of electric business reward voucher and be
System.
Background technology
Neck certificate system is that electric business enterprise attracts user's registration and repeats the key of shopping.Neck certificate system
That does is bad, can bring huge economic loss to enterprise.Causing enterprise cannot effectively pass through
Reward voucher excites user to do shopping, so that electric business enterprise loses competing in electric business market with keen competition
Strive power.And present electric business website user increasingly increase, visit capacity it is huge, give neck certificate system of enterprise
System brings huge challenge.
For the neck certificate system that reward voucher is provided, existing technical scheme mainly has following several:
(1) file is deposited:By in reward voucher preservation server file.Neck certificate system is being connected to neck
When certificate is asked, reward voucher is obtained from file, then perform reward voucher and provide logic, finally will
Reward voucher provides result and feeds back to user.
(2) RDBMS databases are deposited:Reward voucher is saved in relevant database.Neck
Certificate system directly obtains reward voucher when neck certificate request is connected to from database, then performs reward voucher
Logic is provided, reward voucher granting result is finally fed back into user.
The current several sides for mainly thering is the above to speak of for the neck certificate system schema of reward voucher granting
Formula, but they more or less all be present:
(1) file is deposited:System gets request and one quickly can be obtained from file being connected to
Individual reward voucher, then performs and gets logic, but because reward voucher is the text that is stored in server
In part, many difficulties are just faced when system needs extension.Present;Neck certificate system all faces
Lingao concurrently only can not possibly realize picking systems by a machine.And deposit the mode of file
Other machines reads reward voucher and just bothers very much, it is difficult to extend.
(2) RDBMS databases are deposited:In the little situation of neck certificate request amount, it is possible to achieve
Quick reward voucher.But when certificate request increase is led, this scheme depends on RDBMS data
The performance in storehouse, and RDBMS databases read and write can all become very slow under a large amount of concurrent requests,
Neck certificate request cannot be timely responded to causes neck certificate request data to be lost.This scheme also cannot be fine
Extension because being also to rely on the performance of database after extension.
Based on the problem that existing scheme is present, easily expand we have proposed the high concurrent based on Redis
The neck certificate method and system of exhibition, it can efficiently and stably help reward voucher to be issued to user in time
In hand, so as to for the more users of electric business enterprise introducing, bring more users to place an order.
The content of the invention
In view of this, the present invention proposes a kind of reward voucher distribution method based on Redis, wraps
Include:Reward voucher and corresponding sum are saved in Redis;When neck certificate request is received, from
Redis gets reward voucher, creates the neck logic asynchronous execution task of certificate and is synchronized in Redis, and
And record Redis neck certificate information logs;And obtained from Redis and perform the neck certificate logic
Asynchronous execution task, and record neck certificate execution journal.
The invention allows for a kind of reward voucher delivery system based on Redis, including:It is preferential
Certificate release module, is configured as being saved in reward voucher and corresponding sum in Redis;Neck certificate
Logging modle, when being configured as receiving neck certificate request, reward voucher is got from Redis, is created
The neck logic asynchronous execution task of certificate is simultaneously synchronized in Redis, and records Redis neck certificate information
Daily record;And neck certificate performing module, be configured as from Redis obtain and perform it is described neck certificate patrol
Asynchronous execution task is collected, and records neck certificate execution journal.
Brief description of the drawings
Fig. 1 shows that the high concurrent based on Redis easily extends neck according to an embodiment of the invention
The topological diagram of certificate system.
Fig. 2 shows that the high concurrent based on Redis easily extends neck according to an embodiment of the invention
The flow chart of certificate system.
Fig. 3 shows the reward voucher delivery system based on Redis according to an embodiment of the invention
Block diagram.
Specific embodiment
Exemplary embodiment of the invention is explained below, including the embodiment of the present invention
Various details with contribute to understand, they should be thought what is be merely exemplary.Therefore,
It will be appreciated by the person skilled in the art that can be to embodiment described herein making various modifications
And change, without deviating from scope and spirit of the present invention.
The present invention realizes the neck certificate system of a high concurrent easily extension based on Redis, can wrap
Include reward voucher release module, neck certificate logging modle, neck certificate performing module, neck certificate Reports module.
Be saved in Redis for reward voucher and corresponding sum first by the system, please when neck certificate is received
When asking, the sum of reward voucher, establishment asynchronous got task and are synchronized in system modification Redis
Redis and record Redis neck certificate information logs, return user and get result.Wherein lead certificate
Execution logic is to realize distributed asynchronous execution by Redis, so as to realize to neck certificate request
Treatment real-time, neck certificate records neck certificate execution information after the completion of performing.
Fig. 1 shows that the high concurrent based on Redis easily extends neck according to an embodiment of the invention
The topological diagram of certificate system.
User initiates reward voucher and gets request first, and request can reach a computer room by network
Nginx servers, neck certificate request is distributed to neck certificate record server process neck certificate by Nginx please
Ask.Request is assigned to web application server clusters and (that is, leads certificate record by Nginx servers
Server) in a certain web server after, web server is obtained and changed from Redis
Reward voucher quantity simultaneously records pickup information's (i.e. Redis neck certificates information log), if obtained preferential
Certificate success, creates the neck logic asynchronous execution task of certificate, and so far treatment neck certificate request terminates.Pass through
Neck certificate performing module optimizes the service logic that certificate is got to perform, and reward voucher is put into user account
Under, record neck certificate execution journal, the neck certificate execution journal can include neck certificate record information,
Perform taking for neck certificate etc..If the problems such as due to interface causes to perform neck certificate exception, at this moment may be used
By the neck certificate log information deposited in neck certificate record server, to re-create neck certificate logic
Asynchronous execution task, so as to ensure that reward voucher is sent to user.
Fig. 2 shows that the high concurrent based on Redis according to embodiments of the present invention easily extends neck certificate
The flow chart of system.Each step of system flow chart is mainly by reward voucher release module, neck certificate
Logging modle, neck certificate performing module and neck certificate Reports module are completed.
Reward voucher release module:The major function of reward voucher release module is to create reward voucher, and
Coupon information is cached in Redis, the content of caching includes all reward vouchers and optimization certificate
Sum.Different key are cached to different reward vouchers, such that it is able to realize providing many simultaneously
Plant different reward vouchers.
Neck certificate logging modle:The major function for leading certificate logging modle is quick timely treatment largely
Neck certificate request.Not only accurately to record neck certificate information but also need and consider high concurrent and quick
The characteristic of response, is that the neck certificate logging modle of this this programme design is related to three operations, is reduced excellent
Favour certificate sum, the logic asynchronous execution task of establishment neck certificate, record neck certificate information log.Three behaviour
Make all very fast, reduce reward voucher sum and be related to once simple Redis INCR to operate, create
Asynchronous task also pertains only to once simple Redis add operations, and record neck certificate information log is
Simple java orders are not related to network and file operation.Therefore we can make full use of Redis
High concurrent process in time high concurrent neck certificate request.Neck certificate information log, one can be use
To verify the accuracy of statistical report form (being described below), two can be exception occur in system
When supplementary data, it is ensured that the stability of system.
Neck certificate performing module:The main task for leading certificate performing module is the business that asynchronous execution leads certificate
Logic, including task is got from Redis acquisitions, call reward voucher to get interface, storage neck certificate
Record information, record neck certificate performs time-consuming etc..By leading certificate performing module, reward voucher is got
During need operation isolation being come into contacts with external interface, being related to network and data out,
So as to get being rapidly completed for process including reward voucher.Also, neck certificate performing module is using multi-thread
Journey technology, can rapidly realize leading certificate service logic.By leading certificate record information, even if
Get when performing abnormal it is also ensured that reward voucher is issued in user's hand.
Neck certificate Reports module:Neck certificate Reports module provides the inquiry to leading certificate implementation status, such as leads
Certificate record information, neck certificate perform time-consuming etc..Such that it is able to feel whether provide more according to form
Optimization certificate, and according to neck certificate it is time-consuming situations such as deciding whether to add or reduce clothes
Business device.
Fig. 3 shows the block diagram of the system 300 of granting reward voucher according to embodiments of the present invention.
As shown in figure 3, a kind of reward voucher delivery system based on Redis, including:Reward voucher
Release module 301, is configured as being saved in reward voucher and corresponding sum in Redis;Neck
Certificate logging modle 302, when being configured as receiving neck certificate request, reward voucher is got from Redis,
Create the neck logic asynchronous execution task of certificate and be synchronized in Redis, and record Redis neck certificates
Information log;And neck certificate performing module 303, it is configured as that institute is obtained and performed from Redis
The neck logic asynchronous execution task of certificate is stated, and records neck certificate execution journal.
In one embodiment, system 300 can also include:Neck certificate Reports module 304 is (empty
Shown in wire frame), neck certificate form is configurable to generate, wherein the neck certificate form includes the neck certificate
Execution journal, is used to determine whether to need to provide more reward vouchers and/or determine the need for increasing
Plus or reduce perform neck the logic asynchronous execution task of certificate server.
In one embodiment, the neck certificate execution journal includes that neck certificate record information and neck certificate are held
Row is time-consuming.
In one embodiment, the Redis neck certificates information log includes being got with from Redis
Reward voucher, establishment and preservation neck certificate perform the relevant information of task.
In one embodiment, the neck certificate logging modle 302 is additionally configured to reduce Redis
The sum of middle reward voucher.
To sum up, it can be seen that neck certificate system proposed by the present invention will not use the file of server
Storage optimization certificate, and user Redis storage reward vouchers and its number sum, therefore can realize very
Good autgmentability;The server of record neck certificate request is simple reduction reward voucher sum, wound
The logic asynchronous execution task of reward voucher, record neck certificate information log are built, reward voucher is quickly returned
Get result.Record neck certificate request server be not required to read and write database, can very aspect
Addition server, also will not bring pressure to RDBMS databases, be very easy to expand example
With good autgmentability.And Redis has high concurrent real time availability, so as to ensure that note
Record server can reprocess compared with high concurrent neck certificate request while ensure that various data and
When efficiently process, make system have treatment high concurrent neck certificate request ability.
The present invention leads certificate to ask and log by leading certificate logging modle to process high concurrent.Pass through
Neck certificate performing module distribution asynchronous execution gets logic can realize that rapid feedback gets result.
The program can preferably solve high concurrent neck certificate asks to database pressure and quick response, with
And neck certificate system is difficult to the problem of extension.
It should be noted that these are only presently preferred embodiments of the present invention and principle.This area
Technical staff is it will be appreciated that the invention is not restricted to specific embodiment here.Those skilled in the art
Member can make various significant changes, adjustment and substitute, without deviating from protection scope of the present invention.
The scope of the present invention is defined by the following claims.
Claims (10)
1. a kind of reward voucher distribution method based on Redis, including:
Reward voucher and corresponding sum are saved in Redis;
When receiving neck certificate and asking, reward voucher is got from Redis, create neck certificate is logic asynchronous and hold
Row task is simultaneously synchronized in Redis, and records Redis neck certificate information logs;And
The neck logic asynchronous execution task of certificate is obtained and performed from Redis, and records neck certificate
Execution journal.
2. method according to claim 1, also includes:
Generation neck certificate form, wherein the neck certificate form includes the neck certificate execution journal, is used for
Determine the need for providing more reward vouchers and/or determine the need for increasing or reducing holding
The server of the row neck logic asynchronous execution task of certificate.
3. method according to claim 1 and 2, wherein the neck certificate execution journal includes
Neck certificate record information and neck certificate perform time-consuming.
4. method according to claim 1, wherein Redis neck certificate information log bags
Include and get reward voucher with from Redis, create and preserve neck certificate and perform the relevant information of task.
5. method according to claim 1, wherein including subtracting from Redis neck certificate reward vouchers
The sum of reward voucher in few Redis.
6. a kind of reward voucher delivery system based on Redis, including:
Reward voucher release module, is configured as reward voucher and corresponding sum being saved in Redis
In;
Neck certificate logging modle, when being configured as receiving neck certificate request, gets preferential from Redis
Certificate, creates the neck logic asynchronous execution task of certificate and is synchronized in Redis, and record Redis
Neck certificate information log;And
Neck certificate performing module, be configured as from Redis obtain and perform it is described neck certificate it is logic asynchronous
Execution task, and record neck certificate execution journal.
7. system according to claim 6, also includes:
Neck certificate Reports module, is configurable to generate neck certificate form, wherein the neck certificate form includes
The neck certificate execution journal, being used to determine whether to need to provide more reward vouchers and/or determination is
It is no to need to increase or reduce the server for performing the neck logic asynchronous execution task of certificate.
8. the system according to claim 6 or 7, wherein the neck certificate execution journal includes
Neck certificate record information and neck certificate perform time-consuming.
9. system according to claim 6, wherein Redis neck certificate information log bags
Include and get reward voucher with from Redis, create and preserve neck certificate and perform the relevant information of task.
10. system according to claim 6, wherein the neck certificate logging modle is also matched somebody with somebody
It is set to the sum for reducing reward voucher in Redis.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510889153.0A CN106846024B (en) | 2015-12-07 | 2015-12-07 | Redis-based coupon issuing method, system and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510889153.0A CN106846024B (en) | 2015-12-07 | 2015-12-07 | Redis-based coupon issuing method, system and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106846024A true CN106846024A (en) | 2017-06-13 |
CN106846024B CN106846024B (en) | 2021-03-30 |
Family
ID=59151498
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510889153.0A Active CN106846024B (en) | 2015-12-07 | 2015-12-07 | Redis-based coupon issuing method, system and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106846024B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109191162A (en) * | 2018-07-06 | 2019-01-11 | 中国建设银行股份有限公司 | Information processing method, system, device and storage medium |
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 |
CN109582682A (en) * | 2018-11-02 | 2019-04-05 | 中国平安人寿保险股份有限公司 | Data processing method, device and storage medium, computer equipment |
CN110363579A (en) * | 2019-06-28 | 2019-10-22 | 北京奇才天下科技有限公司 | A kind of user's marketing method, device and electronic equipment based on discount coupon |
CN114119109A (en) * | 2022-01-21 | 2022-03-01 | 浙江口碑网络技术有限公司 | Preferential resource processing method and device |
CN117909370A (en) * | 2024-03-15 | 2024-04-19 | 小芒电子商务有限责任公司 | Coupon processing method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102780768A (en) * | 2012-06-29 | 2012-11-14 | 北京奇虎科技有限公司 | Processing method and processing system for highly-concurrent requests |
CN103336815A (en) * | 2013-06-27 | 2013-10-02 | 北京京东尚科信息技术有限公司 | System and method of pushing network advertising |
CN103886079A (en) * | 2014-03-26 | 2014-06-25 | 北京京东尚科信息技术有限公司 | Data processing method and system |
CN104715349A (en) * | 2013-12-12 | 2015-06-17 | 世纪禾光科技发展(北京)有限公司 | Method and system for calculating e-commerce freight |
CN104881494A (en) * | 2015-06-12 | 2015-09-02 | 北京奇虎科技有限公司 | Method, device and system for performing data synchronization with Redis server |
-
2015
- 2015-12-07 CN CN201510889153.0A patent/CN106846024B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102780768A (en) * | 2012-06-29 | 2012-11-14 | 北京奇虎科技有限公司 | Processing method and processing system for highly-concurrent requests |
CN103336815A (en) * | 2013-06-27 | 2013-10-02 | 北京京东尚科信息技术有限公司 | System and method of pushing network advertising |
CN104715349A (en) * | 2013-12-12 | 2015-06-17 | 世纪禾光科技发展(北京)有限公司 | Method and system for calculating e-commerce freight |
CN103886079A (en) * | 2014-03-26 | 2014-06-25 | 北京京东尚科信息技术有限公司 | Data processing method and system |
CN104881494A (en) * | 2015-06-12 | 2015-09-02 | 北京奇虎科技有限公司 | Method, device and system for performing data synchronization with Redis server |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109191162A (en) * | 2018-07-06 | 2019-01-11 | 中国建设银行股份有限公司 | Information processing method, system, device and storage medium |
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 |
CN109582682A (en) * | 2018-11-02 | 2019-04-05 | 中国平安人寿保险股份有限公司 | Data processing method, device and storage medium, computer equipment |
CN109582682B (en) * | 2018-11-02 | 2024-04-09 | 中国平安人寿保险股份有限公司 | Data processing method and device, storage medium and computer equipment |
CN110363579A (en) * | 2019-06-28 | 2019-10-22 | 北京奇才天下科技有限公司 | A kind of user's marketing method, device and electronic equipment based on discount coupon |
CN114119109A (en) * | 2022-01-21 | 2022-03-01 | 浙江口碑网络技术有限公司 | Preferential resource processing method and device |
CN117909370A (en) * | 2024-03-15 | 2024-04-19 | 小芒电子商务有限责任公司 | Coupon processing method and system |
CN117909370B (en) * | 2024-03-15 | 2024-05-31 | 小芒电子商务有限责任公司 | Coupon processing method and system |
Also Published As
Publication number | Publication date |
---|---|
CN106846024B (en) | 2021-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106846024A (en) | Reward voucher distribution method and system based on Redis | |
CN107679931A (en) | Method, apparatus, storage medium and the terminal of order asynchronous process | |
CN101163265B (en) | Distributed database based on multimedia message log inquiring method and system | |
CN104301404B (en) | A kind of method and device of the adjustment operation system resource based on virtual machine | |
CN107657420A (en) | A kind of flow path processing method and system based on event | |
CN104252502B (en) | Data migration method and device in a kind of database management platform | |
CN104536965B (en) | A kind of data query display systems under the conditions of big data and method | |
CN102298647B (en) | Inspection and allocation system and method of data file | |
CN101661584B (en) | Dynamic order workflow template instantiator and decoupler | |
CN103634144B (en) | The configuration file management method of many IDC clusters, system and equipment | |
CN108509392B (en) | Multi-mechanism account checking method, system, computer equipment and storage medium | |
CN103605698A (en) | Cloud database system used for distributed heterogeneous data resource integration | |
CN103970807B (en) | Method and system for managing database connection | |
CN110399383A (en) | Applied to the data processing method of server, device, calculate equipment, medium | |
CN109840166A (en) | Across the cluster object storage async backup methods, devices and systems of one kind | |
CN104317957B (en) | A kind of open platform of report form processing, system and report processing method | |
CN104283901B (en) | A kind of distributed live background service system and its method | |
CN106713391A (en) | Session information sharing method and sharing system | |
CN105740047A (en) | Cloud computing based virtual machine template management system and method | |
CN106790563A (en) | Distributed memory system and method | |
CN103473848B (en) | Network invoice checking framework and method based on high concurrency | |
CN104202424A (en) | Method for extending cache by software architecture | |
CN109241194A (en) | The load-balancing method and device of Database Systems based on High-Performance Computing Cluster distribution | |
CN112866421A (en) | Intelligent contract operation method and device based on distributed cache and NSQ | |
CN106940712A (en) | Sequence generating method and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |