TW201909077A - Method and device for transmitting electronic ticket - Google Patents

Method and device for transmitting electronic ticket Download PDF

Info

Publication number
TW201909077A
TW201909077A TW107117183A TW107117183A TW201909077A TW 201909077 A TW201909077 A TW 201909077A TW 107117183 A TW107117183 A TW 107117183A TW 107117183 A TW107117183 A TW 107117183A TW 201909077 A TW201909077 A TW 201909077A
Authority
TW
Taiwan
Prior art keywords
electronic ticket
electronic
sending
ticket
mark
Prior art date
Application number
TW107117183A
Other languages
Chinese (zh)
Other versions
TWI707289B (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 TW201909077A publication Critical patent/TW201909077A/en
Application granted granted Critical
Publication of TWI707289B publication Critical patent/TWI707289B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0235Discounts or incentives, e.g. coupons or rebates constrained by time limit or expiration date
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0222During e-commerce, i.e. online transactions

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (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)

Abstract

An embodiment of the present disclosure provides a method and device for sending an electronic coupon. In the embodiment of the present disclosure, every sending period contains a corresponding availability identifier, wherein only an electronic coupon marked with the availability identifier corresponding to the sending period can be sent to users; however, within one of the sending periods, the identifier of the electronic coupon to be sent will be modified and the modified identifier will no longer be the availability identifier corresponding to the current sending period, but is rather an availability identifier corresponding to a subsequent sending period.

Description

一種發送電子票券的方法及裝置Method and device for sending electronic tickets

本發明係相關於資料庫技術領域,尤其相關於一種發送電子票券的方法及裝置。The invention relates to the technical field of database, and in particular to a method and device for sending electronic tickets.

在向使用者發送電子票券(如彩票)的業務場景下,伺服器向請求領取電子票券的使用者發送電子票券。一般而言,在一個發送週期內,伺服器發送給每個使用者的電子票券應當是唯一的,也即各使用者在一個發送週期內分別領取到的電子票券都是不同。   實際應用中,為滿足上述要求,對儲存的每個電子票券進行標記,以標明每個電子票券的狀態是已被發送或未被發送。舉例來說,針對每個電子票券,當該電子票券未被發送時,該電子票券的標記為T,當該電子票券被發送時,該電子票券的標記即被修改為F。   基於現有技術,需要更為有效的發送電子票券的方法。In a business scenario where an electronic ticket (such as a lottery ticket) is sent to a user, the server sends the electronic ticket to the user who requests to receive the electronic ticket. Generally speaking, within one sending cycle, the electronic tickets sent by the server to each user should be unique, that is, the electronic tickets received by each user in one sending cycle are different. In practical applications, in order to meet the above requirements, each stored electronic ticket is marked to indicate whether the status of each electronic ticket has been sent or not. For example, for each electronic ticket, when the electronic ticket is not sent, the mark of the electronic ticket is T, and when the electronic ticket is sent, the mark of the electronic ticket is modified to F . Based on the existing technology, a more effective method of sending electronic tickets is needed.

本說明書實施例提供一種發送電子票券的方法及裝置,以解決現有的發送電子票券的方法存在的浪費伺服器資源的問題。   為解決上述技術問題,本說明書實施例是這樣實現的:   本說明書實施例提供的一種發送電子票券的方法,包括:   接收使用者發送的領取請求;   根據所述領取請求,確定所述領取請求對應的發送週期,並確定所述發送週期對應的可用標識;   從儲存的各電子票券中,確定出標記為所述可用標識的電子票券;   從確定出的電子票券中選擇電子票券發送給所述使用者,並修改選擇的電子票券的標記;修改後的標記不是所述發送週期對應的可用標識,且是後續的發送週期對應的可用標識。   本說明書實施例提供的一種發送電子票券的裝置,包括:   接收模組,接收使用者發送的領取請求;   第一確定模組,根據所述領取請求,確定所述領取請求對應的發送週期,並確定所述發送週期對應的可用標識;   第二確定模組,從儲存的各電子票券中,確定出標記為所述可用標識的電子票券;   發送修改模組,從確定出的電子票券中選擇電子票券發送給所述使用者,並修改選擇的電子票券的標記;修改後的標記不是所述發送週期對應的可用標識,且是後續的發送週期對應的可用標識。   本說明書實施例提供的一種電子票券發送設備,包括一個或多個處理器及記憶體,所述記憶體儲存有程式,並且被配置成由所述一個或多個處理器執行以下步驟:   接收使用者發送的領取請求;   根據所述領取請求,確定所述領取請求對應的發送週期,並確定所述發送週期對應的可用標識;   從儲存的各電子票券中,確定出標記為所述可用標識的電子票券;   從確定出的電子票券中選擇電子票券發送給所述使用者,並修改選擇的電子票券的標記;修改後的標記不是所述發送週期對應的可用標識,且是後續的發送週期對應的可用標識。   由以上本說明書實施例提供的技術方案可見,在本說明書實施例中,一方面,每個發送週期有其對應的可用標識,在每個發送週期內,唯有標記為該發送週期對應的可用標識的電子票券,才能夠被發送給使用者;另一方面,在一個發送週期內,被發送的電子票券的標記會被修改,修改後的標記不再是當前發送週期對應的可用標識,卻是後續的發送週期對應的可用標識。如此一來,在每個發送週期結束後,無需浪費伺服器資源對各電子票券對應的標記進行重置或重新產生各電子票券,而是在後續的發送週期內對各電子票券進行重複使用,從而提升了發送電子票券的效率。Embodiments of the present specification provide a method and apparatus for sending electronic tickets to solve the problem of wasting server resources in the existing method for sending electronic tickets. To solve the above technical problems, the embodiments of the present specification are implemented as follows: A method for sending electronic tickets provided by the embodiments of the present specification includes: receiving a collection request sent by a user; According to the collection request, determining the collection request Corresponding sending cycle, and determine the available identification corresponding to the sending cycle; Determine the electronic ticket marked as the available identification from the stored electronic tickets; Select the electronic ticket from the determined electronic tickets Send to the user and modify the mark of the selected electronic ticket; the modified mark is not an available mark corresponding to the sending cycle, but an available mark corresponding to the subsequent sending cycle. An apparatus for sending electronic tickets provided by an embodiment of this specification includes: a receiving module to receive a pickup request sent by a user; a first determining module to determine a sending cycle corresponding to the pickup request according to the pickup request, And determine the available identification corresponding to the sending cycle; the second determination module, from each stored electronic ticket, determine the electronic ticket marked as the available identification; send the modification module, from the determined electronic ticket The electronic ticket selected in the coupon is sent to the user, and the mark of the selected electronic ticket is modified; the modified mark is not an available identifier corresponding to the sending cycle, but an available identifier corresponding to the subsequent sending cycle. An electronic ticket sending device provided by an embodiment of the present specification includes one or more processors and a memory, the memory stores a program, and is configured to be executed by the one or more processors to perform the following steps: receive Pick-up request sent by the user; According to the pick-up request, determine the sending cycle corresponding to the pick-up request, and determine the available identification corresponding to the sending cycle; Determine the marked as available from each stored electronic ticket The marked electronic ticket; selects the electronic ticket from the determined electronic ticket and sends it to the user, and modifies the mark of the selected electronic ticket; the modified mark is not an available mark corresponding to the sending cycle, and It is the available identifier corresponding to the subsequent sending cycle. It can be seen from the technical solutions provided by the above embodiments of the present specification that, in the embodiments of the present specification, on the one hand, each transmission cycle has its corresponding available identifier, and within each transmission cycle, only the marked as available for the corresponding transmission cycle Only marked electronic tickets can be sent to users; on the other hand, within a sending cycle, the mark of the sent electronic ticket will be modified, and the modified mark is no longer an available mark corresponding to the current sending cycle , Is the available identifier corresponding to the subsequent sending cycle. In this way, after the end of each sending cycle, there is no need to waste server resources to reset the mark corresponding to each electronic ticket or to regenerate each electronic ticket, but to each electronic ticket in the subsequent sending cycle Repeated use improves the efficiency of sending electronic tickets.

如先前技術所述,現有的發送電子票券的方法為了確保在一個發送週期內每次發送給使用者的電子票券是唯一的,採用了對每個電子票券進行標記的方式,例如,將未被發送的電子票券標記為T,將已被發送的電子票券標記為F,從而使得標記為F的電子票券不會被再次發送。   但是,採用這種標記方式會導致耗費的伺服器資源過多。舉例來說,假設在第一個發送週期內,伺服器將100個電子票券發送完畢,這100個電子票券的標記都已經由T被修改成F,那麼在下一個發送週期內,由於伺服器僅會選擇標記為T的電子票券發送,這100個標記為F的電子票券是無法被發送的。因此,在現有的發送電子票券的方法中,每個發送週期結束後,需要對各電子票券的標記進行重置或重新產生標記為T的各電子票券,而這會耗費過多的伺服器資源,影響伺服器發送電子票券的效率。   而本說明書一個或多個實施例的核心思想是針對每個發送週期,設置該發送週期對應的可用標識,並且,在每個發送週期內,未被發送的電子票券的標記是當前發送週期對應的可用標識,而被發送的電子票券的標記會被修改,修改後的標記不是當前發送週期對應的可用標識,卻是後續的發送週期對應的可用標識。伺服器通過執行上述發送規則,可以無需在每個發送週期結束後重置各電子票券的標記,也無需重新產生標記為T的各電子票券。   為了使熟悉該技術領域的人員更好地理解本發明中的技術方案,下面將結合本說明書一個或多個實施例中的附圖,對本說明書實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本說明書實施例,在該技術領域中具有通常知識者在沒有作出創造性勞動前提下所獲得的所有其他實施例,都應當屬於本發明保護的範圍。   以下結合附圖,詳細說明本發明各實施例提供的技術方案。   圖1是本說明書實施例提供的階梯數值設置方法流程圖,包括以下步驟:   S100:接收使用者發送的領取請求。   在本說明實施例中,伺服器可接收使用者通過通信設備(可上網的電腦、手機等)發送的針對電子票券的領取請求,以此觸發向所述使用者發送電子票券的操作。其中,各電子票券是由伺服器產生並儲存的。電子票券具體可以是電子獎券、電子票據、電子口令等。   S102:根據所述領取請求,確定所述領取請求對應的發送週期,並確定所述發送週期對應的可用標識。   在本說明書實施例中,伺服器可以根據所述領取請求中包含的使用者發送領取請求的時間,確定所述領取請求對應的發送週期,也即確定當前的發送週期。在本說明一個或多個實施例的場景下,伺服器週期性地發送電子票券,在一個發送週期內,各使用者領取到的電子票券都是不同的。   此外,所述領取請求中也可以包含使用者指定的時間,此種情況下,伺服器確定的所述領取請求對應的發送週期不一定是當前的發送週期,也可以是使用者指定的其他發送週期,伺服器可以待使用者指定的其他發送週期開始後,再開始執行後續步驟S104~S106。總之,伺服器可以根據使用者發送的領取請求,確定所述使用者想要領取電子票券的時機,從而在相應的發送週期內向所述使用者發送電子票券。   伺服器確定領取請求對應的發送週期後,可以繼續確定所述發送週期對應的可用標識。此處需要說明的是,伺服器可以預先針對每個發送週期,設置該發送週期對應的可用標識。一個發送週期對應的可用標識可以不止一個,可用標識可以是數值,也可以是文字或其他符號。各發送週期分別對應的可用標識是不同的。   S104:從儲存的各電子票券中,確定出標記為所述可用標識的電子票券。   在本說明書實施例中,伺服器在儲存的各電子票券中,確定標記為所述發送週期對應的可用標識的電子票券。可見,唯有標記為當前發送週期對應的可用標識的電子票券才能夠在當前發送週期內被發送。   此處需要說明的是,在第一個發送週期開始之前,即初始化時,伺服器可以將每個電子票券的標記設置為第一個發送週期對應的可用標識。   S106:從確定出的電子票券中選擇電子票券發送給所述使用者,並修改選擇的電子票券的標記。   在本說明書實施例中,伺服器可以從標記為所述發送週期對應的可用標識的電子票券中選擇至少一個電子票券發送給所述使用者,並修改被發送的電子票券的標記,使修改後的標記不是所述發送週期(也就是當前發送週期)對應的可用標識,且是後續的發送週期對應的可用標識。   如圖1所示的發送電子票券的方法,一方面,由於在當前發送週期內,每個被發送的電子票券的標記都會被修改,修改後的標記不是當前發送週期對應的可用標識,而唯有標記為當前發送週期對應的可用標識的電子票券才能夠在當前發送週期內被發送,因此,在當前發送週期內,同一個電子票券不會被重複發送。另一方面,在當前發送週期內,針對每個被發送的電子票券,修改後的該電子票券的標記是後續的發送週期對應的可用標識,因此,伺服器可以在各發送週期內重複使用各電子票券,而無需在每個發送週期結束後都重置各電子票券的標記或重新產生各電子票券。   以下針對發送週期對應的可用標識,進行具體說明。 實例一   可以針對相鄰的兩個發送週期,將第一個發送週期對應的可用標識設置為T,在第一個發送週期內,未被發送的電子票券的標記為T,被發送的電子票券的標記被修改為F;將第二個發送週期對應的可用標識設置為F,在第二個發送週期內,未被發送的電子票券的標記為F,被發送的電子票券的標記被修改為T。當然,也可以將第一個發送週期對應的可用標識設置為1,將第二個發送週期對應的可用標識設置為0。總之,針對相鄰的兩個發送週期,第一個發送週期內被發送的電子票券的標記為第二個發送週期對應的可用標識,第二個發送週期內被發送的電子票券的標記為第一個發送週期對應的可用標識,如圖2所示。 實例二   一般而言,發送週期具有先後順序,伺服器通過對各發送週期進行編號。此種情況下,倘若各發送週期的編號按各發送週期的先後順序依次遞增,伺服器可以將小於所述發送週期的編號的每個數值確定為所述發送週期對應的可用標識。如此一來,在步驟S106中,可以針對被選擇發送的每個電子票券,將不小於當前發送週期的編號且小於下一個發送週期的編號的任一數值,作為修改後的該電子票券的標記。   例如,發送週期的編號為20170720,那麼編號為20170720的發送週期對應的可用標識可以是小於20170720的每個數值,-10000、0.5、30等數值皆可。因此,只要某個電子票券的標記為小於20170720的數值,就可以在編號為20170720的發送週期內被發送。該電子票券被發送後,倘若下一個發送週期的編號為20170820,那麼被修改後該電子票券的標記X,滿足條件20170820>X≥20170720即可。 表1   假設當前發送週期編號為20170720,下一個發送週期編號為20170820,表1中列舉了各電子票券的標記,可見,在當前發送週期內,各電子票券都可以被選擇發送,電子票券一經發送,其標記即被修改,在各電子票券都被發送完畢後,各電子票券的標記可以如表2所示,每個電子票券的標記為不小於20170720且小於20170820的數值。 表2   此外,還需要說明的是,在一個發送週期內,可能存在所有電子票券未被發放完畢,即有的電子票券未被發送的情況。這種情況下,未被發送的電子票券的標記也未被修改,在本例中,由於各發送週期的編號依次遞增,而每個發送週期對應的可用標識都是小於該發送週期的編號的任一數值,因此,上一個發送週期對應的可用標識一定是後續的所有發送週期對應的可用標識。也就是說,即使某個電子票券在上一個發送週期內未被發送,該電子票券的標記未被修改,該電子票券的標記也是下一個發送週期對應的可用標識。   另外,在本說明書實施例中,當確定出標記為當前發送週期對應的可用標識的電子票券後,伺服器可以從確定出的各電子票券中隨機選擇電子票券發送給使用者。具體而言,伺服器可以預先針對儲存的每個電子票券,產生該電子票券對應的亂數,在步驟S106中,可以根據確定出的各電子票券分別對應的亂數的大小順序,對確定出的各電子票券進行排序;在排序後的電子票券中選擇前N個電子票券發送給所述使用者,N為大於0的自然數。   此處值得強調的是,可以在每個發送週期結束後,重新產生每個電子票券對應的亂數,也可以在一個發送週期內,針對每個電子票券,若該電子票券被發放,則重新產生該電子票券對應的亂數。如此一來,就可以實現在每個發送週期內,隨機選擇電子票券發送給使用者。   另外,實際應用中,在步驟S100處,伺服器可能同時接到多個使用者發送的領取請求。具體而言,伺服器可以將一個較短的時間間隔(如200毫秒)內接收到的多個領取請求視為同時接收到的領取請求。在步驟S102處,伺服器根據任一領取請求,確定該領取請求對應的發送週期,作為這多個領取請求對應的發送週期,並確定所述發送週期對應的可用標識。在步驟S104處,確定出標記為所述可用標識的電子票券。   在步驟S106處,當通過確定的各電子票券分別對應的亂數的大小順序,由小到大依次選擇電子票券發送時,倘若伺服器同時接收到M個使用者發送的領取請求,那麼伺服器可以依次選擇M個電子票券,並將這M個電子票券分別發送給M個使用者。通過這種方式,可以避免伺服器根據這M個使用者發送的領取請求,創設M個執行緒,同時嘗試鎖定確定的各電子票券中亂數最小的電子票券,從而導致執行緒阻塞。   基於圖1所示的發送電子票券的方法,本說明書實施例還對應提供了一種發送電子票券的裝置,如圖3所示,包括:   接收模組301,接收使用者發送的領取請求;   第一確定模組302,根據所述領取請求,確定所述領取請求對應的發送週期,並確定所述發送週期對應的可用標識;   第二確定模組303,從儲存的各電子票券中,確定出標記為所述可用標識的電子票券;   發送修改模組304,從確定出的電子票券中選擇電子票券發送給所述使用者,並修改選擇的電子票券的標記;修改後的標記不是所述發送週期對應的可用標識,且是後續的發送週期對應的可用標識。   所述第一確定模組302,將小於所述發送週期的編號的每個數值確定為所述發送週期對應的可用標識。   所述發送修改模組304,從確定出的電子票券中隨機選擇電子票券發送給使用者。   所述裝置還包括:預處理模組305,預先針對儲存的每個電子票券,產生該電子票券對應的亂數;   所述發送修改模組304,根據確定出的各電子票券分別對應的亂數的大小順序,對確定出的各電子票券進行排序;在排序後的電子票券中選擇前N個電子票券發送給所述使用者,其中,N為大於0的自然數。   各發送週期的編號按各發送週期的先後順序依次遞增;   所述發送修改模組304,針對選擇的每個電子票券,將不小於當前發送週期的編號且小於下一個發送週期的編號的任一數值,作為修改後的該電子票券的標記。   所述電子票券為電子獎券。   基於圖1所示的發送電子票券的方法,本說明書實施例還對應提供了一種電子票券發送設備,如圖4所示,該設備包括一個或多個處理器及記憶體,所述記憶體儲存有程式,並且被配置成由所述一個或多個處理器執行以下步驟:   接收使用者發送的領取請求;   根據所述領取請求,確定所述領取請求對應的發送週期,並確定所述發送週期對應的可用標識;   從儲存的各電子票券中,確定出標記為所述可用標識的電子票券;   從確定出的電子票券中選擇電子票券發送給所述使用者,並修改選擇的電子票券的標記;修改後的標記不是所述發送週期對應的可用標識,且是後續的發送週期對應的可用標識。   本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於圖3所示的電子票券發送設備而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。   在20世紀90年代,對於一個技術的改進可以很明顯地區分是硬體上的改進(例如,對二極體、電晶體、開關等電路結構的改進)還是軟體上的改進(對於方法流程的改進)。然而,隨著技術的發展,當今的很多方法流程的改進已經可以視為硬體電路結構的直接改進。設計人員幾乎都通過將改進的方法流程程式設計到硬體電路中來得到相應的硬體電路結構。因此,不能說一個方法流程的改進就不能用硬體實體模組來實現。例如,可程式設計邏輯裝置(Programmable Logic Device,PLD)(例如現場可程式設計閘陣列(Field Programmable Gate Array,FPGA))就是這樣一種積體電路,其邏輯功能由使用者對器件程式設計來確定。由設計人員自行程式設計來把一個數位系統“整合”在一片PLD上,而不需要請晶片製造廠商來設計和製作專用的積體電路晶片。而且,如今,取代手工地製作積體電路晶片,這種程式設計也多改用“邏輯編譯器(logic compiler)”軟體來實現,它與程式開發撰寫時所用的軟體編譯器相類似,而要編譯之前的原始碼也得用特定的程式設計語言來撰寫,此稱之為硬體描述語言(Hardware Description Language,HDL),而HDL也並非僅有一種,而是有許多種,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)與Verilog。在該技術領域中具有通常知識者也應該清楚,只需要將方法流程用上述幾種硬體描述語言稍作邏輯程式設計並程式設計到積體電路中,就可以很容易得到實現該邏輯方法流程的硬體電路。   控制器可以按任何適當的方式實現,例如,控制器可以採取例如微處理器或處理器以及儲存可由該(微)處理器執行的電腦可讀程式碼(例如軟體或韌體)的電腦可讀媒體、邏輯閘、開關、專用積體電路(Application Specific Integrated Circuit,ASIC)、可程式設計邏輯控制器和嵌入微控制器的形式,控制器的例子包括但不限於以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,記憶體控制器還可以被實現為記憶體的控制邏輯的一部分。在該技術領域中具有通常知識者也知道,除了以純電腦可讀程式碼方式實現控制器以外,完全可以通過將方法步驟進行邏輯程式設計來使得控制器以邏輯閘、開關、專用積體電路、可程式設計邏輯控制器和嵌入微控制器等的形式來實現相同功能。因此這種控制器可以被認為是一種硬體部件,而對其內包括的用於實現各種功能的裝置也可以視為硬體部件內的結構。或者甚至,可以將用於實現各種功能的裝置視為既可以是實現方法的軟體模組又可以是硬體部件內的結構。   上述實施例闡明的系統、裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦。具體的,電腦例如可以為個人電腦、膝上型電腦、蜂巢式電話、相機電話、智慧型電話、個人數位助理、媒體播放器、導航設備、電子郵件設備、遊戲主機、平板電腦、可穿戴設備或者這些設備中的任何設備的組合。   為了描述的方便,描述以上裝置時以功能分為各種單元分別描述。當然,在實施本發明時可以把各單元的功能在同一個或多個軟體和/或硬體中實現。   在該領域內的具有通常知識者應明白,本發明的實施例可提供為方法、系統、或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。   本發明是參照根據本發明實施例的方法、設備(系統)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一流程和/或方塊、以及流程圖和/或方塊圖中的流程和/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式設計資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式設計資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的裝置。   這些電腦程式指令也可儲存在能引導電腦或其他可程式設計資料處理設備以特定方式工作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能。   這些電腦程式指令也可裝載到電腦或其他可程式設計資料處理設備上,使得在電腦或其他可程式設計設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式設計設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的步驟。   在一個典型的配置中,計算設備包括一個或多個處理器(CPU)、輸入/輸出介面、網路介面和內部記憶體。   內部記憶體可能包括電腦可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非揮發性內部記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。內部記憶體是電腦可讀媒體的示例。   電腦可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可抺除可程式設計唯讀記憶體(EEPROM)、快閃記憶體或其他內部記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶、磁帶磁碟儲存或其他磁性儲存裝置或任何其他非傳輸媒體,可用於儲存可以被計算設備存取的資訊。按照本文中的界定,電腦可讀媒體不包括暫態媒體(transitory media),如調變的資料訊號和載波。   還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。   在該技術領域中具有通常知識者應明白,本發明的實施例可提供為方法、系統或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。   本發明可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的常式、程式、物件、元件、資料結構等等。也可以在分散式運算環境中實踐本發明,在這些分散式運算環境中,由通過通信網路而被連接的遠端處理設備來執行任務。在分散式運算環境中,程式模組可以位於包括儲存裝置在內的本地和遠端電腦儲存媒體中。   以上所述僅為本發明的實施例而已,並不用於限制本發明。對在該技術領域中具有通常知識者而言,本發明可以有各種更改和變化。凡在本發明的精神和原理之內所作的任何修改、等同替換、改進等,均應包含在本發明的申請專利範圍的範疇之內。As described in the prior art, in order to ensure that each electronic ticket sent to the user is unique each time within a transmission cycle, the existing method of sending electronic tickets adopts a method of marking each electronic ticket, for example, Mark the unsent electronic ticket as T and the sent electronic ticket as F, so that the electronic ticket marked as F will not be sent again. However, using this marking method will lead to excessive server resources. For example, assuming that in the first sending cycle, the server has sent 100 electronic tickets, and the marks of these 100 electronic tickets have been changed from T to F, then in the next sending cycle, due to the servo The device will only choose to send the electronic tickets marked T, and these 100 electronic tickets marked F cannot be sent. Therefore, in the existing method of sending electronic tickets, after the end of each sending cycle, it is necessary to reset the mark of each electronic ticket or regenerate each electronic ticket marked T, which will consume too much server Resources, affect the efficiency of the server to send electronic tickets. The core idea of one or more embodiments of this specification is to set the available identification corresponding to the sending cycle for each sending cycle, and in each sending cycle, the mark of the unsent electronic ticket is the current sending cycle Corresponding available identification, and the mark of the sent electronic ticket will be modified. The modified mark is not the available identification corresponding to the current sending cycle, but the available identification corresponding to the subsequent sending cycle. By executing the above-mentioned sending rules, the server can eliminate the need to reset the mark of each electronic ticket after the end of each sending cycle, and does not need to regenerate each electronic ticket marked with T. In order to enable those familiar with the technical field to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present specification will be described clearly and completely in conjunction with the drawings in one or more embodiments of the present specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all the embodiments. Based on the embodiments of the present specification, all other embodiments obtained by those with ordinary knowledge in the technical field without making creative work shall fall within the protection scope of the present invention. The technical solutions provided by the embodiments of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a flowchart of a step value setting method provided by an embodiment of this specification, including the following steps: S100: Receive a pickup request sent by a user. In the illustrated embodiment, the server may receive a request for electronic ticket receipt sent by a user through a communication device (a computer with internet access, a mobile phone, etc.), thereby triggering the operation of sending the electronic ticket to the user. Among them, each electronic ticket is generated and stored by the server. The electronic ticket may specifically be an electronic lottery ticket, an electronic ticket, an electronic password, or the like. S102: Determine a sending cycle corresponding to the receiving request according to the receiving request, and determine an available identifier corresponding to the sending cycle. In the embodiment of the present specification, the server may determine the transmission cycle corresponding to the collection request according to the time when the user included in the collection request sends the collection request, that is, determine the current transmission cycle. In the scenario of one or more embodiments described herein, the server periodically sends electronic tickets, and within a sending cycle, the electronic tickets received by each user are different. In addition, the collection request may also include a time specified by the user. In this case, the transmission cycle corresponding to the collection request determined by the server is not necessarily the current transmission cycle, but may be other transmissions specified by the user. In the cycle, the server can wait for the other transmission cycles specified by the user to start and then execute the subsequent steps S104-S106. In short, the server can determine the timing when the user wants to receive the electronic ticket according to the collection request sent by the user, so as to send the electronic ticket to the user within the corresponding transmission cycle. After the server determines the sending period corresponding to the receiving request, it may continue to determine the available identifier corresponding to the sending period. It should be noted here that the server may set the available identifier corresponding to the transmission cycle for each transmission cycle in advance. There can be more than one available identifier corresponding to a transmission cycle, and the available identifier can be a numeric value, or it can be a text or other symbol. The available identifiers corresponding to the transmission cycles are different. S104: From each stored electronic ticket, determine the electronic ticket marked as the available identifier. In the embodiment of the present specification, the server determines, among each stored electronic ticket, an electronic ticket marked as an available identifier corresponding to the sending cycle. It can be seen that only electronic tickets marked as available identifiers corresponding to the current sending cycle can be sent within the current sending cycle. It should be noted here that before the start of the first sending cycle, that is, during initialization, the server may set the mark of each electronic ticket to the available identification corresponding to the first sending cycle. S106: Select an electronic ticket from the determined electronic tickets and send it to the user, and modify the mark of the selected electronic ticket. In the embodiment of the present specification, the server may select at least one electronic ticket from the electronic tickets marked as available identifiers corresponding to the sending period to send to the user, and modify the mark of the sent electronic ticket, The modified mark is not an available identifier corresponding to the transmission cycle (that is, the current transmission cycle), but also an available identifier corresponding to the subsequent transmission cycle. As shown in FIG. 1, the method of sending electronic tickets, on the one hand, since the mark of each sent electronic ticket will be modified in the current sending cycle, the modified mark is not an available identifier corresponding to the current sending cycle. Only the electronic tickets marked as available identifiers corresponding to the current sending cycle can be sent in the current sending cycle. Therefore, in the current sending cycle, the same electronic ticket will not be sent repeatedly. On the other hand, in the current sending cycle, for each electronic ticket that is sent, the modified mark of the electronic ticket is an available identifier corresponding to the subsequent sending cycle, so the server can repeat within each sending cycle Use each electronic ticket without having to reset the mark of each electronic ticket or regenerate each electronic ticket after the end of each sending cycle. The following is a detailed description of the available identifiers corresponding to the sending cycle. Example 1: For two adjacent sending cycles, the available identifier corresponding to the first sending cycle is set to T. In the first sending cycle, the unsent electronic ticket is marked as T, the sent electronic The mark of the ticket was modified to F; set the available identifier corresponding to the second sending cycle to F. During the second sending cycle, the mark of the unsent electronic ticket is F, and the mark of the sent electronic ticket The mark is modified to T. Of course, it is also possible to set the available identifier corresponding to the first transmission cycle to 1, and the available identifier corresponding to the second transmission cycle to 0. In short, for the two adjacent sending cycles, the mark of the electronic ticket sent in the first sending cycle is the available identifier corresponding to the second sending cycle, and the mark of the electronic ticket sent in the second sending cycle It is the available identifier corresponding to the first sending cycle, as shown in Figure 2. Example 2 Generally speaking, the sending cycles have a sequence, and the server numbers each sending cycle. In this case, if the number of each transmission cycle is sequentially increased in the order of each transmission cycle, the server may determine each value smaller than the number of the transmission cycle as an available identifier corresponding to the transmission cycle. In this way, in step S106, for each electronic ticket selected to be sent, any value not less than the number of the current sending cycle and less than the number of the next sending cycle can be used as the modified electronic ticket Mark. For example, if the number of the transmission cycle is 20170720, the available identifier corresponding to the transmission cycle of 20170720 may be each value less than 20170720, and values such as -10000, 0.5, and 30 may be used. Therefore, as long as the mark of an electronic ticket is less than 20170720, it can be sent within the sending period of 20170720. After the electronic ticket is sent, if the number of the next sending cycle is 20170820, then the modified label X of the electronic ticket can satisfy the condition 20170820> X≥20170720. Table 1 Suppose that the current sending cycle number is 20170720 and the next sending cycle number is 20170820. Table 1 lists the tags of each electronic ticket. It can be seen that in the current sending cycle, each electronic ticket can be selected to be sent. Once the voucher is sent, its mark is modified. After each electronic ticket is sent, the mark of each electronic ticket can be as shown in Table 2. The mark of each electronic ticket is not less than 20170720 and less than 20170820 . Table 2 In addition, it should be noted that, in a sending cycle, there may be cases where all electronic tickets have not been issued, that is, some electronic tickets have not been sent. In this case, the mark of the unsent electronic ticket has not been modified. In this example, since the number of each sending cycle is incremented in turn, and the available identifier corresponding to each sending cycle is less than the number of the sending cycle Any value of, therefore, the available identification corresponding to the previous transmission cycle must be the available identification corresponding to all subsequent transmission cycles. That is to say, even if an electronic ticket has not been sent in the previous sending cycle, and the mark of the electronic ticket has not been modified, the mark of the electronic ticket is also an available identifier corresponding to the next sending cycle. In addition, in the embodiment of the present specification, when an electronic ticket marked as an available identifier corresponding to the current sending cycle is determined, the server may randomly select an electronic ticket from the determined electronic tickets and send it to the user. Specifically, the server may generate a random number corresponding to the electronic ticket for each stored electronic ticket in advance. In step S106, the order of the random number corresponding to each determined electronic ticket may be determined according to Sort the determined electronic tickets; select the first N electronic tickets from the sorted electronic tickets and send them to the user, where N is a natural number greater than 0. It is worth emphasizing here that the random number corresponding to each electronic ticket can be regenerated after the end of each sending cycle, or for each electronic ticket within a sending cycle if the electronic ticket is issued , The random number corresponding to the electronic ticket is regenerated. In this way, it is possible to randomly select electronic tickets to be sent to users within each sending cycle. In addition, in practical applications, at step S100, the server may simultaneously receive a collection request sent by multiple users. Specifically, the server may treat multiple pickup requests received within a short time interval (such as 200 milliseconds) as simultaneous pickup requests. At step S102, the server determines the transmission cycle corresponding to the collection request according to any collection request as the transmission cycle corresponding to the multiple collection requests, and determines the available identifier corresponding to the transmission cycle. At step S104, the electronic ticket marked as the available identification is determined. At step S106, when the electronic tickets are sequentially selected from small to large according to the order of the random numbers corresponding to the determined electronic tickets, if the server receives the collection requests sent by M users at the same time, then The server may select M electronic tickets in sequence and send the M electronic tickets to M users respectively. In this way, it is possible to prevent the server from creating M threads based on the pick-up requests sent by the M users, and at the same time trying to lock the electronic tickets with the smallest random number among the determined electronic tickets, thereby causing thread blocking. Based on the method for sending electronic tickets shown in FIG. 1, the embodiment of the present specification also correspondingly provides an apparatus for sending electronic tickets. As shown in FIG. 3, it includes: a receiving module 301, which receives a pickup request sent by a user; The first determining module 302 determines the sending cycle corresponding to the receiving request according to the receiving request, and determines the available identification corresponding to the sending cycle; the second determining module 303, from the stored electronic tickets, Determine the electronic ticket marked as the available identifier; send a modification module 304, select and send the electronic ticket from the determined electronic ticket to the user, and modify the mark of the selected electronic ticket; after modification The mark of is not the available identifier corresponding to the sending period, and is the available identifier corresponding to the following sending period. The first determining module 302 determines each value smaller than the number of the transmission period as an available identifier corresponding to the transmission period. The sending modification module 304 randomly selects electronic tickets from the determined electronic tickets and sends them to the user. The device further includes: a pre-processing module 305, which generates a random number corresponding to each electronic ticket in advance for each stored electronic ticket; the sending modification module 304 corresponds to each determined electronic ticket according to The order of the random numbers of the numbers sorts the determined electronic tickets; the first N electronic tickets in the sorted electronic tickets are selected and sent to the user, where N is a natural number greater than 0. The number of each transmission cycle increases in order according to the order of each transmission cycle; the transmission modification module 304, for each selected electronic ticket, will be no less than the number of the current transmission cycle and less than the number of the next transmission cycle A numerical value is used as the modified mark of the electronic ticket. The electronic ticket is an electronic lottery ticket. Based on the method for sending electronic tickets shown in FIG. 1, an embodiment of this specification also correspondingly provides an electronic ticket sending device. As shown in FIG. 4, the device includes one or more processors and a memory, and the memory The program is stored in the body, and is configured to be executed by the one or more processors to receive the receiving request sent by the user; according to the receiving request, determine the sending cycle corresponding to the receiving request, and determine the The available identifier corresponding to the sending cycle; from each stored electronic ticket, determine the electronic ticket marked as the available identifier; select the electronic ticket from the determined electronic tickets to send to the user, and modify The mark of the selected electronic ticket; the modified mark is not an available mark corresponding to the sending cycle, and is an available mark corresponding to the subsequent sending cycle. The embodiments in this specification are described in a progressive manner. The same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the electronic ticket sending device shown in FIG. 3, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method embodiment. In the 1990s, the improvement of a technology can be clearly distinguished from the improvement of hardware (for example, the improvement of the circuit structure of diodes, transistors, switches, etc.) or the improvement of software (for the process flow Improve). However, with the development of technology, the improvement of many methods and processes can be regarded as a direct improvement of the hardware circuit structure. Designers almost get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method and process cannot be realized by hardware physical modules. For example, a programmable logic device (Programmable Logic Device, PLD) (such as a field programmable gate array (Field Programmable Gate Array, FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device . It is up to the designer to program a digital system to “integrate” a PLD without having to ask a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, instead of manually making integrated circuit chips, this kind of programming is also implemented with "logic compiler" software, which is similar to the software compiler used when writing programs. The source code before compilation must also be written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), and HDL is not only one, but there are many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those with ordinary knowledge in this technical field should also understand that it is easy to get the logic method flow by simply programming the method flow with the above hardware description languages and programming it into the integrated circuit. Hardware circuit. The controller can be implemented in any suitable way, for example, the controller can take, for example, a microprocessor or processor and a computer-readable program code (such as software or firmware) that can be executed by the (micro) processor Media, logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those with ordinary knowledge in this technical field also know that, in addition to implementing the controller in a purely computer-readable program code, the logic steps of the method steps can be used to make the controller use logic gates, switches, special integrated circuits, Logic controllers and embedded microcontrollers can be programmed to achieve the same function. Therefore, such a controller can be regarded as a hardware component, and the device for implementing various functions included therein can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module of an implementation method and a structure within a hardware component. The system, device, module or unit explained in the above embodiments may be implemented by a computer chip or entity, or by a product with a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, and a wearable device Or any combination of these devices. For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing the present invention, the functions of each unit can be implemented in one or more software and / or hardware. Those with ordinary knowledge in this field should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of computer program products implemented on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer usable program code . The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram and a combination of the flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can 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 that allows instructions executed by the processor of the computer or other programmable data processing device Generate means for implementing the functions specified in a block or blocks of a flowchart or a flow and / or a block diagram. These computer program instructions can also be stored in a computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including a command device The instruction device implements the functions specified in one block or multiple blocks in one flow or multiple flows in the flowchart and / or one block in the block diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps can be performed on the computer or other programmable device to generate computer-implemented processing, and thus on the computer or other programmable device The instructions executed on the provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and / or block diagrams. In a typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and internal memory. Internal memory may include non-permanent memory, random access memory (RAM) and / or non-volatile internal memory in computer-readable media, such as read-only memory (ROM) or flash memory (Flash RAM). Internal memory is an example of computer-readable media. Computer-readable media, including permanent and non-permanent, removable and non-removable media, can be stored by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), and other types of random access memory (RAM) , ROM, EEPROM, flash memory or other internal memory technologies, CD-ROM, CD-ROM A functional optical disc (DVD) or other optical storage, magnetic tape cassette, magnetic tape storage or other magnetic storage device or any other non-transmission medium can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include transitory media (transitory media), such as modulated data signals and carrier waves. It should also be noted that the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements not only includes those elements, but also includes Other elements not explicitly listed, or include elements inherent to such processes, methods, goods, or equipment. Without more restrictions, the element defined by the sentence "include one ..." does not exclude that there are other identical elements in the process, method, commodity, or equipment that includes the element. Those with ordinary knowledge in this technical field should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of computer program products implemented on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer usable program code . The invention can be described in the general context of computer executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices. The above are only the embodiments of the present invention and are not intended to limit the present invention. For those having ordinary knowledge in this technical field, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the patent application of the present invention.

