TWI777106B - Method, device, network device and computer-readable storage medium for determining preferential amount - Google Patents

Method, device, network device and computer-readable storage medium for determining preferential amount Download PDF

Info

Publication number
TWI777106B
TWI777106B TW108142472A TW108142472A TWI777106B TW I777106 B TWI777106 B TW I777106B TW 108142472 A TW108142472 A TW 108142472A TW 108142472 A TW108142472 A TW 108142472A TW I777106 B TWI777106 B TW I777106B
Authority
TW
Taiwan
Prior art keywords
amount
discount
list
total
preferential
Prior art date
Application number
TW108142472A
Other languages
Chinese (zh)
Other versions
TW202026993A (en
Inventor
唐真
周之敏
趙延磊
李輝
湯茂安
Original Assignee
大陸商中國銀聯股份有限公司
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 大陸商中國銀聯股份有限公司 filed Critical 大陸商中國銀聯股份有限公司
Publication of TW202026993A publication Critical patent/TW202026993A/en
Application granted granted Critical
Publication of TWI777106B publication Critical patent/TWI777106B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising

Landscapes

  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Train Traffic Observation, Control, And Security (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本發明為一種優惠金額確定方法、裝置、網路設備及電腦可讀存儲介質,該方法包括:接收使用者的一個交易請求,然後獲取一個第一優惠金額,並確定使用者已享受過的優惠總金額與第一優惠金額之和大於優惠金額閾值,以及使用者已享受過的優惠總次數加1不大於優惠次數閾值。則確定一個第二優惠金額並將該第二優惠金額作為使用者請求到的優惠金額,其中,第二優惠金額與使用者已享受過的優惠總金額之和不大於優惠金額閾值。該方案中,各使用者能夠獲取到的優惠金額進行二次調整,使不同使用者能獲得的優惠金額差距變小,藉以優化使用者體驗。 The present invention provides a method, device, network device and computer-readable storage medium for determining a preferential amount. The method includes: receiving a transaction request from a user, then acquiring a first preferential amount, and determining the preferential treatment that the user has enjoyed. The sum of the total amount and the first discount amount is greater than the discount amount threshold, and the total number of discounts the user has enjoyed plus 1 is not greater than the discount number threshold. Then a second discount amount is determined and the second discount amount is used as the discount amount requested by the user, wherein the sum of the second discount amount and the total discount amount that the user has enjoyed is not greater than the discount amount threshold. In this solution, the amount of discount that each user can obtain is adjusted twice, so that the difference between the amount of discount that can be obtained by different users is narrowed, so as to optimize the user experience.

Description

一種優惠金額確定方法、裝置、網路設備及電腦可讀存儲介質 A method, device, network device and computer-readable storage medium for determining preferential amount

本發明屬於資料採擷技術領域,特別是關於一種優惠金額確定方法、裝置、網路設備及電腦可讀存儲介質。 The invention belongs to the technical field of data collection, and in particular relates to a method, device, network device and computer-readable storage medium for determining a preferential amount.

目前市場上,商家在進行優惠活動時,採用的一種優惠方式為隨機立減。即在使用者消費後,使用者會隨機獲得一個優惠金額,以抵消使用者所消費的金額的一部分。 At present, one of the preferential methods adopted by merchants when conducting preferential activities in the market is random instant discount. That is, after the user consumes, the user will randomly obtain a preferential amount to offset a part of the amount consumed by the user.

使用者獲得的優惠金額都是由系統根據隨機函數運算生成的。而一般在一次優惠活動中,商家設置的活動金額和優惠名額都是固定的。當一個使用者在一次優惠活動中多次消費,則該使用者會多次獲得一個隨機的優惠金額。由於每次獲得的優惠金額都是隨機生成的,因此,一個使用者能夠獲得的優惠金額無法預估,導致不同使用者能夠獲得的優惠金額失去平衡,從而使個別參與活動的使用者的體驗下降。 The discount amount obtained by the user is generated by the system according to the random function operation. In general, in a preferential activity, the amount of activity and the number of preferential places set by the merchant are fixed. When a user spends multiple times in one promotion, the user will get a random discount amount multiple times. Since the amount of discount obtained each time is randomly generated, the amount of discount that a user can obtain cannot be estimated, resulting in an imbalance of the amount of discount that different users can obtain, thereby degrading the experience of individual users participating in the activity. .

本發明為一種優惠金額確定方法、裝置、網路設備及電腦可讀存儲介質,用以平衡每個使用者在一次優惠活動中享受的優惠金額。 The present invention is a method, device, network device and computer-readable storage medium for determining a preferential amount, which are used to balance the preferential amount enjoyed by each user in a preferential activity.

第一方面,本發明提供一種優惠金額確定方法,包括:接收使用者的一個交易請求,該交易請求用於請求一個優惠金額。然後獲取一個第一優惠金額,並確定第一優惠總金額和第一優惠總次數,其中,第一 優惠總金額為使用者已經享受過的優惠總金額與第一優惠金額之和,第一優惠總次數為使用者已經享受過的優惠總次數加1。若第一優惠總次數不大於預設的優惠次數閾值,且第一優惠總金額大於預設的優惠金額閾值,則確定一個第二優惠金額並將該第二優惠金額作為使用者請求到的優惠金額,其中,第二優惠金額與使用者已經享受過的優惠總金額之和不大於優惠金額閾值。該方案中,對於一個使用者已經享受過的優惠金額及優惠次數進行記錄,當使用者再次參與活動時,如果使用者此次獲得的優惠金額與已經享受過的優惠金額的總和超過了商家預設的一個使用者在這次活動中能夠享受的優惠金額閾值,則重新選擇一個不會使使用者獲得的總優惠金額超過優惠金額閾值的值作為使用者請求到的優惠金額,這樣,每個使用者能夠獲取到的優惠總金額有了限制,不同使用者能夠獲得的優惠金額差距變小,從而優化了使用者體驗。 In a first aspect, the present invention provides a method for determining a preferential amount, comprising: receiving a transaction request from a user, where the transaction request is used to request a preferential amount. Then a first discount amount is obtained, and the total amount of the first discount and the total number of first discounts are determined, wherein the first The total discount amount is the sum of the total discount amount that the user has enjoyed and the first discount amount, and the total number of the first discount is the total number of discounts the user has enjoyed plus 1. If the total number of first discounts is not greater than the preset number of discounts threshold, and the total amount of the first discount is greater than the preset discount amount threshold, determine a second discount amount and use the second discount amount as the discount requested by the user Amount, where the sum of the second discount amount and the total discount amount that the user has enjoyed is not greater than the discount amount threshold. In this scheme, the amount of discounts and the number of discounts that a user has enjoyed are recorded. When the user participates in the activity again, if the sum of the amount of discounts obtained by the user this time and the amount of discounts he has already enjoyed exceeds the merchant's pre-defined amount Set the discount amount threshold that a user can enjoy in this activity, then re-select a value that will not make the total discount amount obtained by the user exceed the discount amount threshold as the discount amount requested by the user. The total amount of discounts that users can get is limited, and the difference between the amount of discounts that different users can get is reduced, thereby optimizing the user experience.

在一種可能的實現方式中,在上述確定第二優惠金額之後,還可以包括:確定第一優惠金額與第二優惠金額的第一差值,並將第一差值插入補償清單,作為一個補償金額,該補償清單用於存儲補償金額。 In a possible implementation manner, after the above-mentioned determination of the second preferential amount, the method may further include: determining a first difference between the first preferential amount and the second preferential amount, and inserting the first difference into the compensation list as a compensation Amount, this compensation list is used to store the compensation amount.

進一步地,上述獲取交易請求對應的第一優惠金額,可以包括:根據交易請求,從優惠金額清單中獲取第三優惠金額,以及從上述補償清單中獲取第一補償金額,然後將第三優惠金額與第一補償金額之和,作為第一優惠金額。 Further, obtaining the first preferential amount corresponding to the transaction request may include: obtaining the third preferential amount from the preferential amount list according to the transaction request, and obtaining the first compensation amount from the above compensation list, and then converting the third preferential amount to the transaction request. The sum of the first compensation amount is taken as the first preferential amount.

通過上述方案,當一個使用者的交易請求對應的第一優惠金額過大時,將一個較小額的第二優惠金額作為該使用者請求到的優惠金額,並將第一優惠金額和第二優惠金額的差值作為補償金額,將補償金額 作為其他使用者的交易請求對應的第一優惠金額的一部分,以提高其他使用者的交易請求對應的第一優惠金額的下限,進而使得其他使用者獲得的優惠金額值的下限提高,縮小了不同使用者能夠獲得的優惠金額差距,平衡每個使用者在一次優惠活動中享受的優惠金額,優化了使用者體驗。 Through the above solution, when the first discount amount corresponding to a user's transaction request is too large, a smaller second discount amount is used as the discount amount requested by the user, and the first discount amount and the second discount amount The difference in the amount is used as the compensation amount, and the compensation amount will be As part of the first preferential amount corresponding to the transaction requests of other users, the lower limit of the first preferential amount corresponding to the transaction requests of other users is increased, thereby increasing the lower limit of the preferential amount obtained by other users, reducing the difference The difference between the amount of discounts that users can get, balances the amount of discounts each user enjoys in one discount activity, and optimizes the user experience.

在一種可能的實現方式中,上述確定第二優惠金額,可以包括:確定優惠金額閾值與使用者已經享受過的優惠總金額的差值,為第二優惠金額;或者,隨機選擇不大於優惠金額閾值與使用者已經享受過的優惠總金額的差值的任一正數值,為第二優惠金額。在前一種方式中,參與活動的大多數使用者均能夠獲得的優惠金額都能夠達到優惠金額閾值,即可以提高使用者的活動體驗,也能夠使商家預算的活動金額更多的被發放到使用者。在後一種方式中,在確保參數活動的使用者能夠獲得的優惠金額值較大的同時,使每個使用者獲得的優惠金額更具有隨機性,而活動的隨機性更大可以提高使用者參與活動的積極性。 In a possible implementation manner, the above-mentioned determining the second discount amount may include: determining the difference between the discount amount threshold and the total discount amount that the user has enjoyed, as the second discount amount; or, randomly selecting not greater than the discount amount Any positive value of the difference between the threshold value and the total discount amount that the user has enjoyed is the second discount amount. In the former method, the discount amount that most users participating in the activity can obtain can reach the threshold amount of discount, which can improve the user's activity experience, and also enable more activity amount budgeted by the merchant to be distributed to the user. By. In the latter method, while ensuring that the user of the parameter activity can obtain a larger value of the discount amount, the discount amount obtained by each user is more random, and the greater randomness of the activity can improve user participation. positivity of the activity.

在一種可能的實現方式中,上述方法還可以包括:若上述第一優惠總次數不大於預設的優惠次數閾值,且上述第一優惠總金額不大於預設的優惠金額閾值,則確定第一優惠金額作為使用者請求到的優惠金額。該方案中,由於使用者在享受第一優惠金額對應的優惠後,所享受的優惠金額總值未超過優惠金額閾值,因此該第一優惠金額可以作為使用者請求到的優惠金額。 In a possible implementation manner, the above method may further include: if the total number of times of the first discount is not greater than the preset number of discounts threshold, and the total amount of the first discount is not greater than the preset threshold of the discount amount, determining the first The discount amount is regarded as the discount amount requested by the user. In this solution, after the user enjoys the discount corresponding to the first discount amount, the total value of the discount amount enjoyed by the user does not exceed the discount amount threshold, so the first discount amount can be used as the discount amount requested by the user.

在一種可能的實現方式中,上述方法還可以包括:若上述第一優惠總次數大於預設的優惠次數閾值,則確定使用者請求到的優惠金額為0。該方案中,由於每次優惠活動中,每個使用者能夠參與的次數是商家 預設好的,若使用者參與次數達到優惠次數閾值,則該使用者無法再獲得優惠金額。 In a possible implementation manner, the above method may further include: if the above-mentioned first total number of discounts is greater than a preset number of discounts threshold, determining that the amount of discount requested by the user is 0. In this scheme, since in each promotion, the number of times each user can participate is the number of merchants By default, if the number of user participations reaches the threshold of the number of discounts, the user can no longer obtain the discount amount.

在一種可能的實現方式中,上述確定第一優惠總金額和第一優惠總次數,包括:根據第一優惠金額,確定第一字串,該第一字串的第一字元子串為1,該第一字串的第二字元子串用於指示第一優惠金額。然後根據第一字串和第二字串,確定第三字串。其中,第二字串的第一字元子串用於指示使用者已經享受過的優惠總次數,第二字串的第二字元子串用於指示使用者已經享受過的優惠總金額,第三字串的第一字元子串用於指示第一優惠總次數,第三字串的第二字元子串用於指示第一優惠總金額。該方案中,將優惠次數和優惠金額兩個資訊統一到一個字串內,之後只需對該字串進行一次判斷,即可確定使用者參與活動的次數和享受的優惠金額,提高了使用者請求到優惠金額的速度。 In a possible implementation manner, the above-mentioned determining the total amount of the first discount and the total number of times of the first discount includes: determining a first character string according to the first discount amount, where the first character substring of the first character string is 1 , and the second character substring of the first character string is used to indicate the first discount amount. Then, according to the first character string and the second character string, a third character string is determined. Wherein, the first character substring of the second character string is used to indicate the total number of discounts that the user has enjoyed, and the second character substring of the second character string is used to indicate the total amount of discounts that the user has enjoyed, The first character substring of the third character string is used to indicate the total number of times of the first discount, and the second character substring of the third character string is used to indicate the total amount of the first discount. In this scheme, the two information of the number of discounts and the amount of discount are unified into one string, and then only one judgment on the string is needed to determine the number of times the user participates in the activity and the amount of discount enjoyed by the user, which improves the user experience. The rate at which the offer amount is requested.

第二方面,本發明提供一種優惠金額確定裝置,該裝置包括接收單元、獲取單元、第一確定單元以及第二確定單元。其中,接收單元用於接收使用者的一個交易請求,該交易請求用於請求一個優惠金額。獲取單元用於獲取該交易請求對應的第一優惠金額。第一確定單元,用於確定第一優惠總金額和第一優惠總次數,其中,第一優惠總金額為使用者已經享受過的優惠總金額與第一優惠金額之和,第一優惠總次數為使用者已經享受過的優惠總次數加1。第二確定單元,用於在第一優惠總次數不大於預設的優惠次數閾值,且第一優惠總金額大於預設的優惠金額閾值時,確定第二優惠金額並將第二優惠金額作為使用者請求到的優惠金額,第二優惠金額與使用者已經享受過的優惠總金額之和不大於優惠金額閾值。該方 案中,對於一個使用者已經享受過的優惠金額及優惠次數進行記錄,當使用者再次參與活動時,如果使用者此次獲得的優惠金額與已經享受過的優惠金額的總和超過了商家預設的一個使用者在這次活動中能夠享受的優惠金額閾值,則重新選擇一個不會使使用者獲得的總優惠金額超過優惠金額閾值的值作為使用者請求到的優惠金額,這樣,每個使用者能夠獲取到的優惠總金額有了限制,不同使用者能夠獲得的優惠金額差距變小,從而優化了使用者體驗。 In a second aspect, the present invention provides a preferential amount determination device, which includes a receiving unit, an acquiring unit, a first determining unit, and a second determining unit. Wherein, the receiving unit is used for receiving a transaction request from the user, and the transaction request is used for requesting a preferential amount. The obtaining unit is configured to obtain the first preferential amount corresponding to the transaction request. The first determining unit is configured to determine the total amount of the first discount and the total number of times of the first discount, where the total amount of the first discount is the sum of the total amount of the discount that the user has already enjoyed and the amount of the first discount, and the total number of the first discount Add 1 to the total number of offers the user has already taken. The second determining unit is configured to determine the second discount amount and use the second discount amount as the amount of the second discount when the total number of discounts is not greater than the preset number of discounts threshold, and the total amount of the first discount is greater than the preset discount amount threshold The discount amount requested by the user, the sum of the second discount amount and the total discount amount that the user has enjoyed is not greater than the discount amount threshold. the party In this case, the amount of discounts and the number of discounts that a user has already enjoyed are recorded. When the user participates in the activity again, if the sum of the amount of discounts that the user has obtained this time and the amount of discounts he has already enjoyed exceeds the preset amount of the merchant The discount amount threshold that a user can enjoy in this activity, then re-select a value that will not make the total discount amount obtained by the user exceed the discount amount threshold as the discount amount requested by the user. In this way, each user The total amount of discounts that can be obtained is limited, and the difference between the amount of discounts that different users can obtain is reduced, thereby optimizing the user experience.

在一種可能的實現方式中,上述裝置還可以包括補償金額生成單元,用於在確定第二優惠金額之後,確定第一優惠金額與第二優惠金額的第一差值,並將第一差值插入補償清單,作為一個補償金額,補償清單用於存儲補償金額。 In a possible implementation manner, the above-mentioned apparatus may further include a compensation amount generating unit, configured to determine a first difference between the first preferential amount and the second preferential amount after determining the second preferential amount, and calculate the first difference Insert the compensation list as a compensation amount, and the compensation list is used to store the compensation amount.

進一步地,上述獲取單元,具體用於:根據交易請求,從優惠金額清單中獲取第三優惠金額,以及從補償清單中獲取第一補償金額,並將第三優惠金額與第一補償金額之和,作為第一優惠金額。 Further, the above obtaining unit is specifically configured to: according to the transaction request, obtain the third preferential amount from the preferential amount list, and obtain the first compensation amount from the compensation list, and calculate the sum of the third preferential amount and the first compensation amount. , as the first discount amount.

通過上述方案,當一個使用者的交易請求對應的第一優惠金額過大時,將一個較小額的第二優惠金額作為該使用者請求到的優惠金額,並將第一優惠金額和第二優惠金額的差值作為補償金額,將補償金額作為其他使用者的交易請求對應的第一優惠金額的一部分,以提高其他使用者的交易請求對應的第一優惠金額的下限,進而使得其他使用者獲得的優惠金額值的下限提高,縮小了不同使用者能夠獲得的優惠金額差距,平衡每個使用者在一次優惠活動中享受的優惠金額,優化了使用者體驗。 Through the above solution, when the first discount amount corresponding to a user's transaction request is too large, a smaller second discount amount is used as the discount amount requested by the user, and the first discount amount and the second discount amount The difference of the amount is used as the compensation amount, and the compensation amount is taken as part of the first preferential amount corresponding to the transaction requests of other users, so as to increase the lower limit of the first preferential amount corresponding to the transaction requests of other users, so that other users can obtain The lower limit of the discount amount value of , narrows the gap between the discount amount that different users can get, balances the discount amount each user enjoys in one discount activity, and optimizes the user experience.

在一種可能的實現方式中,上述第二確定單元,具體可以用 於:確定優惠金額閾值與使用者已經享受過的優惠總金額的差值,為第二優惠金額;或者,隨機選擇不大於優惠金額閾值與使用者已經享受過的優惠總金額的差值的任一正數值,為第二優惠金額。在前一種方式中,參與活動的大多數使用者均能夠獲得的優惠金額都能夠達到優惠金額閾值,即可以提高使用者的活動體驗,也能夠使商家預算的活動金額更多的被發放到使用者。在後一種方式中,在確保參數活動的使用者能夠獲得的優惠金額值較大的同時,使每個使用者獲得的優惠金額更具有隨機性,而活動的隨機性更大可以提高使用者參與活動的積極性。 In a possible implementation manner, the above-mentioned second determining unit may be specifically To: determine the difference between the discount amount threshold and the total discount amount that the user has enjoyed, as the second discount amount; or, randomly select any value that is not greater than the difference between the discount amount threshold and the total discount amount the user has enjoyed. A positive value is the second discount amount. In the former method, the discount amount that most users participating in the activity can obtain can reach the threshold amount of discount, which can improve the user's activity experience, and also enable more activity amount budgeted by the merchant to be distributed to the user. By. In the latter method, while ensuring that the user of the parameter activity can obtain a larger value of the discount amount, the discount amount obtained by each user is more random, and the greater randomness of the activity can improve user participation. positivity of the activity.

在一種可能的實現方式中,上述第二確定單元還可以用於:在上述第一優惠總次數不大於預設的優惠次數閾值,且上述第一優惠總金額不大於預設的優惠金額閾值時,確定第一優惠金額作為使用者請求到的優惠金額。該方案中,由於使用者在享受第一優惠金額對應的優惠後,所享受的優惠金額總值未超過優惠金額閾值,因此該第一優惠金額可以作為使用者請求到的優惠金額。 In a possible implementation manner, the second determining unit may be further configured to: when the total number of times of the first discount is not greater than the preset number of discounts threshold, and the total amount of the first discount is not greater than the preset threshold of the discount amount , and determine the first discount amount as the discount amount requested by the user. In this solution, after the user enjoys the discount corresponding to the first discount amount, the total value of the discount amount enjoyed by the user does not exceed the discount amount threshold, so the first discount amount can be used as the discount amount requested by the user.

在一種可能的實現方式中,上述第二確定單元還可以用於:在上述第一優惠總次數大於預設的優惠次數閾值時,確定使用者請求到的優惠金額為0。該方案中,由於每次優惠活動中,每個使用者能夠參與的次數是商家預設好的,若使用者參與次數達到優惠次數閾值,則該使用者無法再獲得優惠金額。 In a possible implementation manner, the above-mentioned second determining unit may be further configured to: determine that the preferential amount requested by the user is 0 when the above-mentioned first total number of preferential times is greater than a preset threshold of preferential times. In this solution, since the number of times that each user can participate in each preferential activity is preset by the merchant, if the user's participation times reaches the threshold of preferential times, the user can no longer obtain the preferential amount.

在一種可能的實現方式中,上述第一確定單元,具體用於:根據第一優惠金額,確定第一字串,該第一字串的第一字元子串為1,該第一字串的第二字元子串用於指示第一優惠金額。然後根據第一字串和第二 字串,確定第三字串。其中,第二字串的第一字元子串用於指示使用者已經享受過的優惠總次數,第二字串的第二字元子串用於指示使用者已經享受過的優惠總金額,第三字串的第一字元子串用於指示第一優惠總次數,第三字串的第二字元子串用於指示第一優惠總金額。該方案中,將優惠次數和優惠金額兩個資訊統一到一個字串內,之後只需對該字串進行一次判斷,即可確定使用者參與活動的次數和享受的優惠金額,提高了使用者請求到優惠金額的速度。 In a possible implementation manner, the above-mentioned first determining unit is specifically configured to: determine a first character string according to the first preferential amount, the first character substring of the first character string is 1, and the first character string The second character substring of is used to indicate the first discount amount. Then according to the first string and the second String, determine the third string. Wherein, the first character substring of the second character string is used to indicate the total number of discounts that the user has enjoyed, and the second character substring of the second character string is used to indicate the total amount of discounts that the user has enjoyed, The first character substring of the third character string is used to indicate the total number of times of the first discount, and the second character substring of the third character string is used to indicate the total amount of the first discount. In this scheme, the two information of the number of discounts and the amount of discount are unified into one string, and then only one judgment on the string is needed to determine the number of times the user participates in the activity and the amount of discount enjoyed by the user, which improves the user experience. The rate at which the offer amount is requested.

第三方面,本發明提供一種網路設備,包括:記憶體,用於存儲程式指令;處理器,用於調用該記憶體中存儲的程式指令,按照獲得的程式執行前述第一方面或第一方面中任一實施例所述的方法。 In a third aspect, the present invention provides a network device, comprising: a memory for storing program instructions; a processor for calling the program instructions stored in the memory, and executing the aforementioned first aspect or the first aspect according to the obtained program The method of any embodiment of the aspect.

第四方面,本發明提供一種電腦可讀存儲介質,該電腦可讀存儲介質存儲有電腦可執行指令,該電腦可執行指令用於使電腦執行前述第一方面或第一方面中任一實施例所述的方法。 In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the first aspect or any embodiment of the first aspect the method described.

501‧‧‧接收單元 501‧‧‧Receiver Unit

502‧‧‧獲取單元 502‧‧‧Acquisition Unit

503‧‧‧第一確定單元 503‧‧‧First Confirmation Unit

504‧‧‧第二確定單元 504‧‧‧Second determination unit

505‧‧‧補償金額生成單元 505‧‧‧Compensation Amount Generation Unit

506‧‧‧優惠金額清單生成單元 506‧‧‧Promotion amount list generation unit

507‧‧‧查詢單元 507‧‧‧Inquiry Unit

600‧‧‧網路設備 600‧‧‧Network Equipment

601‧‧‧記憶體 601‧‧‧Memory

602‧‧‧處理器 602‧‧‧Processor

110-140‧‧‧步驟 110-140‧‧‧Steps

121-123‧‧‧步驟 121-123‧‧‧Steps

131-132‧‧‧步驟 131-132‧‧‧Steps

141-142‧‧‧步驟 141-142‧‧‧Steps

圖1為本發明提供的一種優惠金額確定方法流程示意圖; 1 is a schematic flowchart of a method for determining a preferential amount provided by the present invention;

圖2為本發明提供的一種第一優惠金額獲取方法示意圖; 2 is a schematic diagram of a method for obtaining a first preferential amount provided by the present invention;

圖3為本發明提供的一種補償清單確定方法示意圖; 3 is a schematic diagram of a method for determining a compensation list provided by the present invention;

圖4為本發明提供的一種第一優惠總金額及第一優惠總次數確定方法示意圖; 4 is a schematic diagram of a method for determining the total amount of the first discount and the total number of times of the first discount provided by the present invention;

圖5為本發明提供的一種優惠金額確定裝置示意圖; 5 is a schematic diagram of a device for determining a preferential amount provided by the present invention;

圖6為本發明提供的一種網路設備的結構示意圖。 FIG. 6 is a schematic structural diagram of a network device provided by the present invention.

為利 貴審查委員了解本發明之技術特徵、內容與優點及其所能達到之功效,茲將本發明配合附圖及附件,並以實施例之表達形式詳細說明如下,而其中所使用之圖式,其主旨僅為示意及輔助說明書之用,未必為本發明實施後之真實比例與精準配置,故不應就所附之圖式的比例與配置關係解讀、侷限本發明於實際實施上的權利範圍,合先敘明。 In order to facilitate the examiners to understand the technical features, content and advantages of the present invention and the effects that can be achieved, the present invention is hereby described in detail as follows in the form of embodiments with the accompanying drawings and accessories, and the drawings used therein , the purpose of which is only for illustration and auxiliary description, and may not necessarily be the real scale and precise configuration after the implementation of the present invention. Therefore, the ratio and configuration relationship of the attached drawings should not be interpreted or limited to the actual implementation of the present invention. Scope, to be described first.

圖1為本發明提供的一種優惠金額確定方法,如圖1所示,該方法可以應用在商家進行優惠活動時的一個交易系統中,該方法包括以下步驟: Fig. 1 is a kind of preferential amount determination method provided by the present invention, as shown in Fig. 1, this method can be applied in a transaction system when merchants carry out preferential activities, this method comprises the following steps:

步驟110,接收使用者的一個交易請求; Step 110, receiving a transaction request from the user;

該交易請求用於請求一個優惠金額; The transaction request is used to request a discount amount;

步驟120,確定交易請求對應的第一優惠金額; Step 120, determining the first preferential amount corresponding to the transaction request;

步驟130,確定第一優惠總金額和第一優惠總次數。 Step 130: Determine the total amount of the first discount and the total number of times of the first discount.

其中,第一優惠總金額為使用者已經享受過的優惠總金額與第一優惠金額之和,第一優惠總次數為使用者已經享受過的優惠總次數加1。 The first total discount amount is the sum of the total discount amount the user has enjoyed and the first discount amount, and the first total number of discounts is the total number of discounts the user has enjoyed plus 1.

步驟140,若第一優惠總次數不大於預設的優惠次數閾值,且第一優惠總金額大於預設的優惠金額閾值,則確定第二優惠金額並將第二優惠金額作為使用者請求到的優惠金額。 Step 140: If the total number of first discounts is not greater than the preset number of discounts threshold, and the total amount of the first discount is greater than the preset discount amount threshold, then determine the second discount amount and take the second discount amount as the user requested. Discounted price.

其中,優惠次數閾值表示在一次優惠活動中使用者可以享受的優惠次數最大值,優惠金額閾值表示在一次優惠活動中使用者可以享受 的優惠總金額最大值,第二優惠金額與使用者已經享受過的優惠總金額之和不大於優惠金額閾值。 Among them, the threshold for the number of discounts represents the maximum number of discounts that the user can enjoy in one discount activity, and the threshold for the amount of discount represents the maximum number of discounts that the user can enjoy in one discount activity. The maximum value of the total discount amount, the sum of the second discount amount and the total discount amount that the user has already enjoyed is not greater than the discount amount threshold.

上述方案中,對於一個使用者已經享受過的優惠金額及優惠次數進行記錄,當使用者再次參與活動時,如果使用者此次獲得的優惠金額與已經享受過的優惠金額的總和超過了商家預設的一個使用者在這次活動中能夠享受的優惠金額閾值,則重新選擇一個不會使使用者獲得的總優惠金額超過優惠金額閾值的值作為使用者請求到的優惠金額,這樣,每個使用者能夠獲取到的優惠總金額有了限制,不同使用者能夠獲得的優惠金額差距變小,從而優化了使用者體驗。 In the above scheme, the discount amount and the number of times a user has enjoyed are recorded. When the user participates in the activity again, if the sum of the discount amount obtained by the user this time and the discount amount already enjoyed by the user exceeds the merchant's pre-defined amount Set the discount amount threshold that a user can enjoy in this activity, then re-select a value that will not make the total discount amount obtained by the user exceed the discount amount threshold as the discount amount requested by the user. The total amount of discounts that users can get is limited, and the difference between the amount of discounts that different users can get is reduced, thereby optimizing the user experience.

針對上述步驟120,在一種可能的實現方式中,上述第一優惠金額可以通過圖2所示的第一優惠金額獲取方法來獲取,如圖2所示,該方法包括以下步驟: For the above step 120, in a possible implementation manner, the above-mentioned first preferential amount can be obtained through the method for obtaining the first preferential amount shown in FIG. 2 . As shown in FIG. 2 , the method includes the following steps:

步驟121,根據交易請求,從優惠金額清單中獲取第三優惠金額; Step 121, obtaining a third discount amount from the discount amount list according to the transaction request;

步驟122,從補償清單中獲取第一補償金額; Step 122, obtaining the first compensation amount from the compensation list;

步驟123,將第三優惠金額與第一補償金額的和作為第一優惠金額。 Step 123, taking the sum of the third discount amount and the first compensation amount as the first discount amount.

下面對上述步驟121中的優惠金額清單進行說明,一個優惠金額清單對應一次優惠活動中的一個交易系統。優惠金額清單中存有X個優惠金額,交易系統對接收到的每一個交易請求,都會從優惠金額清單中獲取一個優惠金額作為第三優惠金額,其中,X的值與該交易系統在本次優惠活動中能夠產生的優惠名額相同。交易系統從優惠金額清單中獲取一個優惠金額後,優惠金額清單中存有的優惠金額個數就會減一。優惠金額清單中的每一個優惠金額的數值,是在此次優惠活動開始時初始化產生的。具 體地,優惠金額清單可以通過以下步驟生成。 The list of preferential amounts in the above step 121 will be described below. One list of preferential amounts corresponds to one transaction system in one preferential activity. There are X discount amounts in the discount amount list. For each transaction request received by the trading system, a discount amount will be obtained from the discount amount list as the third discount amount. The number of discounts that can be generated in the promotion activities is the same. After the trading system obtains a discount amount from the discount amount list, the number of discount amounts stored in the discount amount list will be reduced by one. The value of each discount amount in the discount amount list is initialized when the discount activity starts. Tool Specifically, the list of discount amounts can be generated by the following steps.

步驟A,確定本次優惠活動商家預設的活動金額N、優惠名額M以及本次優惠活動使用到的交易系統個數R,一個交易系統對應一個優惠金額清單。 Step A: Determine the activity amount N, the preferential quota M, and the number R of transaction systems used in this preferential activity, and each transaction system corresponds to a list of preferential amounts.

步驟B,確定至少一個區間範圍,例如確定10個區間範圍,分別為(0,100]、(100,200]、(200,300]、(300,400]、(400,500]、(500,600]、(600,700]、(700,800]、(800,900]、(900,1000],後續將以這10個區域範圍進行說明。 Step B: Determine at least one interval range, for example, determine 10 interval ranges, which are (0,100], (100,200], (200,300], (300,400], (400,500], (500,600], (600,700], (700,800]) (800, 900], (900, 1000], and these 10 area ranges will be described later.

步驟C,利用隨機函數,例如Java中的Random.nextInt()函數,生成一個在上述步驟B中確定的區間中最小的區間的數值a,即數字a取值範圍為(0,100],然後利用數字a為上述10個區間分別生成2個亂數: Step C, use a random function, such as the Random.nextInt() function in Java, to generate a numerical value a of the smallest interval in the interval determined in the above step B, that is, the value range of the number a is (0, 100], and then use the numerical value a. a generates 2 random numbers for the above 10 intervals:

(0,100]內的兩個亂數大小為a,100-a; The size of the two random numbers in (0,100] is a,100-a;

(100,200]內的兩個亂數大小為a+100,200-a; The size of the two random numbers in (100,200] is a+100,200-a;

(200,300]內的兩個亂數大小為a+200,300-a; The size of the two random numbers in (200,300] is a+200,300-a;

(300,400]內的兩個亂數大小為a+300,400-a; The size of the two random numbers in (300,400] is a+300,400-a;

(400,500]內的兩個亂數大小為a+400,500-a; The size of the two random numbers in (400,500] is a+400,500-a;

(500,600]內的兩個亂數大小為a+500,600-a; The size of the two random numbers in (500,600] is a+500,600-a;

(600,700]內的兩個亂數大小為a+600,700-a; The size of the two random numbers in (600,700] is a+600,700-a;

(700,800]內的兩個亂數大小為a+700,800-a; The size of the two random numbers in (700,800] is a+700,800-a;

(800,900]內的兩個亂數大小為a+800,900-a; The size of the two random numbers in (800,900] is a+800,900-a;

(900,1000]內的兩個亂數大小為a+900,1000-a。 The size of the two random numbers in (900,1000] is a+900,1000-a.

上述20個亂數即為最終優惠金額清單中包括的20個優惠金 額(單位為分),然後將上述20個亂數添加到List1中,List1中的亂數個數為List1總名額,List1中的亂數總和為List1總金額。 The above 20 random numbers are the 20 discounts included in the final discount amount list Amount (unit is cent), then add the above 20 random numbers to List1, the random number in List1 is the total quota of List1, and the sum of the random numbers in List1 is the total amount of List1.

步驟D,重複上述步驟C,直到上述List1中的亂數個數大於第一閾值或者上述List1中的亂數總和大於第二閾值。其中,第一閾值是根據優惠名額M確定的,例如可以為

Figure 108142472-A0101-12-0011-1
,第二閾值是根據活動金額N確定的, 例如可以設為
Figure 108142472-A0101-12-0011-2
。 Step D: Repeat the above step C until the number of random numbers in the above List1 is greater than the first threshold or the sum of the random numbers in the above List1 is greater than the second threshold. Wherein, the first threshold is determined according to the preferential quota M, for example, it can be
Figure 108142472-A0101-12-0011-1
, the second threshold is determined according to the activity amount N, for example, it can be set as
Figure 108142472-A0101-12-0011-2
.

步驟E,將一定數量的數值1添加到List2中,List2中的數值1的數量不大於第三閾值,且總和不大於第四閾值。其中,第三閾值是根據優惠名額M確定的,例如可以為

Figure 108142472-A0101-12-0011-3
,第二閾值是根據活動金額N確定的, 例如可以設為
Figure 108142472-A0101-12-0011-4
,List2中的數值1的個數為List2總名額,List2中的數值1的總和為List2總金額。當然,List2中的數值並不限於1,本發明僅以1為例來進行說明。 Step E, adding a certain number of numerical values 1 to List2, the number of numerical values 1 in List2 is not greater than the third threshold, and the sum is not greater than the fourth threshold. Wherein, the third threshold is determined according to the preferential quota M, for example, it can be
Figure 108142472-A0101-12-0011-3
, the second threshold is determined according to the activity amount N, for example, it can be set as
Figure 108142472-A0101-12-0011-4
, the number of value 1 in List2 is the total number of places in List2, and the sum of the value 1 in List2 is the total amount of List2. Of course, the numerical value in List2 is not limited to 1, and the present invention only takes 1 as an example for description.

步驟F,隨機生成一個大小範圍在(0,(N-List1總金額-List2總金額)*2/(M-List1總名額-List2總名額)]的數位b,並根據數值b生成兩個亂數,分別為:b、(N-List1總金額-List2總金額)*2/(M-List1總名額-List2總名額)-b。然後將這兩個亂數添加到List3。 Step F, randomly generate a digit b whose size is in the range of (0, (N-List1 total amount-List2 total amount)*2/(M-List1 total quota-List2 total quota)], and generate two random numbers according to the value b. The numbers are: b, (N-List1 total amount-List2 total amount)*2/(M-List1 total quota-List2 total quota)-b. Then add these two random numbers to List3.

步驟G,重複上述步驟F,直到List3中的亂數總和=N-List1總金額-List2總金額。此時,List3中的亂數個數=M-List1總名額-List2總名額。List3的作用為對List1和List2的補齊,以使List1至List3中的數值個數等於M且數值總和等於N。List3中的亂數個數為List3總名額,List3中的亂數總和為List3總金額。 Step G, repeat the above step F until the sum of random numbers in List3=N-Total amount of List1-Total amount of List2. At this time, the number of random numbers in List3=M-total quota of List1-total quota of List2. The function of List3 is to complement List1 and List2, so that the number of values in List1 to List3 is equal to M and the sum of the values is equal to N. The number of random numbers in List3 is the total number of places in List3, and the total number of random numbers in List3 is the total amount of List3.

步驟H,按預設規則將List1至List3中的數值分配到每個交易 系統對應的優惠金額清單中。舉個例子,比如令R1=(List1總名額/R)、R2=(List2總名額/R)以及R3=(List3總名額/R),然後從List1中取R1個亂數,從List3中取R3個亂數,將這些亂數隨機添加至一個交易系統對應的優惠金額清單中,然後從List2中取R2個數值1,放入該交易系統對應的優惠金額清單的末尾。對每一個交易系統對應的優惠金額清單都執行該操作,這樣每一個交易系統對應的優惠金額清單中都存有優惠金額。 Step H, assign the values in List1 to List3 to each transaction according to the preset rules The corresponding discount amount list in the system. For example, let R1=(Total quota of List1/R), R2=(Total quota of List2/R), and R3=(Total quota of List3/R), then take R1 random numbers from List1, and from List3 R3 random numbers, randomly add these random numbers to the discount amount list corresponding to a trading system, and then take the R2 value 1 from List2 and put it at the end of the discount amount list corresponding to the trading system. This operation is performed on the list of preferential amounts corresponding to each transaction system, so that the list of preferential amounts corresponding to each transaction system contains preferential amounts.

通過上述步驟A至步驟H,即可生成上述步驟121中所述的優惠金額清單,其中,優惠清單末尾的List2中的數值用於在優惠活動後期,使補償清單中的補償金額更多的被分配給參與優惠活動的使用者。當然,上述方案僅為本發明提供的一種優惠金額清單生成的方式,在實際運用中,也可根據直接根據商家預設的活動金額和優惠名額通過隨機函數生成該優惠名額清單。下面將對上述步驟122中的補償清單進行說明。 Through the above steps A to H, the list of preferential amounts described in the above step 121 can be generated, wherein the value in List 2 at the end of the preferential list is used to make the compensation amount in the compensation list more effective in the later stage of the preferential activity. Assigned to users participating in promotions. Of course, the above solution is only a method for generating the preferential amount list provided by the present invention. In practical application, the preferential quota list can also be generated by a random function according to the activity amount and preferential quota directly preset by the merchant. The compensation list in the above step 122 will be described below.

首先,在優惠活動剛開始時,補償清單為空,即補償清單中沒有存入補償金額。直到一個使用者執行過上述步驟140。在一種可能的實現方式中,在上述步驟140之後還可以包括如圖3所示的補償清單確定方法,包括以下步驟: First, at the beginning of the promotion, the compensation list is empty, that is, the compensation amount is not stored in the compensation list. Until a user has performed the above step 140. In a possible implementation manner, after the above step 140, a compensation list determination method as shown in FIG. 3 may also be included, including the following steps:

步驟141,確定第一優惠金額與第二優惠金額的第一差值: Step 141, determining the first difference between the first discount amount and the second discount amount:

步驟142,將第一差值插入補償清單,作為一個補償金額。 Step 142, inserting the first difference into the compensation list as a compensation amount.

具體地,由於在上述步驟140中,使用者已經享受過的優惠總金額與第一優惠金額之和大於預設的優惠金額閾值,則會確定一個較小的值,即第二優惠金額作為使用者請求到的優惠金額。 Specifically, since in the above step 140, the sum of the total discount amount that the user has already enjoyed and the first discount amount is greater than the preset discount amount threshold, a smaller value is determined, that is, the second discount amount is used as the The discount amount requested by the user.

舉例來說,比如在一次優惠活動中,商家設置的優惠次數閾 值為3次,優惠金額閾值為10元,即表示在這次優惠活動中,一個使用者能享受優惠的次數最多為3次,能享受的優惠總金額為10元。現有一個使用者A,已經參與該優惠活動2次,並且前2次獲得的優惠金額之和為7元。當該使用者第3次參與優惠活動時,交易系統獲取到的第一優惠金額為5元,則由於5+7=12>10,因此會再確定一個第二優惠金額作為使用者請求到的優惠金額。 For example, in a promotion event, the threshold for the number of promotions set by the merchant The value is 3 times, and the discount amount threshold is 10 yuan, which means that in this promotion, a user can enjoy the discount up to 3 times, and the total amount of the discount that can be enjoyed is 10 yuan. There is a user A who has participated in this promotion twice, and the sum of the discount amount obtained in the first two times is 7 yuan. When the user participates in the preferential activity for the third time, the first preferential amount obtained by the trading system is 5 yuan. Since 5+7=12>10, a second preferential amount will be determined as the user's request. Discounted price.

對於第二優惠金額,在一種可能的實現方式中,可以通過以下方式確定:確定優惠金額閾值與使用者已經享受過的優惠總金額的差值,並將該差值作為第二優惠金額。即上述例子中的第二優惠請求金額為10-7=3元。在該方式中,參與活動的大多數使用者均能夠獲得的優惠金額都能夠達到優惠金額閾值,即可以提高使用者的活動體驗,也能夠使商家預算的活動金額更多的被發放到使用者。 For the second preferential amount, in a possible implementation manner, it may be determined by the following methods: determining the difference between the preferential amount threshold and the total preferential amount that the user has enjoyed, and using the difference as the second preferential amount. That is, the second discount request amount in the above example is 10-7=3 yuan. In this way, the discount amount that most users participating in the activity can get can reach the discount amount threshold, which can improve the user's activity experience, and enable more activity amount budgeted by the merchant to be distributed to the user. .

對於第二優惠金額,在又一種可能的實現方式中,可以通過以下方式確定:隨機選擇不大於優惠金額閾值與使用者已經享受過的優惠總金額的差值的任一正數值,並將該值作為第二優惠金額。即上述例子中,由於10-7=3,因此,選擇一個在(0,3]之間的任一值作為第二優惠金額,如第二優惠金額為2.5元。該方式,在確保參數活動的使用者能夠獲得的優惠金額值較大的同時,使每個使用者獲得的優惠金額更具有隨機性,而活動的隨機性更大可以提高使用者參與活動的積極性。 For the second discount amount, in yet another possible implementation, it can be determined by the following methods: randomly selecting any positive value that is not greater than the difference between the discount amount threshold and the total discount amount the user has enjoyed, and assigning the value as the second discount amount. That is, in the above example, since 10-7=3, any value between (0, 3) is selected as the second discount amount, for example, the second discount amount is 2.5 yuan. In this way, the parameter activity is ensured. While the value of the preferential amount that can be obtained by the users is larger, the preferential amount obtained by each user is more random, and the greater randomness of the activity can improve the enthusiasm of the user to participate in the activity.

由此可知,上述第二優惠金額為一個小於第一優惠金額的數值,因此,在步驟141中,可以確定第一優惠金額與第二優惠金額的第一差值,然後在步驟142中,將第一差值插入補償清單,作為一個補償金額,這 樣補償清單中就存入了補償金額。以上述第二優惠金額為3元為例,那麼確定第一優惠金額與第二優惠金額的差值為5-3=2元,因此將2元作為一個補償金額插入到補償清單中。 It can be seen that the above-mentioned second discount amount is a value smaller than the first discount amount. Therefore, in step 141, the first difference between the first discount amount and the second discount amount can be determined, and then in step 142, The first difference is inserted into the compensation list as a compensation amount, which The compensation amount is stored in the compensation list. Taking the second preferential amount as 3 yuan as an example, the difference between the first preferential amount and the second preferential amount is determined to be 5-3=2 yuan, so 2 yuan is inserted into the compensation list as a compensation amount.

在一種可能的實現方式中,若上述第三優惠金額與使用者已經獲取到的優惠總金額之和大於優惠金額閾值,則往補償清單中插入兩個補償金額,分別為步驟122中獲取的第一補償金額以及一個第三優惠金額與第二優惠金額的差值。比如,當使用者已經享受過的優惠總金額為7元,優惠金額閾值為10元在步驟121中,獲取的第三優惠金額為4元,在步驟122中,獲取的第一補償金額為1元,由於4+7=11大於10,因此會確定一個第二補償金額作為使用者請求到的優惠金額。若確定第二優惠金額為3元,則將第三優惠金額與第一優惠金額的差值作為一個補償金額插入補償清單,即插入一個1元進補償清單,同時將步驟122中獲取的第一補償金額重新插入補償清單,即再插入一個1元進補償清單。 In a possible implementation manner, if the sum of the third discount amount and the total discount amount obtained by the user is greater than the discount amount threshold, two compensation amounts are inserted into the compensation list, which are the third amount obtained in step 122 respectively. a compensation amount and a difference between the third discount amount and the second discount amount. For example, when the total discount amount that the user has enjoyed is 7 yuan, and the discount amount threshold is 10 yuan, in step 121, the obtained third discount amount is 4 yuan, and in step 122, the obtained first compensation amount is 1 Yuan, since 4+7=11 is greater than 10, a second compensation amount will be determined as the preferential amount requested by the user. If it is determined that the second discount amount is 3 yuan, the difference between the third discount amount and the first discount amount is inserted into the compensation list as a compensation amount, that is, a 1 yuan is inserted into the compensation list, and the first The compensation amount is re-inserted into the compensation list, that is, another 1 yuan is inserted into the compensation list.

至此,對於上述步驟121中的優惠金額清單和步驟122中的補償清單已作出說明,下面以一個例子對步驟123進行說明。 So far, the list of preferential amounts in step 121 and the list of compensation in step 122 have been described, and step 123 is described below with an example.

假設根據一個使用者的交易請求,交易系統從其對應的優惠金額清單中選取的第三優惠金額為3元,此時補償清單中也存在多個補償金額,假設獲取到的第一補償金額為2元,那麼在步驟123中,確定第一優惠金額的值為3元+2元=5元。 Suppose that according to a user's transaction request, the third discount amount selected by the trading system from the corresponding discount amount list is 3 yuan. At this time, there are also multiple compensation amounts in the compensation list. Suppose the obtained first compensation amount is 2 yuan, then in step 123, the value of the first discount amount is determined to be 3 yuan + 2 yuan = 5 yuan.

通過上述步驟121至步驟123,即確定了步驟120中使用者的交易請求對應的第一優惠金額。當然,步驟121至步驟123僅為實現步驟120的一種方式,實際運用中,還可以採用其他實現方式,比如獲取補償清單 中的所有補償金額作為使用者的第一優惠金額的一部分。 Through the above steps 121 to 123, the first discount amount corresponding to the user's transaction request in step 120 is determined. Of course, steps 121 to 123 are only one way to implement step 120, and in practical applications, other implementation methods can also be used, such as obtaining a compensation list All compensation amounts in the user's first discount amount.

之後在步驟130中,確定第一優惠總金額和第一優惠總次數。具體地,優惠活動的交易系統中記錄有使用者已經享受過的優惠次數以及已經享受過的優惠總金額。再將使用者已經享受過的優惠總金額加上第一優惠金額,即可確定第一優惠總金額,將使用者已經享受過的優惠次數加1,即可確定第一優惠總次數。 Then in step 130, the total amount of the first discount and the total number of times of the first discount are determined. Specifically, the transaction system of the preferential activity records the number of discounts that the user has enjoyed and the total amount of the discounts that the user has enjoyed. Then add the first discount amount to the total amount of discounts that the user has enjoyed to determine the total amount of the first discount, and add 1 to the number of discounts the user has enjoyed to determine the total number of first discounts.

在一種可能的實現方式中,上述步驟130具體可以包括如圖4所示的以下步驟。 In a possible implementation manner, the foregoing step 130 may specifically include the following steps as shown in FIG. 4 .

步驟131,根據第一優惠金額,確定第一字串。 Step 131: Determine the first character string according to the first discount amount.

該第一字串的第一字元子串為1,該第一字串的第二字元子串用於指示第一優惠金額。該字串根據商家設定的優惠金額閾值來改變字元長度,如商家設定優惠金額閾值為10元,則由於優惠金額清單中和補償清單中不存在大於10元的值,因此第一優惠金額的值不會超過20元,用於表示第一優惠金額的第二字元子串長度為4位(20元等於2000分,即能取到的最大值為4位)。舉例來說,若第一優惠金額為5元,則第一字串可以表示為10500,從第二位開始的0500即用於指示第一優惠金額為500分(5元)。 The first character substring of the first character string is 1, and the second character substring of the first character string is used to indicate the first discount amount. The length of the character string is changed according to the discount amount threshold set by the merchant. For example, if the merchant sets the discount amount threshold to be 10 yuan, since there is no value greater than 10 yuan in the discount amount list and the compensation list, the first discount amount The value will not exceed 20 yuan, and the length of the second character substring used to represent the first discount amount is 4 digits (20 yuan is equal to 2000 points, that is, the maximum value that can be obtained is 4 digits). For example, if the first discount amount is 5 yuan, the first character string can be represented as 10500, and 0500 starting from the second digit is used to indicate that the first discount amount is 500 points (5 yuan).

步驟132,根據第一字串和第二字串,確定第三字串。 Step 132: Determine a third character string according to the first character string and the second character string.

其中,第二字串的第一字元子串用於指示使用者已經享受過的優惠總次數,第二字串的第二字元子串用於指示使用者已經享受過的優惠總金額,第三字串的第一字元子串用於指示第一優惠總次數,第三字串的第二字元子串用於指示第一優惠總金額。 Wherein, the first character substring of the second character string is used to indicate the total number of discounts that the user has enjoyed, and the second character substring of the second character string is used to indicate the total amount of discounts that the user has enjoyed, The first character substring of the third character string is used to indicate the total number of times of the first discount, and the second character substring of the third character string is used to indicate the total amount of the first discount.

舉例來說,假設一個使用者已經享受過的優惠次數為2次, 已經享受過的優惠總金額為7元,則第二字串為20700,其中,第一位數值「2」為第二字串的第一字元子串,用於指示使用者已經享受過的優惠次數為2次,後4位數值「0700」為第二字串的第二字元子串,用於指示使用者已經享受過的優惠總金額為700分(7元)。如此時第一字串為10500,則確定第三字串為31200,其中第一位數值「3」為第三字串的第一字元子串,用於指示第一優惠總次數為3次,後4位「1200」為第三字串的第二字元子串,用於指示第一優惠總金額為1200分(12元)。 For example, suppose a user has already enjoyed the discount twice, The total amount of discounts that have been enjoyed is 7 yuan, and the second string is 20700, where the first value "2" is the first character substring of the second string, which is used to indicate that the user has enjoyed the discount. The number of discounts is 2 times, and the last 4-digit value "0700" is the second character substring of the second string, which is used to indicate that the total amount of discounts the user has enjoyed is 700 points (7 yuan). In this case, the first character string is 10500, the third character string is determined to be 31200, and the first value "3" is the first character substring of the third character string, which is used to indicate that the total number of times of the first promotion is 3 times. , and the last four digits of "1200" are the second character substring of the third character string, which is used to indicate that the total amount of the first discount is 1200 points (12 yuan).

之後對該字串進行一次判斷即可確定使用者參與活動的次數和享受的優惠金額,提高了使用者請求到優惠金額的速度。當然,上述通過一個字串來確定使用者享受的優惠金額及優惠次數的方式僅為本發明提供的一種可能的實現方式,在實際運用中,也可以將使用者享受的優惠金額和優惠次數分開存儲再進行判斷。 Afterwards, the number of times the user participates in the activity and the amount of discount enjoyed by the user can be determined by making a judgment on the string, which improves the speed at which the user requests the amount of discount. Of course, the above-mentioned method of determining the amount of discount and the number of discounts enjoyed by the user through a string is only a possible implementation method provided by the present invention. In practical application, the amount of discount enjoyed by the user and the number of discounts can also be separated. Store and then judge.

根據對字串的判斷結果,若判斷結果為第一優惠總次數不大於預設的優惠次數閾值,且第一優惠總金額大於預設的優惠金額閾值時,則執行上述步驟140。否則,根據其他判斷結果,相應的還可以執行以下步驟。 According to the judging result of the character string, if the judging result is that the total number of discounts is not greater than the preset number of discounts and the total amount of the first discount is greater than the preset threshold of discounts, the above step 140 is executed. Otherwise, according to other judgment results, the following steps may also be performed accordingly.

若判斷結果為第一優惠總次數不大於預設的優惠次數閾值,且第一優惠總金額不大於預設的優惠金額閾值,則確定第一優惠金額作為使用者請求到的優惠金額。該方案中,由於使用者在享受第一優惠金額對應的優惠後,所享受的優惠金額總值未超過優惠金額閾值,因此該第一優惠金額可以作為使用者請求到的優惠金額。 If the judgment result is that the total number of first discounts is not greater than the preset number of discounts threshold, and the total amount of the first discount is not greater than the preset discount amount threshold, the first discount amount is determined as the discount amount requested by the user. In this solution, after the user enjoys the discount corresponding to the first discount amount, the total value of the discount amount enjoyed by the user does not exceed the discount amount threshold, so the first discount amount can be used as the discount amount requested by the user.

若判斷結果為上述第一優惠總次數大於預設的優惠次數閾 值,則確定使用者請求到的優惠金額為0。並且在之後,還可以進一步執行一次回退操作,包括:將該使用者本次交易請求獲取到的用於確定第一優惠金額的第三優惠金額重新插入至優惠金額清單,以及用於確定第一優惠金額的第一補償金額重新插入至補償清單。 If the judgment result is that the total number of times of the first discount is greater than the preset threshold of discount times value, it is determined that the discount amount requested by the user is 0. And after that, a rollback operation may be further performed, including: re-inserting the third discount amount obtained by the user's current transaction request and used for determining the first discount amount into the list of discount amounts, and using the third discount amount for determining the first discount amount. A first compensation amount of a preferential amount is re-inserted into the compensation list.

在一種可能的實現方式中,一個使用者在一次優惠活動中,都存在一個使用者標識,根據該使用者標識,使用者的交易請求中帶有該使用者標識,根據該使用者標識,可以將使用者的交易請求分配至相應的交易系統中進行處理,該交易系統中記錄有該使用者的資訊,該資訊包括使用者已經享受的優惠總次數和使用者已經享受的優惠總金額。當該交易系統對應的優惠金額清單和補償清單為空時,由於無法提供給使用者優惠金額,因此,該交易系統會查詢其他優惠金額清單不和/或補償清單不為空的其他交易系統,並將存儲的使用者的資訊轉移至查詢到的其他優惠系統。這樣,在優惠活動初期,使用者量較大時,由多個交易系統分別對不同使用者的交易請求進行處理,提高了處理效率。 In a possible implementation manner, a user has a user identifier in a preferential activity. According to the user identifier, the user's transaction request carries the user identifier. According to the user identifier, the user can Allocate the user's transaction request to a corresponding transaction system for processing, where the user's information is recorded in the transaction system, and the information includes the total number of discounts the user has enjoyed and the total amount of discounts the user has enjoyed. When the preferential amount list and the compensation list corresponding to the transaction system are empty, since the preferential amount cannot be provided to the user, the transaction system will query other transaction systems whose preferential amount list is not and/or the compensation list is not empty. And transfer the stored user information to other preferential systems inquired. In this way, in the early stage of the preferential activity, when the number of users is large, the transaction requests of different users are processed by a plurality of transaction systems, which improves the processing efficiency.

基於與上述方法相同的構思,本發明還提供一種優惠金額確定裝置,如圖5所示,該裝置包括以下單元: Based on the same concept as the above method, the present invention also provides a device for determining a preferential amount. As shown in FIG. 5 , the device includes the following units:

接收單元501,用於接收使用者的一個交易請求; a receiving unit 501 for receiving a transaction request from a user;

該交易請求用於請求一個優惠金額; The transaction request is used to request a discount amount;

獲取單元502,用於獲取該交易請求對應的第一優惠金額; an obtaining unit 502, configured to obtain the first preferential amount corresponding to the transaction request;

第一確定單元503,用於確定第一優惠總金額和第一優惠總次數。 The first determining unit 503 is configured to determine the total amount of the first discount and the total number of times of the first discount.

其中,第一優惠總金額為使用者已經享受過的優惠總金額與第一優惠金額之和,第一優惠總次數為使用者已經享受過的優惠總次數加 1。 Among them, the total amount of the first discount is the sum of the total amount of discounts that the user has enjoyed and the amount of the first discount, and the total number of first discounts is the total number of discounts that the user has enjoyed plus the sum of the first discount amount. 1.

第二確定單元504,用於在第一優惠總次數不大於預設的優惠次數閾值,且第一優惠總金額大於預設的優惠金額閾值時,確定第二優惠金額並將第二優惠金額作為使用者請求到的優惠金額,第二優惠金額與使用者已經享受過的優惠總金額之和不大於優惠金額閾值。 The second determining unit 504 is configured to determine the second discount amount and use the second discount amount as The discount amount requested by the user, the sum of the second discount amount and the total discount amount that the user has already enjoyed is not greater than the discount amount threshold.

上述方案,對於一個使用者已經享受過的優惠金額及優惠次數進行記錄,當使用者再次參與活動時,如果使用者此次獲得的優惠金額與已經享受過的優惠金額的總和超過了商家預設的一個使用者在這次活動中能夠享受的優惠金額閾值,則重新選擇一個不會使使用者獲得的總優惠金額超過優惠金額閾值的值作為使用者請求到的優惠金額,這樣,每個使用者能夠獲取到的優惠總金額有了限制,不同使用者能夠獲得的優惠金額差距變小,從而優化了使用者體驗。 The above scheme records the discount amount and the number of times a user has enjoyed. When the user participates in the activity again, if the sum of the discount amount obtained by the user and the discount amount already enjoyed by the user exceeds the preset amount of the merchant The discount amount threshold that a user can enjoy in this activity, then re-select a value that will not make the total discount amount obtained by the user exceed the discount amount threshold as the discount amount requested by the user. In this way, each user The total amount of discounts that can be obtained is limited, and the difference between the amount of discounts that different users can obtain is reduced, thereby optimizing the user experience.

在一種可能的實現方式中,上述裝置還可以包括補償金額生成單元505,用於在確定第二優惠金額之後,確定第一優惠金額與第二優惠金額的第一差值,並將第一差值插入補償清單,作為一個補償金額,補償清單用於存儲補償金額。 In a possible implementation manner, the foregoing apparatus may further include a compensation amount generating unit 505, configured to determine a first difference between the first discount amount and the second discount amount after determining the second discount amount, and calculate the first difference between the first discount amount and the second discount amount. The value is inserted into the compensation list as a compensation amount, and the compensation list is used to store the compensation amount.

進一步地,上述獲取單元502,具體用於:根據交易請求,從優惠金額清單中獲取第三優惠金額,以及從補償清單中獲取第一補償金額,並將第三優惠金額與第一補償金額之和,作為第一優惠金額。 Further, the above obtaining unit 502 is specifically configured to: according to the transaction request, obtain the third preferential amount from the preferential amount list, and obtain the first compensation amount from the compensation list, and calculate the difference between the third preferential amount and the first compensation amount. and, as the first discount amount.

在一種可能的實現方式中,上述第二確定單元504,具體可以用於:確定優惠金額閾值與使用者已經享受過的優惠總金額的差值,為第二優惠金額;或者,隨機選擇不大於優惠金額閾值與使用者已經享受過 的優惠總金額的差值的任一正數值,為第二優惠金額。 In a possible implementation manner, the above-mentioned second determining unit 504 may be specifically configured to: determine the difference between the discount amount threshold and the total amount of discounts that the user has already enjoyed, as the second discount amount; or, randomly select no more than The discount amount threshold and the user has already enjoyed Any positive value of the difference between the total discount amount of , is the second discount amount.

在一種可能的實現方式中,上述第二確定單元504還可以用於:在上述第一優惠總次數不大於預設的優惠次數閾值,且上述第一優惠總金額不大於預設的優惠金額閾值時,確定第一優惠金額作為使用者請求到的優惠金額。 In a possible implementation manner, the above-mentioned second determining unit 504 may be further configured to: when the above-mentioned first total number of discounts is not greater than the preset number of discounts threshold, and the above-mentioned first total amount of discounts is not greater than the preset threshold of discount amount When the first discount amount is determined as the discount amount requested by the user.

在一種可能的實現方式中,上述第二確定單元504還可以用於:在上述第一優惠總次數大於預設的優惠次數閾值時,確定使用者請求到的優惠金額為0。該方案中,由於每次優惠活動中,每個使用者能夠參與的次數是商家預設好的,若使用者參與次數達到優惠次數閾值,則該使用者無法再獲得優惠金額。 In a possible implementation manner, the second determining unit 504 may also be configured to: determine that the amount of discount requested by the user is 0 when the total number of times of the first discount is greater than a preset threshold of the number of discounts. In this solution, since the number of times that each user can participate in each preferential activity is preset by the merchant, if the user's participation times reaches the threshold of preferential times, the user can no longer obtain the preferential amount.

在一種可能的實現方式中,上述第一確定單元503,具體用於:根據第一優惠金額,確定第一字串,該第一字串的第一字元子串為1,該第一字串的第二字元子串用於指示第一優惠金額。然後根據第一字串和第二字串,確定第三字串。其中,第二字串的第一字元子串用於指示使用者已經享受過的優惠總次數,第二字串的第二字元子串用於指示使用者已經享受過的優惠總金額,第三字串的第一字元子串用於指示第一優惠總次數,第三字串的第二字元子串用於指示第一優惠總金額。 In a possible implementation manner, the above-mentioned first determining unit 503 is specifically configured to: determine a first character string according to the first preferential amount, where the first character substring of the first character string is 1, and the first character string is 1. The second character substring of the string is used to indicate the first discount amount. Then, according to the first character string and the second character string, a third character string is determined. Wherein, the first character substring of the second character string is used to indicate the total number of discounts that the user has enjoyed, and the second character substring of the second character string is used to indicate the total amount of discounts that the user has enjoyed, The first character substring of the third character string is used to indicate the total number of times of the first discount, and the second character substring of the third character string is used to indicate the total amount of the first discount.

在一種可能的實現方式中,上述裝置還可以包括,優惠金額清單生成單元506,用於生成優惠金額清單。 In a possible implementation manner, the above apparatus may further include a preferential amount list generating unit 506 configured to generate a preferential amount list.

在一種可能的實現方式中,上述裝置對應一個交易系統,上述裝置還可以包括查詢單元507,用於查詢其他優惠金額清單和/或補償清單不為空的其他交易系統,以將該交易系統存儲的使用者的資訊轉移至查 詢到的其他優惠系統。 In a possible implementation manner, the above-mentioned apparatus corresponds to a transaction system, and the above-mentioned apparatus may further include a query unit 507 for inquiring other transaction systems whose preferential amount list and/or compensation list is not empty, so as to store the transaction system in the of users' information is transferred to Other discount systems inquired.

上述裝置所涉及的與本發明提供的技術方案相關的概念,解釋和詳細說明及其它步驟請參見前述優惠金額確定方法或其它實施例中關於這些內容的描述,此處不做贅述。 For the concepts, explanations, detailed descriptions and other steps involved in the above device and related to the technical solutions provided by the present invention, please refer to the descriptions of the foregoing methods for determining the preferential amount or other embodiments, which will not be repeated here.

基於與上述實施例相同的構思,本發明還提供一種網路設備。 Based on the same concept as the above embodiments, the present invention also provides a network device.

圖6為本發明提供的一種網路設備的結構示意圖。如圖6所示,該網路設備600包括: FIG. 6 is a schematic structural diagram of a network device provided by the present invention. As shown in FIG. 6, the network device 600 includes:

記憶體601,用於存儲程式指令; memory 601 for storing program instructions;

處理器602,用於調用該記憶體中存儲的程式指令,按照獲得的程式執行前述任一實施例中所述的優惠金額確定方法。 The processor 602 is configured to invoke the program instruction stored in the memory, and execute the method for determining the preferential amount described in any of the foregoing embodiments according to the obtained program.

基於與上述實施例相同的構思,本發明還提供一種電腦存儲介質,該電腦可讀存儲介質存儲有電腦可執行指令,該電腦可執行指令用於使電腦執行前述任一實施例中所述的優惠金額確定方法。 Based on the same concept as the above-mentioned embodiment, the present invention also provides a computer storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause the computer to execute any of the foregoing embodiments. How to determine the discount amount.

需要說明的是,本發明中對單元的劃分是示意性的,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式。在本發明中的各功能單元可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個模組中。上述集成的單元既可以採用硬體的形式實現,也可以採用軟體功能單元的形式實現。 It should be noted that the division of units in the present invention is schematic, and is only a logical function division, and other division methods may be used in actual implementation. Each functional unit in the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software functional units.

在上述實施例中,可以全部或部分地通過軟體、硬體、韌體或者其任意組合來實現。當使用軟體實現時,可以全部或部分地以電腦程式產品的形式實現。電腦程式產品包括一個或多個電腦指令。在電腦上載 入和執行電腦程式指令時,全部或部分地產生按照本發明的流程或功能。電腦可以是通用電腦、專用電腦、電腦網路、或者其他可程式設計裝置。電腦指令可以存儲在電腦可讀存儲介質中,或者從一個電腦可讀存儲介質向另一個電腦可讀存儲介質傳輸,例如,電腦指令可以從一個網站、電腦、伺服器或資料中心通過有線(例如同軸電纜、光纖、數位使用者線路(DSL))或無線(例如紅外線、無線、微波等)方式向另一個網站、電腦、伺服器或資料中心進行傳輸。電腦可讀存儲介質可以是電腦能夠存取的任何可用介質或者是包含一個或多個可用介質集成的伺服器、資料中心等資料存放裝置。可用介質可以是磁性介質,(例如,軟碟、硬碟、磁帶)、光介質(例如,DVD)、或者半導體介質例如固態硬碟Solid State Disk(SSD))等。 In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. upload on computer When computer program instructions are entered and executed, the processes or functions according to the present invention are produced, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored on or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center via wire (e.g. coaxial cable, fiber optic, digital user line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc., which is integrated with one or more available media. Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media such as Solid State Disk (SSD)), and the like.

