CN111008875A - Method and system for calculating group preference in real time based on individuals - Google Patents
Method and system for calculating group preference in real time based on individuals Download PDFInfo
- Publication number
- CN111008875A CN111008875A CN201911343673.6A CN201911343673A CN111008875A CN 111008875 A CN111008875 A CN 111008875A CN 201911343673 A CN201911343673 A CN 201911343673A CN 111008875 A CN111008875 A CN 111008875A
- Authority
- CN
- China
- Prior art keywords
- group
- users
- user
- preferential
- accumulated
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0208—Trade or exchange of goods or services in exchange for incentives or rewards
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/08—Payment architectures
- G06Q20/10—Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
- G06Q20/102—Bill distribution or payments
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/0211—Determining the effectiveness of discounts or incentives
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0215—Including financial accounts
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Development Economics (AREA)
- General Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Economics (AREA)
- Game Theory and Decision Science (AREA)
- Marketing (AREA)
- Entrepreneurship & Innovation (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method and a system for calculating group preference in real time based on individuals, and relates to the field of telecommunication charging. The method comprises the following steps: acquiring consumption information of a first group of users, wherein the first group of users are any one of all group of users; obtaining an in-group accumulated bill of the first group of users according to the consumption information; reading group accumulated bills of all group users, and calculating group preferential effects according to preset group preferential conditions and the group accumulated bills of all the group users; obtaining an apportioned discount result of the first group user according to the proportion of the in-group accumulated bill of the first group user to the group accumulated bills of all the group users and the group discount; and updating the bill after the first group user is preferential according to the apportioned preferential result of the first group user. According to the scheme, dependence links of a processing flow for calculating the group preference are reduced, and meanwhile, a usage amount sharing mode is introduced into real-time preference calculation, so that the habit of checking the cost by a user is better met.
Description
Technical Field
The invention relates to the field of telecommunication charging, in particular to a method and a system for calculating group preference in real time based on individuals.
Background
The telecommunication service market generally releases family services, and the biggest characteristic in charging mode is to establish a family service group, and members in the group share preferential benefits. The types of the advantages include discount, presentation (full reduction), minimum consumption and the like, and for discount-type advantages, the results are consistent, and the results can be calculated according to the whole or the single member. The comps and minimum consumption depend on the overall consumption of the group and there is a problem of the distribution (to members) of the benefit results. In a distributed system with large service volume, the existing service preferential algorithm is dependent on the processing flow, so that the real-time concurrent processing according to users cannot be effectively realized, and the expansion processing capacity of the system is limited.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a system for calculating group preference in real time based on individuals aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows:
a method for computing group offers in real-time based on individuals, comprising the steps of:
s1, acquiring consumption information of a first group of users, wherein the first group of users is any one of all group users;
s2, obtaining the intra-group accumulated bill of the first group user according to the consumption information;
s3, reading the group accumulated bills of all group users, and calculating group benefits according to preset group benefit conditions and the group accumulated bills of all group users;
s4, obtaining the distribution preferential result of the first group user according to the proportion of the group accumulated bill of the first group user to the group accumulated bills of all the group users and the group preferential;
and S5, updating the bill after the first group user is preferential according to the apportioned preferential result of the first group user.
The invention has the beneficial effects that: according to the scheme, the consumption bills of the first group of users and the bills of all the group users are obtained, the total preferential of group consumption is calculated according to the bills of all the group users, the total preferential of group consumption is distributed to the consumption preferential value of the first group of users according to the consumption occupation ratio of the first group of users, the preferential consumption bills are sent to the first group of users, concurrent updating of other users is not influenced in the process, the group preferential of the group users is calculated in real time, the dependence link of the processing flow of the group preferential calculation is reduced, meanwhile, the usage sharing mode is introduced into the real-time preferential calculation, the habit of checking cost of general users is better met, and the method is more suitable for being used for group bill total preferential. Meanwhile, among distributed systems with large service volume, the conventional service preferential algorithm cannot effectively perform real-time concurrent processing according to users, the expansion processing capacity of the system is limited, and the flexibility of the system architecture and the system processing capacity are improved in detail.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, when the consumption information of the first group of users changes, the S3 specifically includes: reading the group accumulated bills of all the group users in a dirty reading mode, and calculating the group discount according to the preset group discount condition on the basis of the group accumulated bills of all the group users which do not change at last.
The beneficial effect of adopting the further scheme is that: the group accumulated bills of all the group users are read in a dirty reading mode, and the group accumulated bills which are not changed are taken as the standard, so that the condition that snapshot data are too old is avoided, and the group accumulated information read by all the members in the group is consistent.
Further, the S4 further includes: s41, when the consumption cost of other users except the first group user changes, each other user records a piece of notification information affecting the group accumulated bills of other members of the group;
and S42, calculating the distribution preferential result of the first group of users according to the combined notification information of the other users of the group.
The beneficial effect of adopting the further scheme is that: the first group user asynchronously caches the notification information of other group users influencing the group accumulated bill, combines the notification information, obtains the final group accumulated bill of all the group users according to the combined notification information, calculates the group benefit according to the final group accumulated bill, further calculates the group user of the first user, ensures the correct and consistent overall benefit result of the final group, and can independently calculate the self benefit result of the first group user without depending on the benefit calculation of other group users, reduces the mutual dependence of the group benefit calculation process, and improves the flexibility of the system architecture.
Further, the S42 specifically includes: and asynchronously caching a plurality of pieces of notification information, eliminating repeated notification information through a merging algorithm, and calculating the apportionment preferential result of the first group of users according to the calculation result of the last merging algorithm.
The beneficial effect of adopting the further scheme is that: by asynchronously caching the notification information of other users, eliminating repeated notification information through a merging algorithm, ensuring the validity of cached data according to the calculation result of the last merging algorithm, and ensuring that each user in a group can obtain a consistent whole group discount result according to the merging result, thereby ensuring the respective discount calculation result of each user in the group to be correct.
Further, the S1 specifically includes: locking a first group of users, acquiring consumption information of the first group of users, unlocking other group of users except the first group of users, and keeping concurrent updating of the other group of users.
The beneficial effect of adopting the further scheme is that: when the first group of users acquire the consumption information of the first group of users, only the first group of users are locked, subsequent preference calculation is carried out, other users in the group are not locked in the period, concurrent updating is kept, when the traffic is large, the processing capacity of the system is expanded, the dependence of calculating the preference among the group of users is reduced, time waste is avoided due to mutual waiting, and the working efficiency of the system is higher.
Another technical solution of the present invention for solving the above technical problems is as follows:
a system for computing group offers in real-time based on individuals, comprising:
the system comprises a user consumption information acquisition module, a group discount calculation module, a user discount calculation module and a user information updating module;
the user consumption information acquisition module is used for acquiring consumption information of a first group of users, and acquiring the intra-group accumulated bills of the first group of users according to the consumption information, wherein the first group of users are any one of all group users;
the group discount calculation module is used for reading the group accumulated bills of all the group users and calculating the group discount according to the preset group discount conditions and the group accumulated bills of all the group users;
the user privilege calculation module is used for obtaining an apportioned privilege result of the first group of users according to the proportion of the in-group accumulated bills of the first group of users to the group accumulated bills of all the group of users and the group privilege;
and the user information updating module is used for updating the preferential bills of the first group of users according to the apportioned preferential results of the first group of users.
The invention has the beneficial effects that: according to the scheme, the consumption bills of the first group of users and the bills of all the group users are obtained, the total preferential of group consumption is calculated according to the bills of all the group users, the total preferential of group consumption is distributed to the consumption preferential value of the first group of users according to the consumption occupation ratio of the first group of users, the preferential consumption bills are sent to the first group of users, concurrent updating of other users is not influenced in the process, the group preferential of the group users is calculated in real time, the dependence link of the processing flow of the group preferential calculation is reduced, meanwhile, the usage sharing mode is introduced into the real-time preferential calculation, the habit of checking cost of general users is better met, and the method is more suitable for being used for group bill total preferential. Meanwhile, among distributed systems with large service volume, the conventional service preferential algorithm cannot effectively perform real-time concurrent processing according to users, the expansion processing capacity of the system is limited, and the flexibility of the system architecture and the system processing capacity are improved in detail.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the group discount calculation module is specifically configured to, when the consumption information of the first group user changes, read the group accumulated bills of all group users in a dirty reading manner, and calculate the group discount according to a preset group discount condition, with reference to the group accumulated bills of all group users that do not change any more finally.
The beneficial effect of adopting the further scheme is that: the group accumulated bills of all the group users are read in a dirty reading mode, and the group accumulated bills which are not changed are taken as the standard, so that the condition that snapshot data are too old is avoided, and the group accumulated information read by all the members in the group is consistent.
Further, the user benefit calculation module is further configured to, when consumption fees of other users of the group other than the first group user change, record notification information of a group accumulated bill affecting other members of the group by each of the other users of the group, and calculate an apportioned benefit result of the first group user according to the combined notification information of the other users of the group.
The beneficial effect of adopting the further scheme is that: the first group user asynchronously caches the notification information of other group users influencing the group accumulated bill, combines the notification information, obtains the final group accumulated bill of all the group users according to the combined notification information, calculates the group benefit according to the final group accumulated bill, further calculates the group user of the first user, ensures the correct and consistent overall benefit result of the final group, and can independently calculate the self benefit result of the first group user without depending on the benefit calculation of other group users, reduces the mutual dependence of the group benefit calculation process, and improves the flexibility of the system architecture.
Further, the user preference calculation module is further specifically configured to asynchronously cache the plurality of notification information, eliminate repeated notification information through a merging algorithm, and calculate the apportioned preference result of the first group of users according to a calculation result of a last merging algorithm.
The beneficial effect of adopting the further scheme is that: by asynchronously caching the notification information of other users, eliminating repeated notification information through a merging algorithm, ensuring the validity of cached data according to the calculation result of the last merging algorithm, and ensuring that each user in a group can obtain a consistent whole group discount result according to the merging result, thereby ensuring the respective discount calculation result of each user in the group to be correct.
Further, the user consumption information acquiring module is specifically configured to lock a first group of users, acquire consumption information of the first group of users, unlock other group of users except the first group of users, and keep concurrent updates of the other group of users.
The beneficial effect of adopting the further scheme is that: when the first group of users acquire the consumption information of the first group of users, only the first group of users are locked, subsequent preference calculation is carried out, other users in the group are not locked in the period, concurrent updating is kept, when the traffic is large, the processing capacity of the system is expanded, the dependence of calculating the preference among the group of users is reduced, time waste is avoided due to mutual waiting, and the working efficiency of the system is higher.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flowchart illustrating a method for computing group offers in real time based on individuals according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a process for real-time group offers for single user consumption according to another embodiment of the present invention;
fig. 3 is a schematic flowchart of group offer asynchronous caching and merging calculation according to an embodiment of the present invention;
fig. 4 is a block diagram of a system for computing group offers in real time based on individuals according to an embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
As shown in fig. 1, a method for calculating group offers in real time based on individuals according to an embodiment of the present invention includes: s1, acquiring consumption information of a first group of users, wherein the first group of users are any one of all group users;
s2, obtaining the in-group accumulated bill of the first group of users according to the consumption information;
it should be noted that, as shown in a link ② in fig. 2, in the process, the group user accumulation with the user as a unit only updates the cost information of the current member itself.
S3, reading the group accumulated bills of all group users, and calculating group benefits according to the preset group benefit conditions and the group accumulated bills of all group users;
it should be noted that, as shown in a link ③ in fig. 2, when the user 1 performs the charge calculation, the accumulated billing charges of all users (1-N) in the group need to be loaded, where the charge of the user 1 belongs to the charge generated by the current real-time change, and other users in the group belong to the accumulated data of the previous change snapshot.
The final consistency algorithm is used, the group accumulated information is dirty read, and the snapshot data is over-old, so after the final group accumulated information is not changed any more, preferential calculation is performed for each member under the group again, and the consistency of the group accumulated information read by each member can be ensured.
The final consistency algorithm, as shown in fig. 2, solves the problem of lock-free concurrent computation through a redundant recalculation compensation mechanism, and meanwhile, the data is inconsistent in the change process;
the preset group preference condition may be determined according to preference services of the telecommunication service, such as discount, minimum consumption or full reduction, and the full reduction may be 500 preference, 50 preference, etc. when the group accumulates consumption.
S4, obtaining the distribution preferential result of the first group user according to the proportion of the group accumulated bill of the first group user to the group accumulated bills of all the group users and the group preferential;
as shown in link ④ of FIG. 2, the total consumption of the group is taken as the benefit object during calculation, the result after the benefit needs to be distributed to each member, and in order to improve the parallel calculation efficiency, the user 1 only calculates the cost that needs to be distributed to the user 1, in an embodiment, the group is assumed to be composed of the user 1, the user 2 and the user 3, 500 yuan is consumed in an accumulated manner, and the "direct giving 100 yuan" benefit is ordered, wherein the calculation result is shown in Table 1:
TABLE 1
The calculation of the total discount cost distributed to other people is to perform subsequent superposition discount use, in the above example, if the discount of "full 500 yuan minus 100 yuan, full 300 yuan minus 50 yuan" is continuously superposed, the total cost after the first discount is 400 yuan, and the superposed result can only meet the latter condition of "full 300 yuan minus 50 yuan", wherein the calculation result is shown in table 2.
TABLE 2
And S5, updating the bill after the first group user is preferential according to the apportioned preferential result of the first group user.
It should be noted that, as shown in a link ⑤ in fig. 2, the user benefit result after the benefit is updated, and the group benefit calculation triggered by the user 1 updates only the benefit result after the benefit is distributed to the user 1.
According to the scheme, the consumption bills of the first group of users and the bills of all the group users are obtained, the total preferential of group consumption is calculated according to the bills of all the group users, the total preferential of group consumption is distributed to the consumption preferential value of the first group of users according to the consumption occupation ratio of the first group of users, the preferential consumption bills are sent to the first group of users, concurrent updating of other users is not influenced in the process, the group preferential of the group users is calculated in real time, the dependence link of the processing flow of the group preferential calculation is reduced, meanwhile, the usage sharing mode is introduced into the real-time preferential calculation, the habit of checking cost of general users is better met, and the method is more suitable for being used for group bill total preferential. Meanwhile, among distributed systems with large service volume, the conventional service preferential algorithm cannot effectively perform real-time concurrent processing according to users, the expansion processing capacity of the system is limited, and the flexibility of the system architecture and the system processing capacity are improved in detail.
Preferably, in any of the above embodiments, when the consumption information of the first group of users changes, S3 specifically includes: reading the group accumulated bills of all group users in a dirty reading mode, and calculating the group discount according to the preset group discount condition on the basis of the group accumulated bills of all group users which do not change at last.
The group accumulated bills of all the group users are read in a dirty reading mode, and the group accumulated bills which are not changed are taken as the standard, so that the condition that snapshot data are too old is avoided, and the group accumulated information read by all the members in the group is consistent.
Preferably, in any of the above embodiments, S4 further includes: s41, when the consumption cost of other users except the first group user changes, each other user records a piece of notification information affecting the group accumulated bills of other members of the group;
and S42, calculating the distribution preferential result of the first group of users according to the notification information of the other combined users.
In one embodiment, as shown in fig. 3, it is assumed that member 1 consumes the expense, which affects the total expense of the group, and affects both the condition of the group benefit and the apportionment result. At this time, the total discount result of the group can be ensured to be accurate only by performing discount calculation on other members 2 and 3 in the group at the same time.
And each member only calculates the cost of the member in the group when the change occurs, and records a piece of notification information which influences other members. And performing preferential calculation on other affected members asynchronously according to the processing condition of the system and the service requirement on the overall perception of the user, and combining the repeated information causing the influence during each processing. For example: the method has the advantages that each group has 10 members, consumption of each member occurs in sequence, 10 times by 10 times to 100 times are needed to be calculated before caching, only 10 times by 10 times to 20 times are needed to be calculated in one period after caching, the calculation amount is reduced, and the system processing capacity is improved. The calculation process is as follows:
the first 10 times, each calculation is performed after each member is triggered;
the second 10 times, each member triggers the calculation of other 9 members, the total is 90 times, and after the cache is merged, only 10 members need to be considered to calculate once again;
put another way:
the cache is preceded by 10+9 × 10-100 times, and is followed by 10+ 10-20 times;
the first group user asynchronously caches the notification information of other group users influencing the group accumulated bill, combines the notification information, obtains the final group accumulated bill of all the group users according to the combined notification information, calculates the group benefit according to the final group accumulated bill, further calculates the group user of the first user, ensures the correct and consistent overall benefit result of the final group, and can independently calculate the self benefit result of the first group user without depending on the benefit calculation of other group users, reduces the mutual dependence of the group benefit calculation process, and improves the flexibility of the system architecture.
Preferably, in any of the above embodiments, S42 specifically includes: and asynchronously caching a plurality of pieces of notification information, eliminating repeated notification information through a merging algorithm, and calculating the apportionment preferential result of the first group of users according to the calculation result of the last merging algorithm.
The buffer memory can use a database, a file and a memory, the buffer memory aims at the following merging and weight removal, and the work order table of the memory database is used for storing the trigger user;
the merging algorithm is a process of de-duplication, and as described above, one member in the group may need to be passively operated many times by the change of other members, and actually only needs to be finally merged and calculated once.
By asynchronously caching the notification information of other users, eliminating repeated notification information through a merging algorithm, ensuring the validity of cached data according to the calculation result of the last merging algorithm, and ensuring that each user in a group can obtain a consistent whole group discount result according to the merging result, thereby ensuring the respective discount calculation result of each user in the group to be correct.
Preferably, in any of the above embodiments, S1 specifically includes: and locking the first group of users, acquiring consumption information of the first group of users, unlocking other group of users except the first group of users, and keeping concurrent updating of other group of users.
When the first group of users acquire the consumption information of the first group of users, only the first group of users are locked, subsequent preference calculation is carried out, other users in the group are not locked in the period, concurrent updating is kept, when the traffic is large, the processing capacity of the system is expanded, the dependence of calculating the preference among the group of users is reduced, time waste is avoided due to mutual waiting, and the working efficiency of the system is higher.
In other embodiments provided by the present invention, a system for computing group offers in real time based on individuals is provided, as shown in fig. 4, the system comprising:
the system comprises a user consumption information acquisition module 11, a group discount calculation module 12, a user discount calculation module 13 and a user information updating module 14;
the user consumption information acquisition module 11 is configured to acquire consumption information of a first group of users, and obtain an intra-group accumulated bill of the first group of users according to the consumption information, where the first group of users is any one of all group of users;
the group discount calculation module 12 is configured to read the group accumulated bills of all the group users, and calculate the group discount according to the preset group discount condition and the group accumulated bills of all the group users;
the user privilege calculation module 13 is configured to obtain an apportioned privilege result of the first group of users according to the proportion of the intra-group accumulated bills of the first group of users to the group accumulated bills of all the group of users and the group privilege;
the user information updating module 14 is configured to update the preferential bills of the first group of users according to the apportioned benefit results of the first group of users.
According to the scheme, the consumption bills of the first group of users and the bills of all the group users are obtained, the total preferential of group consumption is calculated according to the bills of all the group users, the total preferential of group consumption is distributed to the consumption preferential value of the first group of users according to the consumption occupation ratio of the first group of users, the preferential consumption bills are sent to the first group of users, concurrent updating of other users is not influenced in the process, the group preferential of the group users is calculated in real time, the dependence link of the processing flow of the group preferential calculation is reduced, meanwhile, the usage sharing mode is introduced into the real-time preferential calculation, the habit of checking cost of general users is better met, and the method is more suitable for being used for group bill total preferential. Meanwhile, among distributed systems with large service volume, the conventional service preferential algorithm cannot effectively perform real-time concurrent processing according to users, the expansion processing capacity of the system is limited, and the flexibility of the system architecture and the system processing capacity are improved in detail.
Preferably, in any of the above embodiments, the group benefit calculation module 12 is specifically configured to, when the consumption information of the first group user changes, read the group accumulated bills of all group users in a dirty reading manner, and calculate the group benefit according to a preset group benefit condition, based on the group accumulated bills of all group users that do not change any more finally.
The group accumulated bills of all the group users are read in a dirty reading mode, and the group accumulated bills which are not changed are taken as the standard, so that the condition that snapshot data are too old is avoided, and the group accumulated information read by all the members in the group is consistent.
Preferably, in any of the above embodiments, the user benefit calculating module 13 is further configured to, when consumption fees of other users of the group other than the first group user change, record notification information of a group accumulated bill affecting other members of the group by each other user of the group, and calculate an apportioned benefit result of the first group user according to the combined notification information of the other users of the group.
The first group user asynchronously caches the notification information of other group users influencing the group accumulated bill, combines the notification information, obtains the final group accumulated bill of all the group users according to the combined notification information, calculates the group benefit according to the final group accumulated bill, further calculates the group user of the first user, ensures the correct and consistent overall benefit result of the final group, and can independently calculate the self benefit result of the first group user without depending on the benefit calculation of other group users, reduces the mutual dependence of the group benefit calculation process, and improves the flexibility of the system architecture.
Preferably, in any of the above embodiments, the user benefit calculation module 13 is further specifically configured to asynchronously cache a plurality of pieces of notification information, eliminate repeated notification information through a merging algorithm, and calculate the apportioned benefit result of the first group of users according to the calculation result of the last merging algorithm.
By asynchronously caching the notification information of other users, eliminating repeated notification information through a merging algorithm, ensuring the validity of cached data according to the calculation result of the last merging algorithm, and ensuring that each user in a group can obtain a consistent whole group discount result according to the merging result, thereby ensuring the respective discount calculation result of each user in the group to be correct.
Preferably, in any embodiment described above, the user consumption information obtaining module 11 is specifically configured to lock a first group of users, obtain consumption information of the first group of users, and keep concurrent updates of other groups of users without locking other groups of users except the first group of users.
When the first group of users acquire the consumption information of the first group of users, only the first group of users are locked, subsequent preference calculation is carried out, other users in the group are not locked in the period, concurrent updating is kept, when the traffic is large, the processing capacity of the system is expanded, the dependence of calculating the preference among the group of users is reduced, time waste is avoided due to mutual waiting, and the working efficiency of the system is higher.
It is understood that some or all of the alternative embodiments described above may be included in some embodiments.
It should be noted that the above embodiments are product embodiments corresponding to the previous method embodiments, and for the description of each optional implementation in the product embodiments, reference may be made to corresponding descriptions in the above method embodiments, and details are not described here again.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described method embodiments are merely illustrative, and for example, the division of steps into only one logical functional division may be implemented in practice in another way, for example, multiple steps may be combined or integrated into another step, or some features may be omitted, or not implemented.
The above method, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for computing group offers in real-time based on individuals, comprising:
s1, acquiring consumption information of a first group of users, wherein the first group of users is any one of all group users;
s2, obtaining the intra-group accumulated bill of the first group user according to the consumption information;
s3, reading the group accumulated bills of all group users, and calculating group benefits according to preset group benefit conditions and the group accumulated bills of all group users;
s4, obtaining the distribution preferential result of the first group user according to the proportion of the group accumulated bill of the first group user to the group accumulated bills of all the group users and the group preferential;
and S5, updating the bill after the first group user is preferential according to the apportioned preferential result of the first group user.
2. The method according to claim 1, wherein when the consumption information of the first group user changes, the step S3 specifically includes: reading the group accumulated bills of all the group users in a dirty reading mode, and calculating the group discount according to the preset group discount condition on the basis of the group accumulated bills of all the group users which do not change at last.
3. The method for calculating group offers in real time based on individuals according to claim 1 or 2, wherein said S4 further comprises: s41, when the consumption cost of other users except the first group user changes, each other user records a piece of notification information affecting the group accumulated bills of other members of the group;
and S42, calculating the distribution preferential result of the first group of users according to the combined notification information of the other users of the group.
4. The method for calculating a group offer in real time based on a person according to claim 3, wherein the S42 specifically includes: and asynchronously caching a plurality of pieces of notification information, eliminating repeated notification information through a merging algorithm, and calculating the apportionment preferential result of the first group of users according to the calculation result of the last merging algorithm.
5. The method for calculating a group offer in real time based on a person according to claim 4, wherein the S1 specifically includes: locking a first group of users, acquiring consumption information of the first group of users, unlocking other group of users except the first group of users, and keeping concurrent updating of the other group of users.
6. A system for computing group offers in real-time based on individuals, comprising: the system comprises a user consumption information acquisition module, a group discount calculation module, a user discount calculation module and a user information updating module;
the user consumption information acquisition module is used for acquiring consumption information of a first group of users, and acquiring the intra-group accumulated bills of the first group of users according to the consumption information, wherein the first group of users are any one of all group users;
the group discount calculation module is used for reading the group accumulated bills of all the group users and calculating the group discount according to the preset group discount conditions and the group accumulated bills of all the group users;
the user privilege calculation module is used for obtaining an apportioned privilege result of the first group of users according to the proportion of the in-group accumulated bills of the first group of users to the group accumulated bills of all the group of users and the group privilege;
and the user information updating module is used for updating the preferential bills of the first group of users according to the apportioned preferential results of the first group of users.
7. The system according to claim 1, wherein the group benefit calculation module is specifically configured to, when the consumption information of the first group user changes, read the group accumulated bills of all group users in a dirty reading manner, and calculate the group benefit according to a preset group benefit condition based on the group accumulated bills of all group users that do not change any more finally.
8. The system according to claim 1, wherein the user benefit calculation module is further configured to, when consumption fees of other users of the group other than the first group user change, record notification information of a group accumulated bill affecting other members of the group for each of the other users of the group, and calculate the apportioned benefit result of the first group user according to the combined notification information of the other users of the group.
9. The system according to claim 1, wherein the user benefit calculation module is further specifically configured to asynchronously cache a plurality of pieces of notification information, eliminate repeated notification information through a merging algorithm, and calculate the apportioned benefit result of the first group of users according to a calculation result of a last merging algorithm.
10. The system according to claim 1, wherein the user consumption information obtaining module is specifically configured to lock a first group of users, obtain consumption information of the first group of users, unlock other group of users except the first group of users, and keep concurrent updates of the other group of users.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911343673.6A CN111008875B (en) | 2019-12-24 | 2019-12-24 | Method and system for calculating group preference based on personal real-time |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911343673.6A CN111008875B (en) | 2019-12-24 | 2019-12-24 | Method and system for calculating group preference based on personal real-time |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111008875A true CN111008875A (en) | 2020-04-14 |
| CN111008875B CN111008875B (en) | 2023-07-14 |
Family
ID=70117702
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911343673.6A Active CN111008875B (en) | 2019-12-24 | 2019-12-24 | Method and system for calculating group preference based on personal real-time |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111008875B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113765680A (en) * | 2021-07-28 | 2021-12-07 | 北京思特奇信息技术股份有限公司 | Method and system for overall calculation control preference |
| CN115811710A (en) * | 2021-09-13 | 2023-03-17 | 中国移动通信集团安徽有限公司 | Method, device, equipment and medium for determining telephone bill |
Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1756285A (en) * | 2004-09-30 | 2006-04-05 | 华为技术有限公司 | Processing method for realizing group user preferential charge |
| US20100323716A1 (en) * | 2009-06-18 | 2010-12-23 | Microsoft Corporation | Controlling ad delivery to mobile clients |
| US20120323674A1 (en) * | 2009-08-14 | 2012-12-20 | Dataxu, Inc. | Creation and usage of synthetic user identifiers within an advertisement placement facility |
| US20140046777A1 (en) * | 2009-08-14 | 2014-02-13 | Dataxu, Inc. | Methods and systems for using consumer aliases and identifiers |
| CN106126524A (en) * | 2016-06-07 | 2016-11-16 | 腾讯科技(深圳)有限公司 | Information-pushing method and device |
| CN106878031A (en) * | 2017-01-23 | 2017-06-20 | 北京思特奇信息技术股份有限公司 | Accelerate the method and system for the treatment of telecom service plan user bill |
| CN108171503A (en) * | 2017-11-09 | 2018-06-15 | 西安艾润物联网技术服务有限责任公司 | On-line payment processing method, equipment and computer readable storage medium |
| CN109636469A (en) * | 2018-12-13 | 2019-04-16 | 北京三快在线科技有限公司 | Discount coupon generation method, device, storage medium and electronic equipment |
| CN109727014A (en) * | 2018-11-20 | 2019-05-07 | 北京辰森世纪科技股份有限公司 | Processing method, device and the equipment of bill information |
| CN109767260A (en) * | 2018-12-15 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Bill discount method, device, device and storage medium based on integrated payment |
| CN110033156A (en) * | 2018-12-14 | 2019-07-19 | 阿里巴巴集团控股有限公司 | A kind of determination method and device of business activity effect |
| CN112131305A (en) * | 2020-06-19 | 2020-12-25 | 中信银行股份有限公司 | Account Processing System |
| CN112702178A (en) * | 2020-12-18 | 2021-04-23 | 中国联合网络通信集团有限公司 | Method, system and device for real-time charge accounting |
-
2019
- 2019-12-24 CN CN201911343673.6A patent/CN111008875B/en active Active
Patent Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1756285A (en) * | 2004-09-30 | 2006-04-05 | 华为技术有限公司 | Processing method for realizing group user preferential charge |
| US20100323716A1 (en) * | 2009-06-18 | 2010-12-23 | Microsoft Corporation | Controlling ad delivery to mobile clients |
| US20120323674A1 (en) * | 2009-08-14 | 2012-12-20 | Dataxu, Inc. | Creation and usage of synthetic user identifiers within an advertisement placement facility |
| US20140046777A1 (en) * | 2009-08-14 | 2014-02-13 | Dataxu, Inc. | Methods and systems for using consumer aliases and identifiers |
| CN106126524A (en) * | 2016-06-07 | 2016-11-16 | 腾讯科技(深圳)有限公司 | Information-pushing method and device |
| CN106878031A (en) * | 2017-01-23 | 2017-06-20 | 北京思特奇信息技术股份有限公司 | Accelerate the method and system for the treatment of telecom service plan user bill |
| CN108171503A (en) * | 2017-11-09 | 2018-06-15 | 西安艾润物联网技术服务有限责任公司 | On-line payment processing method, equipment and computer readable storage medium |
| CN109727014A (en) * | 2018-11-20 | 2019-05-07 | 北京辰森世纪科技股份有限公司 | Processing method, device and the equipment of bill information |
| CN109636469A (en) * | 2018-12-13 | 2019-04-16 | 北京三快在线科技有限公司 | Discount coupon generation method, device, storage medium and electronic equipment |
| CN110033156A (en) * | 2018-12-14 | 2019-07-19 | 阿里巴巴集团控股有限公司 | A kind of determination method and device of business activity effect |
| CN109767260A (en) * | 2018-12-15 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Bill discount method, device, device and storage medium based on integrated payment |
| CN112131305A (en) * | 2020-06-19 | 2020-12-25 | 中信银行股份有限公司 | Account Processing System |
| CN112702178A (en) * | 2020-12-18 | 2021-04-23 | 中国联合网络通信集团有限公司 | Method, system and device for real-time charge accounting |
Non-Patent Citations (1)
| Title |
|---|
| 周支立等: "基于客户信息的电信企业客户流失问题分析", 《情报杂志》, no. 12, pages 97 - 99 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113765680A (en) * | 2021-07-28 | 2021-12-07 | 北京思特奇信息技术股份有限公司 | Method and system for overall calculation control preference |
| CN115811710A (en) * | 2021-09-13 | 2023-03-17 | 中国移动通信集团安徽有限公司 | Method, device, equipment and medium for determining telephone bill |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111008875B (en) | 2023-07-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105719182B (en) | An automatic reconciliation method and an automatic reconciliation system | |
| US8165945B2 (en) | Transaction velocity counting for fraud detection | |
| CN108415990B (en) | Data quality monitoring method and device, computer equipment and storage medium | |
| CN101226542B (en) | Method for caching report | |
| CN112381537A (en) | Hotspot account billing method | |
| CN111008875A (en) | Method and system for calculating group preference in real time based on individuals | |
| US8117358B2 (en) | Revenue management system and method utilizing database backup | |
| CN111178830A (en) | Cost accounting method and device, computer equipment and storage medium | |
| CN111340341A (en) | Processing method and device for shared fund | |
| CN114298785B (en) | Methods, devices, computer equipment, and storage media for managing quotas of promotional activities | |
| US11140094B2 (en) | Resource stabilization in a distributed network | |
| CN110390563A (en) | Quantization method, device, computer equipment and the storage medium of user's value | |
| CN111461793A (en) | Integral chain consensus method based on activity probability selection | |
| CN108564458B (en) | Consumption prediction method and system based on Monte Carlo simulation | |
| CN112035503B (en) | Transaction data updating method and device | |
| CN120540583A (en) | Cache cleaning method and device based on large model reasoning | |
| CN120707313A (en) | A method for separating accounting functions across transaction systems based on rule engines | |
| JP4625105B2 (en) | Fund transfer processing system, fund transfer processing method, and fund transfer processing program | |
| CN101299259A (en) | System and method for resolving data resource access hot point problem | |
| CN111352924A (en) | Method and device for solving data tilt problem | |
| CN119166372A (en) | A data processing method and device for hotspot accounts | |
| CN116975079A (en) | A redis-based high-concurrency payment processing method, media and equipment for hotspot accounts | |
| CN114387085A (en) | Method and device for processing pipeline data, computer equipment and storage medium | |
| CN117076157B (en) | Request management method, request management device, computer readable storage medium and computer equipment | |
| CN114511122B (en) | Dynamic adjustment method, system, device and storage medium for air ticket reservation |
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 |