S100‧‧‧步驟S100‧‧‧Step

S102‧‧‧步驟S102‧‧‧Step

S104‧‧‧步驟S104‧‧‧Step

S106‧‧‧步驟S106‧‧‧Step

301‧‧‧接收模組301‧‧‧Receiving module

302‧‧‧第一確定模組302‧‧‧ First confirmation module

303‧‧‧第二確定模組303‧‧‧ second confirmation module

304‧‧‧發送修改模組304‧‧‧Send modification module

305‧‧‧預處理模組305‧‧‧Pretreatment module

為了更清楚地說明本說明書實施例或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本發明中記載的一些實施例,對在該技術領域中具有通常知識者而言,在不付出創造性勞動性的前提下,還可以根據這些附圖獲得其他的圖式。   圖1是本說明書實施例提供的一種發送電子票券的方法流程圖;   圖2是本說明書實施例中發送週期對應可用標識的示意圖;   圖3是本說明書實施例提供的一種發送電子票券的裝置示意圖;   圖4是本說明書實施例提供的一種電子票券發送設備示意圖。In order to more clearly explain the embodiments of the specification or the technical solutions in the prior art, the following will briefly introduce the drawings used in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only Some embodiments described in the invention, for those with ordinary knowledge in this technical field, can also obtain other drawings based on these drawings without paying any creative labor. FIG. 1 is a flowchart of a method for sending electronic tickets provided by an embodiment of the present specification; FIG. 2 is a schematic diagram of an available identifier corresponding to a sending cycle in the embodiment of the present specification; FIG. 3 is a method of sending an electronic ticket provided by an embodiment of the present specification Device schematic diagram; FIG. 4 is a schematic diagram of an electronic ticket sending device provided by an embodiment of this specification.

