CN115760231A - Point data management method, electronic device, and storage medium - Google Patents

Point data management method, electronic device, and storage medium Download PDF

Info

Publication number
CN115760231A
CN115760231A CN202211485178.0A CN202211485178A CN115760231A CN 115760231 A CN115760231 A CN 115760231A CN 202211485178 A CN202211485178 A CN 202211485178A CN 115760231 A CN115760231 A CN 115760231A
Authority
CN
China
Prior art keywords
integral
type
point
log
value
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
CN202211485178.0A
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.)
Zhejiang Yingneng Technology Co ltd
Original Assignee
Zhejiang Yingneng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Yingneng Technology Co ltd filed Critical Zhejiang Yingneng Technology Co ltd
Priority to CN202211485178.0A priority Critical patent/CN115760231A/en
Publication of CN115760231A publication Critical patent/CN115760231A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a point data management method, an electronic device and a storage medium, wherein different point generation and application scenes are set as different point reasons, and then a first point log is generated according to the point reasons, member information, a point log id and the total amount of points before change; acquiring an integral change value corresponding to the integral reason, and processing the integral change value and the integral sum before change according to an integral processing mode corresponding to the integral reason to obtain the integral sum after change; and updating the first point log according to the total amount of the changed points to obtain a second point log, and updating the current points of the member by using the total amount of the changed points. The invention sets different integral processing modes for different integral reasons, generates corresponding integral logs, and then carries out integral change on the integral logs to realize the management and the clearing of integral data, thereby solving the problems of high cost and the like of carrying out integral clearing by enterprises under multi-scene services.

Description