本領域具有通常知識者應明白,本發明可提供為方法、系統、或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用存儲介質(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。 As will be understood by one of ordinary skill in the art, the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) having computer-usable code embodied therein .

本發明是參照根據本發明的方法、設備(系統)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一流程和/或方塊、以及流程圖和/或方塊圖中的流程和/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式設計資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式設計資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方 塊中指定的功能的裝置。 The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine for causing the instructions to be executed by the processor of the computer or other programmable data processing device Generated for implementing a flow or flows in a flowchart and/or a block or parties in a block diagram A device for the function specified in the block.

這些電腦程式指令也可存儲在能引導電腦或其他可程式設計資料處理設備以特定方式工作的電腦可讀記憶體中,使得存儲在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能。 These computer program instructions may also be stored in computer readable memory capable of directing a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction means , the instruction means implements the functions specified in the flow or flow of the flowchart and/or the block or blocks of the block diagram.

這些電腦程式指令也可裝載到電腦或其他可程式設計資料處理設備上,使得在電腦或其他可程式設計設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式設計設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的步驟。 These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process that can be executed on the computer or other programmable device. The instructions executed on the above provide steps for implementing the functions specified in the flow diagram flow or flow diagrams and/or the block diagram flow diagram block or blocks.

在上列詳細說明係針對本發明之一可行實施例之具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。 The above detailed description is a specific description of a feasible embodiment of the present invention, but this embodiment is not intended to limit the patent scope of the present invention. Any equivalent implementation or modification that does not depart from the technical spirit of the present invention shall include within the scope of the patent in this case.