Claims (13)

一種發送電子票券的方法,包括:   接收使用者發送的領取請求;   根據該領取請求,確定該領取請求對應的發送週期,並確定該發送週期對應的可用標識;   從儲存的各電子票券中,確定出標記為該可用標識的電子票券;以及   從確定出的電子票券中選擇電子票券發送給該使用者,並修改選擇的電子票券的標記;修改後的標記不是該發送週期對應的可用標識,且是後續的發送週期對應的可用標識。A method for sending electronic tickets, including: Receiving a collection request sent by a user; According to the collection request, determining a transmission cycle corresponding to the collection request, and determining an available identifier corresponding to the transmission cycle; from each stored electronic ticket , Determine the e-ticket marked as the available identifier; and select the e-ticket from the determined e-ticket to send to the user, and modify the mark of the selected e-ticket; the modified mark is not the sending cycle The corresponding available identifier is the available identifier corresponding to the subsequent sending cycle. 根據請求項1所述的方法,確定該發送週期對應的可用標識,具體包括:   將小於該發送週期的編號的每個數值確定為該發送週期對應的可用標識。According to the method described in claim 1, determining the available identifier corresponding to the transmission period specifically includes: determining each value smaller than the number of the transmission period as the available identifier corresponding to the transmission period. 根據請求項1所述的方法,從確定出的電子票券中選擇電子票券發送給使用者,具體包括:   從確定出的電子票券中隨機選擇電子票券發送給使用者。According to the method described in claim 1, selecting an electronic ticket from the determined electronic tickets to send to the user includes: randomly selecting an electronic ticket from the determined electronic tickets to send to the user. 根據請求項3所述的方法,預先針對儲存的每個電子票券,產生該電子票券對應的亂數;   從確定出的電子票券中隨機選擇電子票券發送給該使用者,具體包括:   根據確定出的各電子票券分別對應的亂數的大小順序,對確定出的各電子票券進行排序;以及   在排序後的電子票券中選擇前N個電子票券發送給該使用者,其中,N為大於0的自然數。According to the method described in claim 3, for each stored electronic ticket, a random number corresponding to the electronic ticket is generated in advance; randomly selects the electronic ticket from the determined electronic ticket and sends it to the user, specifically including : Sort the determined electronic tickets according to the order of the random numbers corresponding to the determined electronic tickets; and select the top N electronic tickets from the sorted electronic tickets to send to the user , Where N is a natural number greater than 0. 根據請求項2所述的方法,各發送週期的編號按各發送週期的先後順序依次遞增;   修改選擇的電子票券的標記,具體包括:   針對選擇的每個電子票券,將不小於當前發送週期的編號且小於下一個發送週期的編號的任一數值,作為修改後的該電子票券的標記。According to the method described in claim 2, the number of each sending cycle is incremented according to the order of each sending cycle; Modify the mark of the selected electronic ticket, including: For each selected electronic ticket, it will be no less than the current sending Any value of the period number and less than the number of the next sending period is used as the mark of the modified electronic ticket. 根據請求項1所述的方法,該電子票券為電子獎券。According to the method described in claim 1, the electronic ticket is an electronic lottery ticket. 一種發送電子票券的裝置,包括:   接收模組,接收使用者發送的領取請求;   第一確定模組,根據該領取請求,確定該領取請求對應的發送週期,並確定該發送週期對應的可用標識;   第二確定模組,從儲存的各電子票券中,確定出標記為該可用標識的電子票券;以及   發送修改模組,從確定出的電子票券中選擇電子票券發送給該使用者,並修改選擇的電子票券的標記;修改後的標記不是該發送週期對應的可用標識,且是後續的發送週期對應的可用標識。A device for sending electronic tickets includes: a receiving module to receive a pick-up request sent by a user; a first determining module, according to the pick-up request, determining a sending cycle corresponding to the pick-up request, and determining the availability corresponding to the sending cycle Identification; second determination module, from each stored electronic ticket, to determine the electronic ticket marked as the available identification; and send modification module, select the electronic ticket from the determined electronic ticket to send to the The user, and modify the mark of the selected electronic ticket; the modified mark is not the available mark corresponding to the sending cycle, but the available mark corresponding to the subsequent sending cycle. 根據請求項7所述的裝置,該第一確定模組,將小於該發送週期的編號的每個數值確定為該發送週期對應的可用標識。According to the device described in claim 7, the first determination module determines each value smaller than the number of the transmission period as an available identifier corresponding to the transmission period. 根據請求項7所述的裝置,該發送修改模組,從確定出的電子票券中隨機選擇電子票券發送給使用者。According to the device described in claim 7, the sending modification module randomly selects electronic tickets from the determined electronic tickets and sends them to the user. 根據請求項9所述的裝置,該裝置還包括:   預處理模組,預先針對儲存的每個電子票券,產生該電子票券對應的亂數;以及   該發送修改模組,根據確定出的各電子票券分別對應的亂數的大小順序,對確定出的各電子票券進行排序;在排序後的電子票券中選擇前N個電子票券發送給該使用者,其中,N為大於0的自然數。The device according to claim 9, the device further comprising: a pre-processing module that generates a random number corresponding to the electronic ticket for each stored electronic ticket in advance; and the sending modification module, based on the determined The order of the random numbers corresponding to each electronic ticket is to sort the determined electronic tickets; select the first N electronic tickets from the sorted electronic tickets to send to the user, where N is greater than Natural number of 0. 根據請求項8所述的裝置,各發送週期的編號按各發送週期的先後順序依次遞增;   該發送修改模組,針對選擇的每個電子票券,將不小於當前發送週期的編號且小於下一個發送週期的編號的任一數值,作為修改後的該電子票券的標記。According to the device described in claim 8, the number of each sending cycle is incremented in order according to the order of each sending cycle; The sending modification module will be no less than the number of the current sending cycle and less than Any value of the number of a sending cycle is used as the mark of the modified electronic ticket. 根據請求項7所述的裝置,該電子票券為電子獎券。According to the device described in claim 7, the electronic ticket is an electronic lottery ticket. 一種電子票券發送設備,包括一個或多個處理器及記憶體,該記憶體儲存有程式,並且被配置成由該一個或多個處理器執行以下步驟:   接收使用者發送的領取請求;   根據該領取請求,確定該領取請求對應的發送週期,並確定該發送週期對應的可用標識;   從儲存的各電子票券中,確定出標記為該可用標識的電子票券;以及   從確定出的電子票券中選擇電子票券發送給該使用者,並修改選擇的電子票券的標記;修改後的標記不是該發送週期對應的可用標識,且是後續的發送週期對應的可用標識。An electronic ticket sending device includes one or more processors and a memory, the memory stores a program, and is configured to be executed by the one or more processors to perform the following steps: Receive a pickup request sent by a user; according to The pickup request, determine the sending cycle corresponding to the pickup request, and determine the available identification corresponding to the sending cycle; from each stored electronic ticket, determine the electronic ticket marked as the available identification; and from the determined electronic In the ticket, select the electronic ticket to send to the user, and modify the mark of the selected electronic ticket; the modified mark is not the available mark corresponding to the sending cycle, but the available mark corresponding to the subsequent sending cycle.
TW107117183A 2017-07-24 2018-05-21 Method and device for sending electronic tickets TWI707289B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201710605521.3 2017-07-24
CN201710605521.3A CN107527228B (en) 2017-07-24 2017-07-24 Method and device for sending electronic ticket
??201710605521.3 2017-07-24