Point data management method, electronic device, and storage medium
Technical Field
The present invention relates to the field of point management technologies, and in particular, to a point data management method, an electronic device, and a storage medium.
Background
The credit is used as a virtual currency, is a carrier for exciting customers and guiding mechanisms, and is a marketing means or an operation strategy for stimulating continuous consumption of consumers by merchants. At present, the modes are widely used in retail industry, aviation industry, banking industry, hotel industry and the like to assist in developing point activities and improve member stickiness and repurchase. As a carrier for an enterprise to stimulate customers, the 'point score' has certain value and wide application, and can be used for consumption, cash deduction, parking fee deduction and commodity exchange. With the wider range of point services, a mature management method is also necessary for clearing the points.
Currently, there are many ways to obtain the "integral", such as: the method comprises the steps of online and offline consumption, game reward, intelligent marketing presentation, sign-in task reward, increase of managers and the like \8230303030303080, and as points acquired through different ways are more and the purposes of the points are more and more wide, the recording and calculating cost of enterprises is increased, so that a set of 'point' clearing method needs to be established to carry out clearing business on the 'points'.
Because the 'point' has certain cost, enterprises can set the time for clearing the point, and in an actual business scene, because consumers can have the condition that the consumption time is completely different from the time for returning goods, the 'point' is not normally cleared, for example, the 'point' obtained by corresponding application can have different refund conditions, or because of the uncertainty of the refund time (for example, a certain merchant sets the 'point' to clear and settle in 6.31 days, the consumer uses the consumption point clearing operation in 6.25 days, consumes to obtain a new point in 6.30 days, and finally performs the refund operation in 7.2 days), the point clearing is easy to generate errors, and even the indefinite-period point can be realized in extreme cases, thereby undoubtedly influencing the profit of the enterprises.
Therefore, for specific needs in the retail business process, how to perform unified clearing on the 'points' generated by different activities, and the 'point' deduction operation after refund after 'point' zero clearing becomes two problems which are difficult to overcome in clearing, so that a large amount of labor cost is required in the prior art to perform point management work.
Disclosure of Invention
The embodiment of the invention provides a point data management method, electronic equipment and a storage medium, which are used for at least solving the problem that in the prior art, the cost for managing points by enterprises is high under the condition of wide point generation and application scenes.
In a first aspect, an embodiment of the present invention provides a point data management method, where the method includes:
generating an integral log id of the current integral log, and acquiring integral event and member information;
acquiring the current total point of the member according to the member information to be used as the total point before change;
generating a first point log according to the point affair, the member information, the point log id and the total amount of points before change;
acquiring an integral variation value corresponding to the integral reason, and processing the integral variation value and the integral sum before change according to an integral processing mode corresponding to the integral reason to obtain the integral sum after change;
and updating the first point log according to the total amount of the changed points to obtain a second point log, and updating the current points of the member by using the total amount of the changed points.
In some of these embodiments, the credits are summarized into five credit types: the system comprises a class A, a class B, a class C, a class D and a class E, wherein the class A and the class B perform addition processing on integrals, and the class C, the class D and the class E perform subtraction processing on the integrals; wherein,
the A-type credit affairs comprise offline consumption rewards, online consumption rewards, game rewards, intelligent marketing donations, sign-in rewards, task rewards, administrator increment and initialization credits;
the credit affairs of the type B comprise credit exchange return goods, consumption cash return goods and parking fee refund;
the credit affairs of the type C comprise consumption cash-out, credit exchange, administrator deduction, game participation threshold, activity registration threshold and credit balance parking fee;
the D-type point credit is deducted by the offline return goods and the online return goods;
the E-type credits are cleared by the inclusion of credit expiration.
In some embodiments, the generating a first points log according to the points event, the membership information, the points log id, and the pre-change points total comprises:
acquiring a service flow id, judging whether an integral log of the service flow id in the integral event routing exists, and if so, returning to report an error;
if the type of the point event is not the B type or the D type, judging whether the type of the point event is the B type or the D type; if yes, acquiring an original service flow id, and then sending a member query request to acquire a member id; if not, directly sending a member query request to acquire a member id;
judging whether the type of the integral event is C type; if yes, determining the type of the integral event as a C type;
if the type of the integral affair is not C type, determining that the type of the integral affair is A type or E type;
and forming a first point log of the member according to the point event, the member id, the point log id, the total amount of points before change, the service flow id, the type of the point event and a pre-constructed point log data structure model.
Specifically, the method further includes, after the obtaining of the original service pipeline id:
judging whether the service flow id is associated with the original service flow id, and if not, returning to report an error;
if the original service stream id is associated, continuously judging whether the original service stream id has an integral log corresponding to the integral event or not, and if not, returning to report an error; and if so, sending a member inquiry request to acquire the member id.
Specifically, the sending the member query request to obtain the member id includes:
acquiring the member inquiry request, and judging whether the member inquiry request is an external request or an internal request;
if the request is an internal request, directly acquiring a member id; if the request is an external request, acquiring a mobile phone number or a member card number, judging whether the mobile phone number or the member card number exists, and if not, returning to report an error; if yes, acquiring a member id according to the mobile phone number or the member card number;
judging whether the member id exists or not, and if not, returning to report an error; if so, outputting the member id.
In some embodiments, said processing the integral variation value and the total integral amount before the change according to the corresponding integral processing mode of the integral rule to obtain the total integral amount after the change includes:
when the type of the integral cause is A type, the calculation formula of the total amount of the changed integral is as follows:
the total integral after change = total integral before change + integral variation value;
when the type of the integral event cause is class C, the calculation formula for obtaining the total amount of the changed integral is as follows:
total integral after change = total integral before change-integral variation;
when the type of the credit course is D type, the calculation formula for obtaining the total amount of the changed credit is as follows:
total integral after change = total integral before change-integral variation;
wherein, the point variation value is an integral value generated after the member completes the corresponding type of points.
In some embodiments, when the type of the integration event is class E, the obtaining the integration variation value further includes:
generating a record id of the current integral zero clearing record, and acquiring an effective integral value which is really obtained in an effective time range;
calculating an overdue integral value according to the effective integral value and the total sum of integrals before change, and taking the overdue integral value as an integral change value;
and generating an integral zero clearing record according to the record id, the effective integral value, the total integral amount before change and the overdue integral value.
Specifically, the acquiring of the valid integrated value actually obtained in the valid time range includes:
acquiring a zero clearing date and an effective limit date, and determining the effective time range according to the zero clearing date and the effective limit date;
acquiring the total sum of the A-type integral variation values in the effective time range, wherein the associated original integral log is the total sum of the D-type integral variation values in the effective time range;
the valid integration value is equal to the sum of the class a integral variations minus the sum of the class D integral variations.
In some embodiments, when the type of the point event is class B, the obtaining the modified total amount of points includes:
acquiring an original service flow id of an original point log associated with the first point log;
finding out a corresponding original integral log according to the original service flow id;
extracting receipt time and a membership id from the original log, and judging whether the membership id has an integral zero clearing record after the receipt time;
if not, the total integral sum after the change is equal to the total integral sum before the change plus the integral variation value; and if so, acquiring a deduction value, wherein the total integral amount after the change is equal to the total integral amount before the change minus the deduction value.
Specifically, the obtaining of the overtaking value includes:
acquiring the total sum of the past due integrals, all the B-type integral variation values, the current B-type integral variation value and the actually obtained effective integral value in the effective range, and calculating to obtain a deductible integral value;
judging whether the deducible integral value is larger than zero, if not, the deducible value is zero; if yes, obtaining an overdue integral value, wherein a calculation formula of the deduction value is as follows: chase value = chasable integral-stale integral-current class B integral variation.
In some of these embodiments, the integral log data structure model consists of:
integral log id, creation time, document time, integral type, integral cause, MCUid, integral variation value, pre-change integral total amount, post-change integral total amount, original integral log id, service flow id and original service flow id.
In a second aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to execute the point data management method according to any one of the above embodiments.
In a third aspect, an embodiment of the present invention provides a storage medium, in which a computer program is stored, where the computer program is configured to execute the point data management method according to any one of the above embodiments when the computer program runs.
Compared with the related art, the point data management method, the electronic device and the storage medium provided by the embodiment of the invention have the advantages that different point generation and application scenes are set as different point reasons, if a new point acquisition mode or point application is provided, the corresponding point reasons can be newly added, the corresponding point calculation modes are set for the different point reasons, and then the corresponding point logs are generated according to the different point reasons and the point processing modes, because the point logs contain information required by users, the point data with different generation modes and applications can be uniformly cleared and managed through the point logs, so that the point recording cost of enterprises for points is reduced. On the other hand, after the integral log is generated, the integral change value and the total integral amount before change can be processed in a unified way according to the integral events recorded in the integral log and the corresponding integral processing mode to obtain the total integral amount after change; and updating the first point log according to the total amount of the changed points to obtain a second point log, and updating the current points of the member by using the total amount of the changed points. The invention directly carries out corresponding processing on the integral change value in the integral log by identifying different integral reasons without adopting manpower to carry out one-to-one calculation on different types of integrals, thereby solving the problem that the prior calculation needs a large amount of manpower to finish the work of integral clearing.
Therefore, the problem that enterprises carry out point counting under multi-scene services is solved, and compared with the current enterprise which can only manually realize part of points which are difficult to count, the point counting method can set different point processing modes according to actual service scenes, realizes effective management of all points through clear point processing logic, and greatly saves the cost of human resources.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not limit the invention. In the drawings:
fig. 1 is a flowchart of a point data management method according to an embodiment of the present invention;
FIG. 2 is a model of an integral log data structure provided by an embodiment of the invention;
FIG. 3 is a schematic diagram of the event classification of the points according to an embodiment of the present invention;
FIG. 4 is a flow chart for generating a points log provided by an embodiment of the invention;
FIG. 5 is a data structure model of an integral zero clearing record according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of setting the integrate and clear date according to an embodiment of the present invention;
FIG. 7 is a detailed example of the integral zeroing calculation provided by an embodiment of the present invention;
FIG. 8 is a flowchart of catch-up after integral zeroing according to an embodiment of the present invention;
fig. 9 is a detailed example of the integral zero clearing calculation provided by an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments provided by the present invention, belong to the protection scope of the present invention. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by one of ordinary skill in the art that the described embodiments of the present invention may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The use of the terms "a" and "an" and "the" and similar referents in the context of describing the invention (including a reference to the context of the specification and claims) are not to be construed as limiting the scope of the invention in any way, and may be construed in any way. The present invention relates to the terms "comprises," "comprising," "includes," "including," "has," "having" and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in the description of the invention are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The terms "first," "second," "third," and the like in reference to the present invention are used merely to distinguish between similar objects and not necessarily to represent a particular ordering for the objects.
Referring to fig. 1, an embodiment of the present invention provides a point data management method, which is mainly applied to a point data management platform in a retail (e.g., a mall), an airline, a bank, a hotel, or other consumer industry.
And S1, generating an integral log id of the current integral detail, and acquiring integral event and member information.
After the consumer performs the score-related activities online or offline each time, a business record is generated and uploaded to the background. That is, the point event and member information acquired by the point data management platform of the present invention may be extracted from the business record, and after acquiring the required information, the first point log may be generated according to the pre-constructed point log data structure model.
The embodiment provides an integral log data structure model, which is composed of the following parts with reference to fig. 2:
the integral log id (i.e. id in fig. 2) is an integral detail primary key of the currently generated integral log, and is also called an integral detail serial number; the creation time is the instantiation time of the current point log and is in the format of yyyy/mm/dd hh: mm: ss (namely year/month/time of day: minute: second); the document time is the time for calculating the integral life cycle, namely the creation time of the business record, is extracted from the business record and has the format of yyyy/mm/dd hh: mm: ss (namely year/month/time of day: minute: second); the integral type (type for short) is used for judging whether the integral processing mode is increased or decreased according to the transmitted integral reason; the cause of the integration, i.e. the reason for the integration to be processed; MCUid (the MUCid in FIG. 2) is a member number given by the point data management platform after a consumer transacts a member in any merchant; an integral variation value (variation value in fig. 2) which is an integral value generated by the present integration; the total amount of the points before changing is the total points of the member before increasing/decreasing the point change value; the changed total point amount is the total point of the member after increasing/decreasing the point variation value; the original score log id is also called an associated score detail serial number, and the original score log id is only used when the score is exchanged for return goods, the consumption is realized for the return goods, the return goods is returned after the off-line return goods and the return goods on-line return goods are returned (matched according to the original service serial id); a service flow id corresponding to the service object id of the integral event, for example, the service flow id of the offline consumption reward is the order number; the original service flow id is used for correlating the relation between the forward service and the reverse service, when the reason is that point exchange return goods generation, consumption cancel return goods generation, off-line return goods deduction and on-line return goods deduction, the service side calls an interface to be a transmitted parameter, and the correlation of the original point log id depends on the transmitted value.
In order to facilitate the corresponding processing of the integral variation value, the present embodiment summarizes the commonly used integration into five integration types: the integral of the A type and the B type needs to be added, and the integral of the C type, the D type and the E type needs to be subtracted.
Referring specifically to FIG. 3, wherein the category A tally events are augmented and initialized by various items including offline consumption rewards, online consumption rewards, gaming rewards, smart marketing comps, check-in rewards, mission rewards, administrator points; the credit affairs of the type B comprise credit exchange return goods, consumption cash return goods and parking fee refund; the credit affairs of the type C comprise consumption cash-out, credit exchange, administrator deduction, game participation threshold, activity registration threshold and credit balance parking fee; the D-type tally affairs comprise an off-line return and an on-line return; the E-class score is cleared by including the score expiration.
S2, acquiring the current total point of the member according to the member information to serve as the total point before change; and S3, generating a first point log according to the point event cause, the member information, the point log id and the total amount of points before change. The member information can be directly obtained from the service flow (namely service records), such as a member card number or a mobile phone number of a member, and a corresponding MCUid is found according to the card number or the mobile phone number; the corresponding MCUid can also be directly inquired from the platform. After determining the MCUid, the current point condition of the member under the point data management platform of the present invention, i.e. the current total amount of points, can be queried. And then generating a first point log according to the existing information, such as point reasons, member information, point log id, total points before change and a point log data structure model.
The specific process of generating the integration log may refer to fig. 4.
Firstly, acquiring a service flow id, judging whether an integral log of the service flow id in an integral event exists, if so, returning an error report, wherein the error report content is that the service flow id already exists, and finishing the generation of the integral log. If the service flow id does not exist, judging whether the type of the point routing is B type or D type; if yes, acquiring an original service flow id, and then sending a member query request to acquire a member id; if not, directly sending a member inquiry request to acquire the member id.
In this embodiment, after the obtaining of the original service flow id, the method further includes: and judging whether the service flow id is associated with the original service flow id, if not, returning error report, wherein the error report content is the integral event that the original service flow id needs to be transmitted, and finishing the generation of the integral log. If the original service stream id is associated, continuously judging whether the original service stream id has an integral log corresponding to the integral event, if not, returning error report, wherein the error report content is that the original service stream id does not exist, and finishing the generation of the integral log. If so, a member query request is sent to obtain the member id (i.e., MCUid).
In this embodiment, sending the member query request to obtain the member id includes: acquiring the member inquiry request, and judging whether the member inquiry request is an external request or an internal request; if the request is an internal request, directly acquiring a member id; if the request is an external request, firstly acquiring a mobile phone number or a membership card number, judging whether the mobile phone number or the membership card number exists or not, if not, returning an error report, wherein the error report content is that the mobile phone number or the membership card number does not exist, and finishing the generation of the point log; if yes, acquiring a member id according to the mobile phone number or the member card number; then judging whether the member id exists or not, if not, returning an error report, wherein the error report content is that the MCUid does not exist, and finishing the generation of the integral log; and if so, outputting the membership id for generating a point log.
Then judging whether the type of the integral affair reason is a C-type reason except 'deduction by an administrator', if so, determining that the type of the integral affair reason of the service is a C-type; if the type of the integral event is not the type C, determining that the type of the integral event is the type A or the type E.
If the type of the point event is determined to be a C-type event except for 'deduction by an administrator', whether the currently available points are sufficient or not needs to be judged, if not, an error is returned, the error content is 'insufficient available points', and the generation of the point log is finished; if the points are sufficient for deduction, the generation of the point log is continued. In the present embodiment, whether the integration is sufficient is determined according to the following steps:
firstly, calculating a specific value of an available quota according to a formula of 'integrating total quota before changing-freezing quota-integrating variable = available quota', then judging whether the available quota is greater than zero, if so, indicating that the integral is sufficient; if not, the available integral is insufficient. The frozen quota is an integrated value which can be acquired by an order which is placed but not paid by a consumer, so that the integrated value is temporarily frozen and cannot be used.
After the type of the integral event is determined through the above steps, the first integral log of the member is composed according to the integral event, the member id, the integral log id, the total amount of the integral before change, the service flow id, the type of the integral event and a pre-constructed integral log data structure model, and for the B-type and D-type integral events, if the original integral log can be found according to the original service flow id, the original service flow id of the found original log is stored in the generated integral log, and then a signal successfully generated by the integral log and the id of the integral log are returned. The method provided by the embodiment of the invention can firstly return a plurality of point logs, then the calculation is carried out according to different point types in the plurality of point logs, and the latest point total amount obtained by the calculation is used for updating the point information of the member, for example, a certain member consumes on line to obtain point reward (type A), and then the point exchange and return operation is carried out to obtain point return (type B). And finally, pushing the updated total points (namely the total points after change) and the notice of point change outwards, and generally pushing the notice of point change to corresponding members and merchants.
In another embodiment of the present invention, the point change calculation may be performed every time a first point log is generated, and the total amount of points after change is obtained after calculation and the first point log is updated to obtain a second point log.
Specifically, step S4, obtaining an integral variation value, and calculating the integral variation value and the total integral amount before change according to an integral processing mode corresponding to the integral event to obtain the total integral amount after change; and S5, updating the first point log according to the total amount of the changed points to obtain a second point log, and updating the current points of the member by using the total amount of the changed points.
When the type of the integral event cause is A type, the calculation formula for obtaining the total amount of the changed integral is as follows: the total integral after change = total integral before change + integral variation value; when the type of the integral cause is C type, the calculation formula of the total amount of the changed integral is as follows: total integral after change = total integral before change-integral variation; when the type of the credit union is D type, the calculation formula of the total amount of the changed credit is as follows: total integral after change = total integral before change-integral variation; wherein, the point variation value is an integral value generated after the member completes the corresponding type point.
When the type of the integral cause is class E, the integral change value is an expired integral value which has expired, so that the method further comprises the following steps before acquiring the integral change value:
firstly, generating a record id of a current integral zero clearing record, and acquiring an effective integral value which is really obtained in an effective time range; then, calculating an overdue integral value according to the effective integral value and the integral sum before change, and taking the overdue integral value as an integral change value; and finally, generating an integral zero clearing record according to the record id, the effective integral value, the total integral amount before change and the overdue integral value.
The point clearing record of the embodiment of the present invention may refer to fig. 5, and specifically includes a record id, a business administration number id (i.e., a number of a business entity), a creation time, a clearing date, a valid limit date, a total amount of points before expiration (equivalent to the total amount of points before change), points actually obtained within a valid range (i.e., a valid integral value), an expiration integral value, a point log id (an id of a point log associated with the point clearing record), and a deduction condition list (generally including a point log id of a B-type point log associated with the point clearing record, a point variation value of the B-type point log, a deduction value, and the like). In the process of generating the integral zero clearing record, the absent item corresponding to the parameter can be set to be null, and if no integral needing to be deducted exists, the deduction condition list is set to be null, and no content is input.
For obtaining the valid integration value actually obtained in the valid time range, the following method steps may be referenced:
the method comprises the steps of firstly acquiring a zero clearing date and an effective limit date, and determining the effective time range according to the zero clearing date and the effective limit date, wherein the two dates are generally set by merchants, and different merchants can set different zero clearing times and different effective times. The zero clearing setting provided by the invention can refer to fig. 6, the zero clearing date set in fig. 6 is 23 hours, 59 minutes and 59 seconds of 31 days of 7 months every year, the validity limit date is 30 days of 6 months of the current year, after the two dates are set, the system can clear the points generated by the merchant before 30 days of 6 months of the current year in number 7 months of the year 31, if the current year is 2022 years, the points generated before 30 days of 6 months of 2022 years in number 7 months of 2022 years are cleared, and the points generated from 30 days of 6 months of 2022 years to 31 days of 7 months of 2022 years in number 30 days of 2022 years (the period is validity range time) are still valid.
After the effective time range is determined, acquiring the sum of the A-type integral variation values in the effective time range, wherein the associated original integral log is the sum of the D-type integral variation values in the effective time range; the effective integral value is equal to the sum of the A-type integral variation values minus the sum of the D-type integral variation values, and the specific calculation formula is as follows:
the effective integral value = class a total of integral variation-class D total of integral variation;
expired integral = total before change-valid integral;
the total of the a-type integral variation values refers to the sum of the integral variation values of all the a-type integral logs in the valid time range, and the total of the D-type integral variation values refers to the sum of the integral variation values of the D-type integral logs in the valid time range, which are associated with the original integral logs (a types). It should be noted that the counting range of the D-type integral log is that the associated original integral log is within the valid time range, that is, the D-type integral logs of all the document times within the valid time range can be found out first, and then the D-type integral logs of which the associated original integral log (a-type) is not within the valid range are removed.
The invention provides two examples of performing overdue zero clearing calculation on integrals, and reference is made to fig. 7, wherein example 1 is to perform zero clearing calculation according to the method and formula provided by the invention, and example 2 is to perform zero clearing calculation by using a way of calculating from the beginning, and the integrals of the two examples can be verified and calculated, so that the calculation mode provided by the scheme is proved to be correct.
In an embodiment of the present invention, when a new point log starts to be generated and the type of the point event of the point log is checked to be class B, the obtaining of the changed total amount of points includes the following steps.
Referring to fig. 8, first, an original point log corresponding to the original service pipeline id is found; then extracting bill time and a member id from the original log, and judging whether the member id has an integral zero clearing record after the bill time, namely whether the system carries out integral zero clearing (E-class) operation on the member or not; if no zero clearing operation is carried out, the integral change is calculated according to the normal condition, namely the total integral after the change is equal to the total integral before the change plus an integral variation value (B type); if the zero clearing operation exists, acquiring a deduction value, wherein the total integral sum after the change is equal to the total integral sum before the change minus the deduction value.
Specifically, the process of acquiring the rebate value according to the present invention includes the following steps.
Firstly, acquiring an integration sum before expiration (namely the integration sum before change in an integration log), all B-class integration variation values (deduction condition list in an integration zero clearing record), current B-class integration variation values (namely the integration variation values recorded in the just generated integration log) and effective integral values actually obtained in an effective range, and calculating to obtain the deductible integral values, wherein the specific calculation formula is as follows:
the deductible integral value = total integral amount before expiration + all the B-type integral variation values + current B-type integral variation values-effective integral value really obtained in effective time range;
after the deductible integral value is obtained, whether the deductible integral value is larger than zero needs to be judged, if not, the deductible value is set to be zero, the deductible value is updated to a deductible condition list recorded by integral zero clearing, and an integral log id of the item is set to be empty; if the deductible integral value is larger than zero, acquiring an overdue integral value from the integral zero clearing record, and then calculating a deductible value: chase value = chasable integral-stale integral-current class B integral variation. The invention provides two examples of deduction calculation of the integral, and refer to fig. 9, wherein, the integral (a) which can be deducted is smaller than zero in example 1, and the integral (a) which can be deducted is larger than zero in example 2, the integral of the two examples can be verified and calculated, which proves that the calculation mode provided by the scheme is correct.
After the deduction value is obtained through calculation, the updating operation of the current B-type integral log can be continuously completed, if an integral change request is sent to the system, the calculation formula of the integral change at this time is as follows: the total point after change = total point before change-deduction value (corresponding to the point variation value), the calculation result is updated to the corresponding point log to obtain a second point log, the changed point is expressed as "point clear deduction" or a more specific point cause of type B, and the deduction condition list in the point clear record associated with the changed point is updated.
The method for managing the integral data can solve the problems of integral clearing, integral resetting, zero clearing and deduction of an enterprise, and the like, and can establish an integral log through clear integral processing logic according to an actual service scene and perform corresponding integral scene calculation according to integral affairs in the integral log, compared with the current enterprise which can only manually realize part of integral which is difficult to clear; meanwhile, the invention also provides a data model of the integral zero clearing record, a zero clearing calculation process and a zero clearing deduction calculation logic, and the effective management of all the integrals is realized through the mutual cooperation of the integral log and the integral zero clearing record and the zero clearing deduction logic, so that the human resource cost is greatly saved, and the problems of difficult integral clearing of multiple scenes of an enterprise and high integral management cost can be effectively solved. The point data management method provided by the invention can be suitable for most scenes, and only new business scenes need to be added under five categories to which point logs belong when special requirements are needed in part of markets.
In addition, in combination with the point data management method in the foregoing embodiment, an embodiment of the present invention may be implemented by providing a storage medium. The storage medium having stored thereon a computer program; the computer program, when executed by a processor, implements any of the point data management methods in the above embodiments.
It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiment and optional implementation manners, and details of this embodiment are not described herein again.
An embodiment of the present invention further provides an electronic device, which may be a terminal. The electronic device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a point data management method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
It should be noted that, for specific examples in this embodiment, reference may be made to examples described in the foregoing embodiments and optional implementations, and details of this embodiment are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases or other media used in the embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be understood by those skilled in the art that various features of the above-described embodiments can be combined in any combination, and for the sake of brevity, all possible combinations of features in the above-described embodiments are not described in detail, but rather, all combinations of features which are not inconsistent with each other should be construed as being within the scope of the present disclosure.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (13)