110-140‧‧‧步驟 110-140‧‧‧Steps

Claims (11)

一種優惠金額清單的生成方法,係用於產生至少一個對應交易系統的優惠金額清單,該方法包含:步驟A:設定活動金額、設定交易系統個數、設定優惠名額、設定複數個區間範圍,提供各該交易系統一個空的優惠金額清單;步驟B:利用電腦,隨機產生多個亂數,其中亂數的值介於各該區間範圍內,且一個該區間範圍內有二個數值為該亂數的值,並以各該亂數為該優惠清單的優惠金額;步驟C:將各該亂數放入第一清單中,且該第一清單中該亂數的個數為該第一清單的總名額,而該第一清單中的該亂數總和為該第一清單的總金額;步驟D:重複該步驟C,直到該第一清單中的該亂數個數大於第一閾值,或者上述該第一清單中的該亂數總和大於第二閾值,其中該第一閾值係依據該優惠名額而定,其中該第二閾值係依據該活動金額而定;步驟E:將複數個第一數值加入至第二清單,其中第二清單中的該第一數值的數量不大於第三閾值,且該第一數值的總和不大於第四閾值,其中該第三閾值係依據優惠名額而定,其中該第四閾值係依據該活動金額而定,第二清單中的該第一數值的個數為第二清單總名額,第二清單中的該第一數值的總和為第二清單總金額;步驟F:利用電腦,隨機生成一個第一範圍的第二數值,並依據第二數值生成二個數值亂數,並將各該數值亂數加入第三清單,其中第一範圍為(0,(該活動金額減該第一清單總金額減該第二清單總金額)*2/(優惠名 額減該第一清單總名額減該第二清單總名額)],其中該數值亂數分別為該第二數值及(該活動金額減該第一清單總金額減該第二清單總金額)*2/(優惠名額減該第一清單總名額減該第二清單總名額)減該第二數值;步驟G:重複該步驟F,直到該第三清單中的該亂數總和,等於該活動金額減該第一清單總金額減該第二清單總金額,而使該第三清單的亂數個數等於優惠名額減該第一清單總名額減該第二清單總名額,其中該第三清單中的該亂數個數為該第三清單總名額,該第三清單中的該亂數總和為該第三清單總金額;步驟H:從該第一清單中取第一數量個該亂數,且從該第三清單中取第三數量個該亂數,將各該亂數隨機加入至一個該交易系統對應的該優惠金額清單中,再從該第二清單中取第二數量個該定數值,放入各該系統對應的該優惠金額清單的末尾,而產生各該優惠金額清單,其中第一數量等於第一清單總名額/該交易系統個數,其中第二數量等於第二清單總名額/該交易系統個數,其中第三數量等於第三清單總名額/該交易系統個數。 A method for generating a list of preferential amounts, which is used to generate at least one list of preferential amounts corresponding to a trading system, the method comprising: Step A: setting the activity amount, setting the number of trading systems, setting the preferential quota, setting a plurality of intervals, and providing Each transaction system has an empty list of preferential amounts; Step B: use a computer to randomly generate a plurality of random numbers, wherein the values of the random numbers are within each range, and two values within one range are the random numbers and take each random number as the discount amount of the discount list; Step C: put each random number into the first list, and the number of the random numbers in the first list is the first list and the sum of the random numbers in the first list is the total amount of the first list; Step D: Repeat Step C until the number of random numbers in the first list is greater than the first threshold, or The sum of the random numbers in the above-mentioned first list is greater than a second threshold, wherein the first threshold is determined according to the preferential quota, wherein the second threshold is determined according to the activity amount; Step E: put a plurality of first Values are added to the second list, wherein the number of the first values in the second list is not greater than a third threshold, and the sum of the first values is not greater than a fourth threshold, wherein the third threshold is determined according to the preferential quota, The fourth threshold is determined according to the activity amount, the number of the first value in the second list is the total number of places in the second list, and the sum of the first values in the second list is the total amount of the second list; Step F: Using a computer, randomly generate a second numerical value in the first range, and generate two numerical random numbers according to the second numerical value, and add each numerical random number to the third list, wherein the first range is (0, ( The amount of the activity minus the total amount of the first list minus the total amount of the second list)*2/(name of discount amount minus the total quota of the first list minus the total quota of the second list)], where the random numbers are the second value and (the activity amount minus the total amount of the first list minus the total amount of the second list)* 2/(Preferential quota minus the total quota of the first list minus the total quota of the second list) minus the second value; Step G: Repeat this step F until the sum of the random numbers in the third list is equal to the activity amount Subtract the total amount of the first list minus the total amount of the second list, so that the random number of the third list is equal to the preferential quota minus the total quota of the first list minus the total quota of the second list, wherein the third list The number of random numbers in the third list is the total number of places in the third list, and the sum of the random numbers in the third list is the total amount of the third list; Step H: take the first number of random numbers from the first list, And take a third number of the random numbers from the third list, randomly add each of the random numbers to a list of the discount amount corresponding to the transaction system, and then take a second number of the fixed numbers from the second list. The value is placed at the end of the discount amount list corresponding to each system, and each discount amount list is generated, wherein the first quantity is equal to the total number of places in the first list/the number of trading systems, and the second quantity is equal to the total number of the second list. Quota/number of the trading system, where the third quantity is equal to the total quota of the third list/the number of the trading system. 一種優惠金額確定方法,係利用網路設備或電腦而執行,該優惠金額確定方法包括:利用如請求項1所述之優惠金額清單的生成方法,產生一優惠金額清單;接收使用者的一個交易請求,該交易請求用於請求一個優惠金額;獲取該交易請求對應的第一優惠金額;確定第一優惠總金額和第一優惠總次數,該第一優惠總金額為該使用者 已經享受過的優惠總金額與該第一優惠金額之和,該第一優惠總次數為該使用者已經享受過的優惠總次數加1;若該第一優惠總次數不大於預設的優惠次數閾值,且該第一優惠總金額大於預設的優惠金額閾值,則確定第二優惠金額並將該第二優惠金額作為該使用者請求到的優惠金額,該第二優惠金額與該使用者已經享受過的優惠總金額之和不大於該優惠金額閾值;其中,在確定該第二優惠金額之後,還包括:確定該第一優惠金額與該第二優惠金額的第一差值;將該第一差值插入補償清單,作為一個補償金額,該補償清單用於存儲補償金額其中,該獲取交易請求對應的第一優惠金額之步驟,包括:根據該交易請求,從該優惠金額清單中獲取第三優惠金額,以及從該補償清單中獲取第一補償金額;將該第三優惠金額與該第一補償金額之和,作為該第一優惠金額。 A method for determining a preferential amount, which is performed by using a network device or a computer, the method for determining the preferential amount includes: using the method for generating a preferential amount list as described in request item 1 to generate a preferential amount list; receiving a transaction from a user request, the transaction request is used to request a discount amount; obtain the first discount amount corresponding to the transaction request; determine the first total discount amount and the first total number of discounts, and the first total discount amount is the user The sum of the total amount of discounts already enjoyed and the first discount amount, the total number of first discounts is the total number of discounts the user has enjoyed plus 1; if the total number of first discounts is not greater than the preset number of discounts threshold, and the total first discount amount is greater than the preset discount amount threshold, then determine the second discount amount and use the second discount amount as the discount amount requested by the user, the second discount amount and the user has already The sum of the total discount amount that has been enjoyed is not greater than the discount amount threshold; wherein, after determining the second discount amount, the method further includes: determining the first difference between the first discount amount and the second discount amount; A difference is inserted into the compensation list as a compensation amount, and the compensation list is used to store the compensation amount. The step of obtaining the first preferential amount corresponding to the transaction request includes: obtaining the first preferential amount from the preferential amount list according to the transaction request. Three preferential amounts, and the first compensation amount obtained from the compensation list; the sum of the third preferential amount and the first compensation amount is taken as the first preferential amount. 如申請專利範圍第2項所述的優惠金額確定方法,該確定第二優惠金額,包括:確定該優惠金額閾值與該使用者已經享受過的優惠總金額的差值,為該第二優惠金額。 According to the method for determining the discount amount described in item 2 of the scope of application, the determining the second discount amount includes: determining the difference between the discount amount threshold and the total discount amount that the user has enjoyed, as the second discount amount . 如申請專利範圍第2至3項中任一項所述的優惠金額確定方法,該確定第一優惠總金額和第一優惠總次數,包括:根據該第一優惠金額,確定第一字串,該第一字串的第一字元子串為1,該第一字串的第二字元子串用於指示該第一優惠金額; 根據該第一字串和第二字串,確定第三字串,該第二字串的第一字元子串用於指示該使用者已經享受過的優惠總次數,該第二字串的第二字元子串用於指示該使用者已經享受過的優惠總金額,該第三字串的第一字元子串用於指示該第一優惠總次數,該第三字串的第二字元子串用於指示該第一優惠總金額。 According to the method for determining a discount amount according to any one of items 2 to 3 of the scope of the application, the determining the first total discount amount and the first total number of discounts includes: determining a first character string according to the first discount amount, The first character substring of the first character string is 1, and the second character substring of the first character string is used to indicate the first discount amount; A third character string is determined according to the first character string and the second character string. The first character substring of the second character string is used to indicate the total number of discounts the user has enjoyed. The second character substring is used to indicate the total discount amount that the user has enjoyed, the first character substring of the third character string is used to indicate the total number of times of the first discount, the second character substring of the third character string The character substring is used to indicate the total amount of the first discount. 如申請專利範圍第2至3項中任一項所述的優惠金額確定方法,該優惠金額確定方法還包括:若該第一優惠總次數不大於預設的優惠次數閾值,且該第一優惠總金額不大於預設的優惠金額閾值,則確定該第一優惠金額作為該使用者請求到的優惠金額。 The method for determining a discount amount according to any one of items 2 to 3 of the scope of the application, the method for determining the discount amount further comprises: if the total number of times of the first discount is not greater than a preset threshold for the number of discounts, and the first discount If the total amount is not greater than the preset discount amount threshold, the first discount amount is determined as the discount amount requested by the user. 一種優惠金額確定裝置,包括:優惠金額清單產生單元,利用如請求項1所述之優惠金額清單的生成方法,產生一優惠金額清單;接收單元,用於接收使用者的一個交易請求,該交易請求用於請求一個優惠金額;獲取單元,用於獲取該交易請求對應的第一優惠金額;第一確定單元,用於確定第一優惠總金額和第一優惠總次數,該第一優惠總金額為該使用者已經享受過的優惠總金額與該第一優惠金額之和,該第一優惠總次數為該使用者已經享受過的優惠總次數加1;第二確定單元,用於在該第一優惠總次數不大於預設的優惠次數閾值,且該第一優惠總金額大於預設的優惠金額閾值時,確定第二優惠金額並將該第二優惠金額作為該使用者請求到的優惠金額,該第二優惠金額與 該使用者已經享受過的優惠總金額之和不大於該優惠金額閾值;補償金額生成單元,用於在確定該第二優惠金額之後,確定該第一優惠金額與該第二優惠金額的第一差值,並將該第一差值插入補償清單,作為一個補償金額,該補償清單用於存儲補償金額;其中,該獲取單元,用於根據該交易請求,從該優惠金額清單中獲取第三優惠金額,以及從該補償清單中獲取第一補償金額,並將該第三優惠金額與該第一補償金額之和,作為該第一優惠金額。 A preferential amount determination device, comprising: a preferential amount list generating unit for generating a preferential amount list by using the method for generating a preferential amount list according to the request item 1; a receiving unit for receiving a transaction request from a user, the transaction The request is used to request a discount amount; the obtaining unit is used to obtain the first discount amount corresponding to the transaction request; the first determination unit is used to determine the first total amount of discount and the total number of times of the first discount, the total amount of the first discount is the sum of the total discount amount that the user has enjoyed and the first discount amount, and the first total number of discounts is the total number of discounts the user has enjoyed plus 1; the second determining unit is used for the When the total number of discounts is not greater than the preset number of discounts threshold, and the total amount of the first discount is greater than the preset threshold of discount amount, determine the second discount amount and use the second discount amount as the discount amount requested by the user , the second discount amount is the same as The sum of the total discount amount that the user has enjoyed is not greater than the discount amount threshold; the compensation amount generating unit is configured to determine the first discount amount between the first discount amount and the second discount amount after determining the second discount amount difference, and insert the first difference into the compensation list as a compensation amount, and the compensation list is used to store the compensation amount; wherein, the obtaining unit is configured to obtain the third preferential amount from the preferential amount list according to the transaction request The preferential amount is obtained, and the first compensation amount is obtained from the compensation list, and the sum of the third preferential amount and the first compensation amount is used as the first preferential amount. 如申請專利範圍第6項所述的優惠金額確定裝置,該第二確定單元,具體用於:確定該優惠金額閾值與該使用者已經享受過的優惠總金額的差值,為該第二優惠金額。 According to the device for determining the preferential amount described in item 6 of the scope of application, the second determining unit is specifically configured to: determine the difference between the preferential amount threshold and the total preferential amount that the user has enjoyed, as the second preferential amount. 如申請專利範圍第6至7項中任一項所述的優惠金額確定裝置,該第一確定單元具體用於:根據該第一優惠金額,確定第一字串,該第一字串的第一字元子串為1,該第一字串的第二字元子串用於指示該第一優惠金額;根據該第一字串和第二字串,確定第三字串,該第二字串的第一字元子串用於指示該使用者已經享受過的優惠總次數,該第二字串的第二字元子串用於指示該使用者已經享受過的優惠總金額,該第三字串的第一字元子串用於指示該第一優惠總次數,該第三字串的第二字元子串用於指示該第一優惠總金額。 According to the device for determining a preferential amount according to any one of the claims 6 to 7 of the scope of the application, the first determining unit is specifically configured to: determine a first character string according to the first preferential amount, and the first character string of the first character string A character substring is 1, and the second character substring of the first character string is used to indicate the first discount amount; according to the first character string and the second character string, determine a third character string, the second character string The first character substring of the character string is used to indicate the total number of discounts that the user has enjoyed, the second character substring of the second character string is used to indicate the total amount of the discount that the user has enjoyed, the The first character substring of the third character string is used to indicate the total number of times of the first discount, and the second character substring of the third character string is used to indicate the total amount of the first discount. 如申請專利範圍第6至7項中任一項所述的優惠金額確定裝置,該第二確定單元還用於: 在該第一優惠總次數不大於預設的優惠次數閾值,且該第一優惠總金額不大於預設的優惠金額閾值時,確定該第一優惠金額作為該使用者請求到的優惠金額。 According to the device for determining the preferential amount according to any one of items 6 to 7 of the scope of the application, the second determining unit is further used for: When the first total number of discounts is not greater than the preset number of discounts threshold, and the total first discount amount is not greater than the preset discount amount threshold, the first discount amount is determined as the discount amount requested by the user. 一種網路設備,包括:記憶體,用於存儲程式指令;處理器,用於調用該記憶體中存儲的程式指令,按照獲得的程式執行請求項1至5中任一項所述的優惠金額確定方法。 A network device, comprising: a memory for storing program instructions; a processor for calling the program instructions stored in the memory, and executing the preferential amount described in any one of request items 1 to 5 according to the obtained program Determine the method. 一種電腦可讀存儲介質,該電腦可讀存儲介質存儲有電腦可執行指令,該電腦可執行指令用於使電腦執行請求項1至5中任一項所述的優惠金額確定方法。 A computer-readable storage medium storing computer-executable instructions, the computer-executable instructions being used to make a computer execute the preferential amount determination method described in any one of request items 1 to 5.
TW108142472A 2018-12-29 2019-11-22 Method, device, network device and computer-readable storage medium for determining preferential amount TWI777106B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811638869.3A CN109727074A (en) 2018-12-29 2018-12-29 A kind of preferential amount of money determines method and device
CN201811638869.3 2018-12-29