Publications (2)

Publication Number Publication Date
TW201909077A true TW201909077A (en) 2019-03-01
TWI707289B TWI707289B (en) 2020-10-11

Family

ID=60679967

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107117183A TWI707289B (en) 2017-07-24 2018-05-21 Method and device for sending electronic tickets

Country Status (3)

Country Link
CN (2) CN111489202B (en)
TW (1) TWI707289B (en)
WO (1) WO2019019957A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111489202B (en) * 2017-07-24 2023-05-23 创新先进技术有限公司 Method and device for sending electronic ticket
CN117591625B (en) * 2024-01-18 2024-04-12 之江实验室 Data storage method and device, storage medium and electronic equipment

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2487875B1 (en) * 2011-02-14 2021-08-25 Quotient Technology Inc. Identifier-based coupon distribution
JP2014527252A (en) * 2011-09-15 2014-10-09 クーポンズドットコム インコーポレイテッド Distribution of digital promotions based on checkout
CN103679504B (en) * 2013-11-15 2017-12-01 北京奇虎科技有限公司 Distribute the method and device of electronic bill
CN103593793A (en) * 2013-11-15 2014-02-19 胡泽民 Advertising box, method for distributing electronic tickets through advertising box and system of method
JP5628463B1 (en) * 2014-03-27 2014-11-19 楽天株式会社 COUPON MANAGEMENT DEVICE, COUPON MANAGEMENT METHOD, PROGRAM, AND RECORDING MEDIUM
CN106156228B (en) * 2015-04-24 2020-01-10 腾讯科技(深圳)有限公司 Resource distribution system, resource distribution method and resource pickup method
CN104966214B (en) * 2015-06-29 2019-11-26 百度在线网络技术(北京)有限公司 A kind of exchange method and device of electronic ticket
CN106487872B (en) * 2015-08-24 2020-03-27 阿里巴巴集团控股有限公司 Method and device for providing discount coupons and method for distributing and receiving virtual resources
JP2018533774A (en) * 2015-10-27 2018-11-15 ベイジン ディディ インフィニティ テクノロジー アンド ディベロップメント カンパニー リミティッド System and method for delivering a message
CN106934646A (en) * 2015-12-31 2017-07-07 阿里巴巴集团控股有限公司 The method and apparatus that electronic coupons are delivered in marketing activity
CN105956879A (en) * 2016-04-29 2016-09-21 北京小米移动软件有限公司 Method, device and system for sending electronic ticket
CN111489202B (en) * 2017-07-24 2023-05-23 创新先进技术有限公司 Method and device for sending electronic ticket