1. A method for point data management, the method comprising:
generating an integral log id of the current integral log, and acquiring integral event and member information;
acquiring the current total point of the member according to the member information to be used as the total point before change;
generating a first point log according to the point affair, the member information, the point log id and the total amount of points before change;
acquiring an integral variation value corresponding to the integral reason, and processing the integral variation value and the integral sum before change according to an integral processing mode corresponding to the integral reason to obtain the integral sum after change;
and updating the first point log according to the total amount of the changed points to obtain a second point log, and updating the current points of the member by using the total amount of the changed points.
2. The method of claim 1, wherein the integration events are summarized into five integration types: the system comprises a class A, a class B, a class C, a class D and a class E, wherein the class A and the class B perform addition processing on integrals, and the class C, the class D and the class E perform subtraction processing on the integrals; wherein,
the A-type credit affairs comprise offline consumption rewards, online consumption rewards, game rewards, intelligent marketing donations, sign-in rewards, task rewards, administrator increment and initialization credits;
the credit affairs of the type B comprise credit exchange return goods, consumption cash return goods and parking fee refund;
the credit affairs of the type C comprise consumption cash-out, credit exchange, administrator deduction, game participation threshold, activity registration threshold and credit balance parking fee;
the D-type tally affairs comprise an off-line return and an on-line return;
the E-type credits are cleared by the inclusion of credit expiration.
3. The method of claim 2, wherein generating a first points log from the points event, membership information, points log id, and pre-change points total comprises:
acquiring a service flow id, judging whether the service flow id exists in an integral log of the integral event, and if so, returning to report an error;
if the type of the point event is not the B type or the D type, judging whether the type of the point event is the B type or the D type; if yes, acquiring an original service stream id, and then sending a member query request to acquire a member id; if not, directly sending a member query request to acquire a member id;
judging whether the type of the integral affair is C type; if yes, determining the type of the integral event as a C type;
if the type of the integral affair is not C type, determining that the type of the integral affair is A type or E type;
and forming a first point log of the member according to the point affair cause, the member id, the point log id, the total amount of points before change, the service flow id, the type of the point affair cause and a pre-constructed point log data structure model.
4. The method of claim 3, wherein obtaining the original service flow id further comprises:
judging whether the service flow id is associated with the original service flow id, and if not, returning to report an error;
if the original service stream id is associated, continuously judging whether the original service stream id has an integral log corresponding to the integral event or not, and if not, returning to report an error; and if so, sending a member inquiry request to acquire the member id.
5. The method of claim 3, wherein sending a member query request to obtain a member id comprises:
acquiring the member inquiry request, and judging whether the member inquiry request is an external request or an internal request;
if the request is an internal request, directly acquiring a member id; if the request is an external request, acquiring a mobile phone number or a member card number, judging whether the mobile phone number or the member card number exists, and if not, returning to report an error; if yes, acquiring a member id according to the mobile phone number or the member card number;
judging whether the member id exists or not, and if not, returning to report an error; if so, outputting the member id.
6. The method of claim 2, wherein said processing the integration variation value and the pre-change integration total according to the corresponding integration processing mode of the integration event to obtain the post-change integration total comprises:
when the type of the integral cause is A type, the calculation formula of the total amount of the changed integral is as follows:
the total integral after change = total integral before change + integral variation value;
when the type of the integral event cause is class C, the calculation formula for obtaining the total amount of the changed integral is as follows:
total integral after change = total integral before change-integral variation;
when the type of the credit course is D type, the calculation formula for obtaining the total amount of the changed credit is as follows:
total integral after change = total integral before change-integral variation;
wherein, the point variation value is an integral value generated after the member completes the corresponding type point.
7. The method of claim 2, wherein when the type of the integral event is class E, the obtaining the integral variation value further comprises:
generating a record id of the current integral zero clearing record, and acquiring an effective integral value which is really obtained in an effective time range;
calculating an overdue integral value according to the effective integral value and the total sum of integrals before change, and taking the overdue integral value as an integral change value;
and generating an integral clearing record according to the record id, the valid integral value, the integral sum before change and the overdue integral value.
8. The method of claim 7, wherein the obtaining of the actually obtained valid integration value in the valid time range comprises:
acquiring a zero clearing date and an effective limit date, and determining the effective time range according to the zero clearing date and the effective limit date;
acquiring the total sum of the A-type integral variation values in the effective time range, wherein the associated original integral log is the total sum of the D-type integral variation values in the effective time range;
the valid integrated value is equal to the sum of the class a integral variation minus the sum of the class D integral variation.
9. The method of claim 2, wherein when the type of the credit bureau is class B, the deriving the altered credit total comprises:
acquiring an original service flow id of an original point log associated with the first point log;
finding out a corresponding original integral log according to the original service flow id;
extracting document time and member id from the original log, and judging whether the member id has an integral zero clearing record after the document time;
if not, the total integral sum after the change is equal to the total integral sum before the change plus the integral variation value; and if so, acquiring a deduction value, wherein the total integral amount after the change is equal to the total integral amount before the change minus the deduction value.
10. The method of claim 9, wherein obtaining the catch-up value comprises:
acquiring the total sum of the past due integrals, all the B-type integral variation values, the current B-type integral variation value and the effective integral value really obtained in the effective range, and calculating to obtain the deductible integral value;
judging whether the deductible integral value is larger than zero, if not, the deductible value is zero; if yes, obtaining an overdue integral value, wherein a calculation formula of the detained value is as follows: chase value = chasable integral-stale integral-current class B integral variation.
11. The method of claim 1, wherein the integral log data structure model consists of:
integral log id, creation time, document time, integral type, integral cause, MCUid, integral variation value, pre-change integral total amount, post-change integral total amount, original integral log id, service flow id and original service flow id.
12. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to run the computer program to perform the point data management method according to any one of claims 1 to 11.
13. A storage medium having stored thereon a computer program, wherein the computer program is arranged to, when run, perform the point data management method of any of claims 1 to 11.
CN202211485178.0A 2022-11-24 2022-11-24 Point data management method, electronic device, and storage medium Pending CN115760231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211485178.0A CN115760231A (en) 2022-11-24 2022-11-24 Point data management method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211485178.0A CN115760231A (en) 2022-11-24 2022-11-24 Point data management method, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN115760231A true CN115760231A (en) 2023-03-07