Publications (2)

Publication Number Publication Date
TW202026993A TW202026993A (en) 2020-07-16
TWI777106B true TWI777106B (en) 2022-09-11

Family

ID=66298369

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108142472A TWI777106B (en) 2018-12-29 2019-11-22 Method, device, network device and computer-readable storage medium for determining preferential amount

Country Status (3)

Country Link
CN (1) CN109727074A (en)
TW (1) TWI777106B (en)
WO (1) WO2020134663A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727074A (en) * 2018-12-29 2019-05-07 中国银联股份有限公司 A kind of preferential amount of money determines method and device
CN110276637B (en) * 2019-05-28 2023-09-26 创新先进技术有限公司 Resource allocation method and device, and coupon allocation method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201329892A (en) * 2011-10-12 2013-07-16 Yahoo Inc Online techniques for selling group combo coupons
CN103905215A (en) * 2014-04-08 2014-07-02 国家广播电影电视总局广播科学研究院 Convergent charging method of integrated services under convergent networks and rule engine device
CN106355432A (en) * 2016-08-19 2017-01-25 焦点科技股份有限公司 Method for monitoring effectiveness of television advertisements
TWM552141U (en) * 2017-08-16 2017-11-21 彰化商業銀行股份有限公司 Electronic payment bonus point management system
CN107369012A (en) * 2016-07-05 2017-11-21 康存乐付保数据科技(上海)有限公司 A kind of method for processing payment information and system and the prepaid card processing method with performance bond insurance mechanism
CN107886356A (en) * 2017-11-03 2018-04-06 北京翰宁智能科技有限责任公司 A kind of dynamic creation method of supermarket's reward voucher denomination
CN108596668A (en) * 2018-04-25 2018-09-28 合肥上城信息技术有限公司 Membership management system based on e-commerce and its method
TWI645347B (en) * 2011-12-20 2018-12-21 伊克斯卡萊柏智慧財產有限責任公司 Method and system for providing offers that specify a variable discount with respect to a price of a good and/or service
CN109727074A (en) * 2018-12-29 2019-05-07 中国银联股份有限公司 A kind of preferential amount of money determines method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6847936B2 (en) * 2001-11-28 2005-01-25 Ko-Cheng Fang On-line sales and profit or discount sharing
US7337128B2 (en) * 2002-01-09 2008-02-26 International Business Machines Corporation Method, program, and system for resetting the value of a coupon based on market information
CN105761104A (en) * 2016-02-05 2016-07-13 腾讯科技(深圳)有限公司 Information processing method and server
CN107862535A (en) * 2017-08-17 2018-03-30 上海陆家嘴国际金融资产交易市场股份有限公司 Reward voucher management method, system and computer-readable recording medium
CN108460586A (en) * 2018-02-10 2018-08-28 深圳壹账通智能科技有限公司 A kind of amount of money preferential measure, device, terminal device and the storage medium of polymerization payment
CN108520428A (en) * 2018-03-14 2018-09-11 中链科技有限公司 A kind of prize drawing information processing method and processing device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201329892A (en) * 2011-10-12 2013-07-16 Yahoo Inc Online techniques for selling group combo coupons
TWI645347B (en) * 2011-12-20 2018-12-21 伊克斯卡萊柏智慧財產有限責任公司 Method and system for providing offers that specify a variable discount with respect to a price of a good and/or service
CN103905215A (en) * 2014-04-08 2014-07-02 国家广播电影电视总局广播科学研究院 Convergent charging method of integrated services under convergent networks and rule engine device
CN107369012A (en) * 2016-07-05 2017-11-21 康存乐付保数据科技(上海)有限公司 A kind of method for processing payment information and system and the prepaid card processing method with performance bond insurance mechanism
CN106355432A (en) * 2016-08-19 2017-01-25 焦点科技股份有限公司 Method for monitoring effectiveness of television advertisements
TWM552141U (en) * 2017-08-16 2017-11-21 彰化商業銀行股份有限公司 Electronic payment bonus point management system
CN107886356A (en) * 2017-11-03 2018-04-06 北京翰宁智能科技有限责任公司 A kind of dynamic creation method of supermarket's reward voucher denomination
CN108596668A (en) * 2018-04-25 2018-09-28 合肥上城信息技术有限公司 Membership management system based on e-commerce and its method
CN109727074A (en) * 2018-12-29 2019-05-07 中国银联股份有限公司 A kind of preferential amount of money determines method and device