Also Published As

Publication number Publication date
CN107527228B (en) 2020-03-27
TWI707289B (en) 2020-10-11
CN107527228A (en) 2017-12-29
CN111489202B (en) 2023-05-23
WO2019019957A1 (en) 2019-01-31
CN111489202A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
WO2018177250A1 (en) Block chain based data processing method and device
CN111756550B (en) Block chain consensus method and device
TWI680656B (en) Data processing method and equipment based on blockchain
TWI660274B (en) Data processing method and equipment based on blockchain
TWI709933B (en) Virtual card opening method, system, payment system and card issuing system
TWI694342B (en) Data cache method, device and system
CN107392611A (en) A kind of method and device for sending Transaction Information and common recognition checking
WO2019196551A1 (en) Payment process configuration and execution method, apparatus and device
WO2021238996A1 (en) Resource processing method, apparatus and device
TWI700905B (en) Data processing method, device and equipment
CN107578338B (en) Service publishing method, device and equipment
TW201939356A (en) Code-scanning image recognition method, apparatus and device
WO2019047775A1 (en) Method, apparatus and device for processing web application package
TW201918878A (en) Task execution method and apparatus
TWI707289B (en) Method and device for sending electronic tickets
CN109345221A (en) The checking method and device of resource circulation
TWI710993B (en) Business processing method, device and equipment, and storage medium
EP3211541A1 (en) Method and apparatus for determining directory category and automatic categorization method and apparatus
TW201926173A (en) Resource transfer verification method and apparatus, and electronic payment verification method and apparatus
CN111124708B (en) Microservice-oriented batch reasoning method, server and computer readable storage medium
CN107943923B (en) Telegram code database construction method, telegram code identification method and device
CN114201086B (en) Information display method and device
CN107645541B (en) Data storage method and device and server
CN111880922A (en) Processing method, device and equipment for concurrent tasks
CN113011165B (en) Method, device, equipment and medium for identifying blocked keywords