Family

ID=85337370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211485178.0A Pending CN115760231A (en) 2022-11-24 2022-11-24 Point data management method, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN115760231A (en)

Similar Documents

Publication Publication Date Title
US20240070706A1 (en) Systems and methods for financial data communications and data management
US11367096B1 (en) Individualized incentives to improve financing outcomes
US20070198335A1 (en) System and method for providing loyalty rewards to an assistant designated to manage a financial transaction account
US20090254412A1 (en) Methods and systems using targeted advertising
US20050240477A1 (en) Cardholder loyalty program with rebate
US20090248506A1 (en) Merchant funded rewards network implementing cardholder loyalty rebate program
US20120109723A1 (en) Systems and methods for management of credit groups
CN108711104A (en) Physical assets information flow method, apparatus and equipment based on block chain
US20140025483A1 (en) System and method for protecting consumer privacy in the measuring of the effectiveness of advertisements
CN111612511A (en) Resource allocation method and device based on activity task and electronic equipment
US20190034984A1 (en) Third-party aid payment system and method
CN111445281B (en) Block chain-based integral monitoring method, device and computer readable storage medium
CN112561672A (en) Accounting data processing system, method, device, equipment and computer readable medium
US12067517B2 (en) Facilitating shareholder voting and associated proxy rights
US20190043132A1 (en) Funded pension processing device, method, and computer program
US20150073863A1 (en) Method and System for Linking Browsing History to Proprietary Transaction Data
US20090276248A1 (en) Apparatus, system, and method for funding insurance premium financing contracts
CN115760231A (en) Point data management method, electronic device, and storage medium
US11551175B1 (en) Facilitating shareholder voting and associated proxy rights
CN114416725A (en) Bill data processing method, device, equipment, medium and computer program product
CN114282921A (en) Prepaid card processing method, apparatus, computer device, and storage medium
US20120296808A1 (en) Trade-Credit Exchange Apparatus
CN114240610B (en) Automatic fund collection method, device, computer equipment and storage medium
CA2980045A1 (en) Credit card gift system and method
CN115345728B (en) Method and device for settling and counting information

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