CN109409958B - Method for quickly updating point balance in point overdue system - Google Patents

Method for quickly updating point balance in point overdue system Download PDF

Info

Publication number
CN109409958B
CN109409958B CN201811267595.1A CN201811267595A CN109409958B CN 109409958 B CN109409958 B CN 109409958B CN 201811267595 A CN201811267595 A CN 201811267595A CN 109409958 B CN109409958 B CN 109409958B
Authority
CN
China
Prior art keywords
case
point
field
user
balance
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.)
Active
Application number
CN201811267595.1A
Other languages
Chinese (zh)
Other versions
CN109409958A (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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201811267595.1A priority Critical patent/CN109409958B/en
Publication of CN109409958A publication Critical patent/CN109409958A/en
Application granted granted Critical
Publication of CN109409958B publication Critical patent/CN109409958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0235Discounts or incentives, e.g. coupons or rebates constrained by time limit or expiration date
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0208Trade or exchange of goods or services in exchange for incentives or rewards

Abstract

The invention discloses a method for quickly updating the balance of points in a point overdue system, which comprises the following steps: establishing a scoring system consisting of a user table and a water flow meter, wherein the user table comprises an id field and a cash field; adding a last _ off _ date field and an off _ case field in the user table; updating the off _ case field at each point consumed; when the execution point expires, the point to be deducted when the next execution point expires is calculated. The invention additionally maintains the accumulated point balance deducted at the next time of expiration, when the user accumulated point is obtained, the current time is compared with the expiration time, if the current time reaches the expiration time, the available accumulated point balance is the accumulated point balance deducted by the deduction integral value; and returning the integral balance when the time is not reached, and realizing the quick and non-delay execution of the operation of deducting the overdue integral.

Description

Method for quickly updating point balance in point overdue system
Technical Field
The invention relates to the technical field of point data processing, in particular to a method for quickly updating point balance in a point overdue system.
Background
Currently, points are used as a sales promotion means for effectively expanding user groups and improving user loyalty. The point expiration strategy can screen target active users and reduce the maintenance cost of the users, so that the point expiration time is very necessary to be set for a point system so as to timely execute expiration operation on the points of the users. The conventional method for realizing the overdue credit is generally divided into two methods, one method is to acquire each credit and deduct the credit if the credit is not consumed after the overdue time is reached. The other is that the integral acquired in a certain time period is deducted without spending after reaching the set expiration time, and the first method has complex implementation logic and large calculation amount. Thus, many implementations currently employ the second approach. The second current implementation is that user points are expired one by one after the expiration time is reached, the execution process may last for several hours or even longer, and the point zero clearing may delay in the point expiration execution process.
Disclosure of Invention
The invention aims to provide a method for quickly updating the balance of an integral in an integral overdue system, which is used for solving the problem that the integral zero clearing is delayed due to longer integral overdue execution time in the prior art.
The invention solves the problems through the following technical scheme:
a method for quickly updating point balances in a point expiration system, comprising:
step S100: establishing a credit system consisting of a user table and a water flow meter, wherein the user table comprises an id field and a case field, the id field is used for uniquely identifying a user, and the case field is used for identifying the current credit balance;
step S200: adding a last _ off _ date field and an off _ case field in a user table, wherein the last _ off _ date field is used for identifying the expiration time of the last executed integral, and the off _ case field is used for identifying the integral to be deducted when the next executed integral expires;
step S300: updating the off _ case field at each point consumed;
step S400: when the execution point expires, the point to be deducted when the next execution point expires is calculated.
Further, the step S300 specifically includes:
step S310: acquiring the integral balance of the user:
inquiring a user table, detecting whether last _ off _ date plus an integration period is smaller than the current date, if so, returning a value obtained by subtracting an off _ case field from a case field as the current integration balance, otherwise, returning a case field value as the user balance;
step S320: the user consumes the points:
comparing whether the current credit balance is larger than the consumption amount, if so, entering the next step, otherwise, returning to fail;
step S330: judging whether the sum of the last _ off _ date field and an integration period is less than the current date, if so, deducting the case, and generating a flow chart record; otherwise, deducting case and deducting off _ case, and generating a flow table record.
Further, in step S330, when off _ case is deducted, if off _ case is smaller than the consumption credit amount, off _ case is cleared.
Further, the step S400 specifically includes:
step S410: searching a user table for a user needing to perform an integral expiration operation;
step S420: performing a case subtraction of off _ case for the user, and modifying last _ off _ date to be a current time value;
step S430: scanning the flow water meter, acquiring the integral quantity which is acquired by the current user within the required expiration period but is not spent, and filling the integral quantity into an off _ case field to obtain the value of the next expiration integral;
step S440: and circularly executing the steps S410-S430 until all the users have executed the expiration of the integration.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the invention additionally maintains the accumulated point balance deducted at the next time of expiration, when the user accumulated point is obtained, the current time is compared with the expiration time, if the current time reaches the expiration time, the available accumulated point balance is the accumulated point balance deducted by the deduction integral value; and returning the point balance when the time is not reached, changing the point overdue executed at the end of the point period into real-time deduction of the overdue point of the user when the point is consumed each time, and calculating the point overdue executed next time, thereby realizing quick and delay-free execution of point overdue deduction operation.
Drawings
FIG. 1 is a flow chart of the present invention for obtaining user-available points;
FIG. 2 is a flow chart of the consumer points consumed in the present invention;
fig. 3 is a flow chart of the present invention for performing expiration of credits.
Detailed Description
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
Example 1:
referring to fig. 1, a method for quickly updating a credit balance in a credit expiration system includes:
1. database table establishment
The user table of the prior art bonus point system is added with fields, the user table of the prior art bonus point system is shown as the following table 1, and the flow meter of the prior art is shown as the following table 2:
Figure BDA0001845255850000031
TABLE 1 user table of prior art integrating system
Figure BDA0001845255850000032
Figure BDA0001845255850000041
TABLE 2 flow chart of integrating system in prior art
Adding a last _ off _ date field and an off _ case field in table 1, results in table 3 below,
Figure BDA0001845255850000042
TABLE 3 user table of integral system
2. Obtaining a user point balance
And inquiring a user table (user table) through the id of the user to obtain user data, if last _ off _ date plus a period is less than the current date, returning a case-off _ case as an integral balance, and otherwise, returning a case field value as the integral balance.
The specific process is as shown in fig. 1, first obtain user id from user table, query data from user table and give amplitude to u, query whether data u exists, if yes, obtain current period y, judge whether last _ off _ date of u plus a period equals to y, if yes, subtract off _ case field value from case field and return to case field of u, otherwise, return to case field value; if u does not exist, returning that the user does not exist.
3. Consumer points of consumption
Comparing whether the obtained integral balance is larger than the consumption amount and not larger than the return failure; if the sum of last _ off _ date and a period is larger than the current date, the sum is smaller than the current date, the user's case is deducted if the sum is smaller than the current date, otherwise, the case is deducted and off _ case is deducted, if the off _ case is smaller than the consumption integral amount when the off _ case is deducted, only setting the off _ case to be zero, and generating a running water record.
Specifically, as shown in fig. 2, a user id is obtained, a number of expenditure points out _ case is obtained, data u is queried through the user id, an available point uc of the user is obtained, whether the available point uc of the user is greater than the number of expenditure points out _ case is judged, if yes, whether the current year is equal to last _ off _ year of u is judged, if yes, out _ case is subtracted from off _ case of u, and if the result is less than 0, the value is set to 0; otherwise, subtracting out _ case from the case field of the user and updating the database to generate a running record; if the user available points uc are less than the number of expenditure points out _ case, the points balance is prompted to be insufficient.
4. Performing point expiration
Acquiring a current period, inquiring a user table, finding out data with last _ off _ case smaller than the current period, wherein the part of users need to execute integral expiration operation, subtracting off _ case from a case value to modify last _ off _ date into a current period value, scanning the flow water meter, acquiring the integral quantity which is acquired by the current user in the period needing expiration at this time but is not spent, and filling the integral quantity into an off _ case field.
Specifically, as shown in fig. 3, the user who is less than the current time after adding one period to the value of last _ off _ date field in the query user table puts in list; the following operations are performed one by one for the users in the list table:
taking out a user u, removing the user u from the list, subtracting off _ case from the case of the user u, setting last _ off _ year as the current period, and generating an integral overdue running water;
the point flow is scanned to get the total amount that will be needed the next time the points are obtained during the expiration period but not consumed, and the off _ case field is filled.
When the user point balance is obtained, whether the current time reaches the time of expiration is checked, if not, a case is directly returned as an available balance, and if the time of expiration reaches, the case minus off _ case is returned as the available balance, namely, the balance after the point which should be expired is deducted. Therefore, the purpose of deducting the overdue credit number of the user in real time is achieved. And finally, generating running water one by one and executing correlation operation of integral expiration. The deduction of the credit balance when the credit expires is executed in advance. According to the thought, the off _ case field needs to be updated when each consumption point is expired, and when the executed point is expired, the value of the next expired point is calculated, so that when the point is consumed, the point balance is acquired through the point balance acquisition method, whether the balance is enough to be consumed is judged, and because the expired point is consumed preferentially, the off _ case is required to be correspondingly deducted when the point is consumed, so that the next expired point can be maintained in real time. When the executed integral is overdue, firstly, last _ off _ date is detected to judge whether the executed integral is overdue or not, repeated execution of overdue is prevented, balance is deducted next, a running water record is generated, a running water meter is scanned again, the part, which is not consumed, of the integral acquired in the next overdue time period is calculated, and the part is filled in an off _ case field, namely the improved integral is overdue.
Although the present invention has been described herein with reference to the illustrated embodiments thereof, which are intended to be preferred embodiments of the present invention, it is to be understood that the invention is not limited thereto, and that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure.

Claims (3)

1. A method for quickly updating point balance in a point expiration system, comprising:
step S100: establishing a credit system consisting of a user table and a water flow meter, wherein the user table comprises an id field and a case field, the id field is used for uniquely identifying a user, and the case field is used for identifying the current credit balance;
step S200: adding a last _ off _ date field and an off _ case field in a user table, wherein the last _ off _ date field is used for identifying the expiration time of the last executed integral, and the off _ case field is used for identifying the integral to be deducted when the next executed integral expires;
step S300: updating the off _ case field when each point is consumed specifically includes:
step S310: acquiring the integral balance of the user:
inquiring a user table, detecting whether last _ off _ date plus an integration period is smaller than the current date, if so, returning a value obtained by subtracting an off _ case field from a case field as the current integration balance, otherwise, returning a case field value as the user balance;
step S320: the user consumes the points:
comparing whether the current credit balance is larger than the consumption amount, if so, entering the next step, otherwise, returning to fail;
step S330: judging whether the sum of the last _ off _ date field and an integration period is less than the current date, if so, deducting the case, and generating a flow chart record; otherwise, deducting the case and deducting the off _ case to generate a flow chart record;
step S400: when the execution point expires, the point to be deducted when the next execution point expires is calculated.
2. The method of claim 1, wherein in step S330, when off _ case is deducted, if off _ case is smaller than consumption credit amount, then off _ case is cleared.
3. The method for rapidly updating the balance of points in the point expiration system according to claim 2, wherein the step S400 specifically comprises:
step S410: searching a user table for a user needing to perform an integral expiration operation;
step S420: performing a case subtraction of off _ case for the user, and modifying last _ off _ date to be a current time value;
step S430: scanning the flow water meter, acquiring the integral quantity which is acquired by the current user within the required expiration period but is not spent, and filling the integral quantity into an off _ case field to obtain the value of the next expiration integral;
step S440: and circularly executing the steps S410-S430 until all the users have executed the expiration of the integration.
CN201811267595.1A 2018-10-29 2018-10-29 Method for quickly updating point balance in point overdue system Active CN109409958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811267595.1A CN109409958B (en) 2018-10-29 2018-10-29 Method for quickly updating point balance in point overdue system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811267595.1A CN109409958B (en) 2018-10-29 2018-10-29 Method for quickly updating point balance in point overdue system

Publications (2)

Publication Number Publication Date
CN109409958A CN109409958A (en) 2019-03-01
CN109409958B true CN109409958B (en) 2021-11-16

Family

ID=65470341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811267595.1A Active CN109409958B (en) 2018-10-29 2018-10-29 Method for quickly updating point balance in point overdue system

Country Status (1)

Country Link
CN (1) CN109409958B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486036B (en) * 2021-07-07 2023-12-29 广州博冠信息科技有限公司 Virtual resource management method and device, electronic equipment and storage medium
CN113723940B (en) * 2021-09-01 2023-11-03 京东科技控股股份有限公司 Account data processing method and device, electronic equipment and storage medium
CN117611249B (en) * 2024-01-16 2024-04-16 杭州数云信息技术有限公司 Member point information processing method and device, readable storage medium and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008054750A3 (en) * 2006-10-30 2008-07-24 Credit Suisse Securities Usa L Generating documentation and approvals for entities and transactions
CN105117418A (en) * 2015-07-30 2015-12-02 百度在线网络技术(北京)有限公司 Search based service information management system and method
CN105469275A (en) * 2015-11-12 2016-04-06 广州优识资讯系统有限公司 Credit data processing method and system based on plurality of merchants
CN107563812A (en) * 2017-09-05 2018-01-09 广东科杰通信息科技有限公司 A kind of integrate-dump method, system
CN107688934A (en) * 2017-09-14 2018-02-13 平安科技(深圳)有限公司 Integrate deduction method and terminal device
CN108510333A (en) * 2018-04-27 2018-09-07 厦门南讯软件科技有限公司 A kind of more clients integrate the processing method and processing device of fast-aging

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136114A (en) * 2010-01-21 2011-07-27 维鹏信息技术(上海)有限公司 Control method for acquiring coupon by coupon terminal and corresponding system
CN103413216B (en) * 2013-05-16 2018-02-09 深圳市淘淘谷信息技术有限公司 A kind of more account management methods of payment
CN106960366A (en) * 2017-03-23 2017-07-18 深圳市优讯信息技术有限公司 Integral cycle data processing method, platform
CN108154393A (en) * 2017-12-25 2018-06-12 株洲市红博医学知识培训指导服务有限公司 A kind of quadrature conversion method and its system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008054750A3 (en) * 2006-10-30 2008-07-24 Credit Suisse Securities Usa L Generating documentation and approvals for entities and transactions
CN105117418A (en) * 2015-07-30 2015-12-02 百度在线网络技术(北京)有限公司 Search based service information management system and method
CN105469275A (en) * 2015-11-12 2016-04-06 广州优识资讯系统有限公司 Credit data processing method and system based on plurality of merchants
CN107563812A (en) * 2017-09-05 2018-01-09 广东科杰通信息科技有限公司 A kind of integrate-dump method, system
CN107688934A (en) * 2017-09-14 2018-02-13 平安科技(深圳)有限公司 Integrate deduction method and terminal device
CN108510333A (en) * 2018-04-27 2018-09-07 厦门南讯软件科技有限公司 A kind of more clients integrate the processing method and processing device of fast-aging

Also Published As

Publication number Publication date
CN109409958A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109409958B (en) Method for quickly updating point balance in point overdue system
CN106033424B (en) Data mining method and device
CN108647357B (en) Data query method and device
CN107133289B (en) Method and device for determining business circle
WO2017148266A1 (en) Method and system for training machine learning system
CN107451918B (en) Asset data management method and device
CN112348648B (en) Resource processing method and device
CN111680085A (en) Data processing task analysis method and device, electronic equipment and readable storage medium
CN108459965B (en) Software traceable generation method combining user feedback and code dependence
CN103903148A (en) C2C system, B2C system, and application methods thereof
CN108510333B (en) Multi-client point rapid expiration processing method and device
CN113570437A (en) Product recommendation method and device
CN107330709B (en) Method and device for determining target object
CN105468726B (en) Method for computing data and system based on local computing and distributed computing
CN115099928A (en) Method and device for identifying lost customers
CN104766193A (en) Main line logistics transportation demand forecasting method
CN112035681B (en) Method and device for determining credit card rate information based on knowledge graph
CN109492006B (en) Mass data processing method and device based on Oracle
CN110457272B (en) Bill batch processing method and device
CN113409147A (en) Account data processing method and device, electronic equipment and storage medium
CN103927349A (en) Load evaluating and overload judging method of stream data system
CN110599258A (en) Method and device for prompting influence information of regular events on product price change
CN111967781B (en) Impact assessment method and device for system transformation
CN112488657B (en) Flight information processing method, device and equipment
CN116756135B (en) Data cleaning method, device, equipment and 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