Also Published As

Publication number Publication date
WO2020134663A1 (en) 2020-07-02
CN109727074A (en) 2019-05-07
TW202026993A (en) 2020-07-16

Similar Documents

Publication Publication Date Title
JP6811350B2 (en) Methods and equipment for distributed databases in the network
US8706822B2 (en) Delivering messages from message sources to subscribing recipients
CN106897810B (en) Business processing method and system, workflow engine and system and business system
TWI250742B (en) Method and system for identifying available resources in a peer-to-peer network
TWI777106B (en) Method, device, network device and computer-readable storage medium for determining preferential amount
WO2016029794A1 (en) Method and device for identifying feature account
JP6687628B2 (en) Service implementation
CA3087107A1 (en) Blockchain-based virtual resource delivery and crowdfunding method and device
WO2017185425A1 (en) Rebate method
US20150074043A1 (en) Distributed and open schema interactions management system and method
CN112189199B (en) Privacy preserving data collection and analysis
KR20200105689A (en) Blockchain-based set exchange method and apparatus for available resource limit
CN110012068B (en) Download control method, device and storage medium
JP2019176381A (en) Block chain program and block chain method
CN104111981B (en) A kind of method and apparatus to release news for offer
WO2018024815A1 (en) Resource path monitoring
CN110458567A (en) A kind of object trading management system and method based on block chain
CN108241970A (en) Digging ore deposit method, apparatus and computer readable storage medium based on block chain
CN108810089B (en) Information pushing method and device and storage medium
CN107092650B (en) Weblog analysis method and device
CN107493315A (en) A kind of collection method of behavioral data, Resource Server and storage medium
CN113409079A (en) Resource exchange method, device and system
CN101583087A (en) Control system for issuing advertisement to mobile terminal through unique identification information
CN111526180A (en) Data sharing method and device
JP5012712B2 (en) Content distributed storage system, total evaluation value management device, management processing program, node device, and total evaluation value management method

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent