TW202008150A - Method and device for generating serial number - Google Patents

Method and device for generating serial number Download PDF

Info

Publication number
TW202008150A
TW202008150A TW108116549A TW108116549A TW202008150A TW 202008150 A TW202008150 A TW 202008150A TW 108116549 A TW108116549 A TW 108116549A TW 108116549 A TW108116549 A TW 108116549A TW 202008150 A TW202008150 A TW 202008150A
Authority
TW
Taiwan
Prior art keywords
serial number
business
related information
processing
target
Prior art date
Application number
TW108116549A
Other languages
Chinese (zh)
Other versions
TWI728357B (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 TW202008150A publication Critical patent/TW202008150A/en
Application granted granted Critical
Publication of TWI728357B publication Critical patent/TWI728357B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures

Abstract

Embodiments of the present description provide a method and device for generating a serial number. The method comprises: upon receipt of a serial number generation request, obtaining processing related information of a target service, the serial number request carrying an identification of the target service; the processing related information comprising processing time related information of the target service, and service unit related information for processing the target service; and then generating, on the basis of the processing time related information of the target service, and the service unit related information thereof, a serial number corresponding to the target service by the established serial number template.

Description

序列號的生成方法及裝置Method and device for generating serial number

本說明書涉及電腦領域,尤其涉及一種序列號的生成方法及裝置。This specification relates to the computer field, and in particular to a method and device for generating a serial number.

隨著網際網路技術的發展,人們對網際網路的使用越來越普遍。例如,透過網際網路線上辦理業務、透過網際網路線上購物等。為了便於後續對某項業務進行查詢,用戶在使用網際網路購物、辦理業務等時,需要生成針對該項業務的唯一記錄標識,也即序列號。例如,在電商系統中生成的訂單號、在論壇系統中的發帖號以及在支付系統中交易流水號等,這些都可以稱為序列號。 為了便於後續對業務的查詢以及實現對序列號生成的檢測,有必要提出一種技術方案,以便生成業務系統中全域唯一的序列號。With the development of Internet technology, people's use of the Internet is becoming more and more common. For example, online business through the Internet, online shopping through the Internet, etc. In order to facilitate subsequent enquiries on a business, users need to generate a unique record identifier for the business, that is, a serial number, when using the Internet for shopping and handling business. For example, the order number generated in the e-commerce system, the posting number in the forum system, and the transaction serial number in the payment system can all be called serial numbers. In order to facilitate the subsequent query of the business and the detection of the generation of the serial number, it is necessary to propose a technical solution in order to generate a serial number that is unique in the entire domain in the business system.

本說明書實施例的目的是提供一種序列號的生成方法及裝置,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力。 為解決上述技術問題,本說明書實施例是這樣實現的: 本說明書實施例提供了一種序列號的生成方法,包括: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。 本說明書實施例還提供了一種序列號的生成方法,包括: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。 本說明書實施例還提供了一種序列號的生成裝置,包括: 第一獲取模組,在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 第一生成模組,基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。 本說明書實施例還提供了一種序列號的生成裝置,包括: 第二獲取模組,在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 第三生成模組,基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。 本說明書實施例還提供了一種序列號的生成設備,包括: 處理器;以及 被安排成儲存電腦可執行指令的儲存器,所述可執行指令在被執行時使所述處理器: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。 本說明書實施例還提供了一種序列號的生成設備,包括: 處理器;以及 被安排成儲存電腦可執行指令的儲存器,所述可執行指令在被執行時使所述處理器: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。 本說明書實施例還提供了一種儲存媒體,用於儲存電腦可執行指令,所述可執行指令在被執行時實現以下流程: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。 本說明書實施例還提供了一種儲存媒體,用於儲存電腦可執行指令,所述可執行指令在被執行實現以下流程: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。 透過本實施例中的技術方案,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力。The purpose of the embodiments of the present specification is to provide a method and device for generating a serial number. According to the information about the processing time of the business system processing the target business and the relevant information of the business unit processing the target business, the target number is generated according to the pre-established serial number template. The serial number of the business; due to the differences in the processing time-related information of each business and the relevant information of the business unit used, it is possible to generate a serial number that is unique in the business system in the entire domain, which is convenient for subsequent query of the target business; and, The serial number can be generated by accessing the database, which avoids greater pressure on the database's write performance under high concurrency of business requests. To solve the above technical problems, the embodiments of this specification are implemented as follows: The embodiments of the present specification provide a method for generating a serial number, including: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Processing business unit related information of the target business; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template. The embodiment of this specification also provides a method for generating a serial number, including: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Relevant information of the business unit processing the target business; the time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template; wherein the millisecond number is located in the highest bit in the serial number template. An embodiment of this specification also provides a serial number generating device, including: The first acquisition module, after receiving the serial number generation request, acquires processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing the target business Related processing time information and related information of the business unit processing the target business; The first generating module generates a serial number corresponding to the target business based on the established serial number template based on the processing time related information and the business unit related information. An embodiment of this specification also provides a serial number generating device, including: The second acquisition module, after receiving the serial number generation request, acquires the processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing the target business Processing time related information and business unit related information processing the target business; the time related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; The third generation module generates a serial number corresponding to the target business based on the established serial number template based on the processing time related information and the business unit related information; wherein the millisecond number is located in the serial number The highest bit in the template. The embodiment of this specification also provides a serial number generating device, including: Processor; and A memory arranged to store computer executable instructions which, when executed, causes the processor to: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Processing business unit related information of the target business; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template. The embodiment of this specification also provides a serial number generating device, including: Processor; and A memory arranged to store computer executable instructions which, when executed, causes the processor to: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Relevant information of the business unit processing the target business; the time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template; wherein the millisecond number is located in the highest bit in the serial number template. The embodiments of the present specification also provide a storage medium for storing computer executable instructions, and the executable instructions, when executed, implement the following process: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Processing business unit related information of the target business; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template. The embodiments of the present specification also provide a storage medium for storing computer executable instructions. The executable instructions are executed to implement the following processes: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Relevant information of the business unit processing the target business; the time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template; wherein the millisecond number is located in the highest bit in the serial number template. Through the technical solution in this embodiment, according to the processing time related information of the business system to process the target business and the related information of the business unit processing the target business, the serial number for the target business is generated according to the pre-established serial number template; since each item The information related to the processing time of the business and the relevant information of the business unit used are different. Therefore, it is possible to generate a serial number that is globally unique in the business system, which is convenient for subsequent query of the target business; and, it can be generated without accessing the database. The serial number avoids greater pressure on the database's write performance under high concurrency of business requests.

為了使本技術領域的人員更好地理解本說明書中的技術方案,下面將結合本說明書實施例中的圖式,對本說明書實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本說明書一部分實施例,而不是全部的實施例。基於本說明書中的實施例,本領域普通技術人員在沒有作出創造性勞動前提下所獲得的所有其他實施例,都應當屬本說明書保護的範圍。 本說明書實施例的思想在於,在生成目標業務的序列號時,將業務系統處理目標業務的業務處理資訊考慮在內,具體的,可以包括業務系統處理該目標業務的時間相關資訊以及所使用的業務系統的系統相關資訊。由於不同的業務上述處理相關資訊會存在差異,因此可以實現生成的每項業務的序列號是唯一的。基於此,本說明書實施例提供了一種序列號的生成方法、裝置、設備及儲存媒體。下述將分別詳細介紹本說明書實施例所提供的序列號的生成方法、裝置、設備及儲存媒體。 圖1為本說明書實施例所提供的方法的一種具體應用業務系統場景示意圖。在圖1所示的示意圖中,包括多個機房,可以記為機房1、機房2、…、機房N,其中,N為正整數。每個機房可以劃分為多個邏輯單元,每個邏輯單元稱為一個Zone,可以對每個機房中的邏輯單元進行編號,分別記為Zone1、Zone2、…、Zine M,其中,M為正整數。另外,在每個邏輯單元中可以設置有多個伺服器,這些伺服器用於處理業務請求,以及生成每項業務所對應的序列號。每個機房所對應的邏輯單元的數目可以相同,也可以不同;每個邏輯單元所對應的伺服器的數量可以相同,也可以不同。需要說明的是,每個伺服器負責生成該伺服器所接收的業務請求中的業務的序列號。例如,伺服器1接收到業務1的業務請求,則由伺服器1生成業務1所對應的序列號。另外,在圖1所示的示意圖中,每個伺服器上可以設置有多個業務單元,不同的業務單元用於處理不同的業務。例如,針對支付寶系統而言,可以包括花唄、借唄、螞蟻財富、芝麻信用等業務單元。 本說明書實施例所提供的序列號的生成方法則可以應用於如圖1所示的系統中的各個伺服器上。 實施例1 圖2為本說明實施例提供的序列號的生成方法的第一種方法流程圖,圖2所示的方法,至少包括如下步驟: 步驟202,在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,上述序列號生成請求中攜帶有目標業務的標識;上述處理資訊包括目標業務的處理時間相關資訊和處理目標業務的業務單元相關資訊。 本說明書實施例提供的方法的執行主體為設置於伺服器上的序列號的生成裝置。 一般的,在進行業務的處理時,當伺服器接收到業務請求後,在由設置於該伺服器上的響應的業務單元對該業務進行處理的同時,由設置於該伺服器上的序列號的生成裝置生成該業務所對應的序列號。 當序列號的生成裝置接收到序列號生成請求後,需要獲取目標業務的處理相關資訊。具體的,序列號的生成裝置可以從業務系統獲取與該目標業務相關的處理資訊。 在本說明書實施例中,在序列號生成請求中攜帶有目標業務的標識,因此,序列號的生成裝置可以根據目標業務的標識獲取目標業務的處理相關資訊。 其中,上述目標業務的標識可以為目標業務的名稱等。 在本說明書實施例中,上述處理相關資訊至少可以包括目標業務的處理時間相關資訊和處理目標業務的業務單元相關資訊。 具體的,上述處理時間相關資訊包括: 業務單元所在伺服器接收到上述目標業務請求的計時點資訊、該伺服器在上述計時點接收的業務請求中所述目標業務請求所對應的排序號。 例如,該業務單元所在的伺服器在該計時點接收到了5個業務請求,其中,目標業務所對應的請求為伺服器在該計時點所接收到的第三個請求,則目標業務在該業務單元所對應的伺服器在上述計時點接收的業務請求中所屬的序號為3。 需要說明的時,上述計時點可以為伺服器接收到目標業務請求時伺服器當前的時鐘所累計的毫秒數、秒數或者分鐘數等。較佳的,在本說明書實施例中,採用毫秒數。具體的,該毫秒數可以從業務單元所對應業務系統的運行開始算起。 為便於理解,下述將舉例進行說明。 例如,當前毫秒數為業務系統運行的第S個毫秒數,若是在此毫秒內業務單元接收到目標業務請求,且可以確定目標業務請求為業務單元在該毫秒內接收到的第P個業務請求,則可以認為目標業務所對應的毫秒數為S,目標業務請求在第S毫秒內對應的排序號為P,其中,S和P均代表數值。 另外,在本說明書實施例中,上述業務單元相關資訊包括以下資訊中的至少一種: 業務單元的序號、業務單元所在的伺服器序號、業務單元所在的伺服器所屬的邏輯單元序號以及業務單元所在的伺服器所屬的機房序號。 需要說明的是,在本說明書實施例中,業務單元相關資訊可以包括上述資訊中的一種或者多種。 較佳的,為了保證生成的目標業務所對應的序列號為業務處理系統中唯一的業務序列號,上述業務單元相關資訊可以包括上述全部資訊。 在本說明書實施例中,透過業務單元的序號、業務單元所在的伺服器序號、業務單元所在的伺服器所屬的邏輯單元序號以及業務單元所在的伺服器所屬的機房序號可以唯一的確定出處理目標業務的業務單元相關資訊,即不同的業務單元所對應的上述資訊是不同的,因此每個機房下每個邏輯單元下的每個伺服器上的每個業務單元所生成的序列號是不會重複的; 另外,由於處理時間相關資訊中包括業務單元處理目標業務的計時點資訊,因此,在不同的計時點生成的序列號也是不會重複的; 由於處理時間相關資訊中包括伺服器在該計時點接收的業務請求中目標業務請求所對應的排序號,在同一個計時點內每個業務請求所對應的排序號是不同的,因此,在相同的計時點生成的序列號也是不會重複的。 因此,在本說明書實施例中,透過上述處理時間相關資訊和業務單元相關資訊兩者的結合可以唯一的確定出目標單元所對應的序列號。 步驟204,基於上述處理時間相關資訊和業務單元相關資訊,按照建立的序列號模板,生成目標業務所對應的序列號。 具體的,上述計時點資訊位於序列號模板中的最高位; 相應的,在上述步驟204中,基於上述處理時間相關資訊和業務單元相關資訊,按照建立的序列號模板,生成目標業務所對應的序列號,具體包括: 按照序列號模板,將各個對應的取值轉換為設定的格式;將設定格式的各個資訊的取值按照其在序列號模板中的排列位置進行排列,生成目標業務所對應的序列號。 其中,在本說明書實施例中,由於計時得到的計時點的數值是不斷遞增的,因此,將計時點資訊放置在序列號模板的最高位,可以保證業務系統中的序列號是整體遞增的。這樣,可以便於對序列號的生成裝置的維護,並且,可以便於檢查生成的序列號是否出現問題;另外,使得生成的序列號整體遞增,可以提高業務查詢性能。 具體的,在上述序列號模板中儲存有各個資訊所對應的空間、以及各個資訊在序列號中的排列順序。當獲取到上述各個資訊後,則直接將各個資訊轉換為設定的格式並填入序列號模板中即可。 具體的,上述設定的格式可以為阿拉伯數字的形式或者二進制資料的形式等。 例如,在具體實施時,獲取到目標業務所對應的時間點資訊為第5個毫秒,因此,毫秒數為5,但是,在序列號模板中可能該資訊對應的空間為39bit,為了保證整個業務處理系統所生成的序列號的位數相同。因此,可以在5的前面補零,以得到和序列號模板中相同位數的取值。 在本說明書實施例中,為了能夠實現根據序列號模板生成目標業務所對應的序列號。因此,還需要構建序列號模板。 因此,在本說明書實施例中,在接收序列號生成請求之前,該方法還包括如下步驟(1)、步驟(2)和步驟(3); 步驟(1)、確定業務單元所在的業務系統的運行時長以及該業務系統的系統擴展資訊; 步驟(2)、根據上述運行時長以及系統擴展資訊,對序列號模板所對應的空間進行分配; 步驟(3)、按照設定順序將上述運行時長以及系統擴展資訊中的各個資訊進行排序,生成序列號模板。 其中,在上述步驟(1)中,業務系統的運行時長指的是從該業務系統上線開始,假定該業務系統可能的運行時長。 例如,假定該業務系統可能需要運行十年的時間,那麼將十年換算成毫秒可以得出: 十年=365天*24小時*3600秒*1000毫秒≈320*109 毫秒 因此,透過計算可以確定出業務系統的運行時長需要39bit的空間,因此,分配給毫秒數的空間為39bit。 具體的,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及伺服器在單位時間內的業務請求量。 具下述將一一詳細介紹上述各個資訊所對應的空間的具體確定過程。 例如,根據業務發展狀況,計劃未來會增加一些業務單元,但是業務單元的總數目小於120個,即業務單元擴展數量小於120個。因此,可以為業務單元預留7bit的空間。 需要說明的是,7bit=27 =128,因此,為業務單元預留7bit的空間就可以滿足業務單元未來發展的需要。 例如,根據業務發展狀況,所設置的機房的數目未來可能會增加到10-15個,即機房的擴展數量可能為10-15個,因此,需要給機房的數目預留4bit的空間。 一般的,邏輯單元的數目是根據企業的架構來決定的,如果該企業架構沒有邏輯單元,則不需要預留邏輯單元所對應的空間。若是有邏輯單元,則需要給邏輯單元預留空間。 例如,針對螞蟻金服的邏輯資料中心(Logical Data Center,LDC)架構下,有資料邏輯單元(CZone)、用戶邏輯單元(RZone)和全域邏輯單元(GZone)三個邏輯單元,未來可能更多的是精細各個邏輯單元,沒有新增邏輯單元的計劃,因此,可以預留2bit的空間。 另外,每個業務單元最多可以部署在每個機房的每個邏輯單元的256台伺服器上,因此,需要給業務單元預留8bit的空間。 針對每個伺服器在單位時間內接收到的業務請求數目,可以是每個伺服器在每毫秒內接收到的業務請求的數目。例如,針對螞蟻金服,每個伺服器平均每毫秒的業務請求量不會超過5,因此,可以預留3bit的空間。 另外,在本說明書實施例中,還可以預留1bit的預留位作為臨時擴容需要。 透過上述過程生成的序列號模板的一種示意圖如圖3所示,在圖3所示的序列號模板中,將毫秒數對應的空間設置在最高位、其次為業務單元空間、機房空間、邏輯單元空間、伺服器空間、預留空間以及目標業務在毫秒內的排序號所對應空間。 在圖3所示的序列號模板中,毫秒數對應的空間為39bit、業務單元空間為7bit、機房空間為4bit、邏輯單元區間為2bit、伺服器空間為8bit、預留空間為1bit、模板業務在毫秒內的排序號所對應空間為3bit。 當然,圖3中所示的序列號模板中各個資訊的排列順序還可以為其它,圖3並不構成對上述各個資訊的排列順序的限定。 在本說明書實施例中,序列號模板採用64bit的Long類型的數值表徵。 本說明書實施例提供的序列號的生成方法,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力。 實施例2 對應於本說明書中上述實施例1提供的序列號的生成方法,基於相同的思路,本說明書實施例還提供了一種序列號的生成方法,圖4顯示了本說明書實施例所提供的序列號的生成方法的第二種方法流程圖,針對圖4所示的方法,這裡重點介紹與上述實施例1所示方法的不同之處,相同之處可參考上述實施例1,此處不再贅述。圖4所示的方法至少包括如下步驟: 步驟402,在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,該序列號生成請求中攜帶有目標業務的標識;處理相關資訊包括處理目標業務的處理時間相關資訊和處理目標業務的業務單元相關資訊;上述時間相關資訊包括業務單元所在伺服器接收到目標業務請求時所計時的毫秒數。 其中,上述時間相關資訊還包括: 上述伺服器在上述毫秒數內接收的業務請求中上述目標業務請求所對應的排序號; 上述業務單元相關資訊包括以下資訊中的至少一種: 上述業務單元的序號、上述業務單元所在的伺服器序號、上述業務單元所在的伺服器所屬的邏輯單元序號以及上述業務單元所在的伺服器所屬的機房序號。 步驟404,基於上述處理時間相關資訊和業務單元相關資訊,按照建立的序列號模板,生成模板業務所對應的序列號;其中,上述毫秒數位於序列號模板中的最高位。 在本說明書實施例中,透過模板業務的處理時間相關資訊和業務單元相關資訊,生成的目標業務所對應的序列號在業務系統是唯一的;並且,將目標業務所對應的毫秒數放置在序列號模板的最高位,由於隨著時間的增長,毫秒數是一直遞增的,因此,可以使得生成的序列號在業務系統是整體遞增的。 具體的,上述基於上述處理時間相關資訊和業務單元相關資訊,按照建立的序列號模板,生成模板業務所對應的序列號,具體包括: 按照上述序列號模板,將各個上述資訊對應的取值轉換為設定的格式;將設定格式的各個資訊的取值按照其在上述序列號模板中的排列位置進行排列,生成上述目標業務所對應的序列號。 可選的,在採用本說明書實施例提供的方法生成目標業務所對應的序列號之前,需要建立序列號模板。因此,在本說明書實施例中,在接收序列號生成請求之前,該方法還包括: 確定上述業務單元所在的業務系統的運行時長、上述業務系統在上述運行時長內的系統擴展資訊;根據上述運行時長以及系統擴展資訊,對序列號模板所對應的空間進行分配;按照設定順序將上述運行時長以及上述系統擴展資訊中的各個資訊進行排列,生成上述序列號模板。 具體的,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及所述伺服器在單位時間內的業務請求量。 另外,在本說明書實施例中,上述序列號模板採用64bit的Long類型的數值表徵。 為便於理解本說明書實施例提供的序列號的生成方法,下述將結合具體實施例進行說明。 例如,用戶使用支付寶進行轉帳,當伺服器接收到用戶提交的轉帳請求後,一方面需要處理用戶的轉帳請求,另一方面需要生成針對該轉帳業務的序列號。基於該應用場景,圖5顯示了本說明書實施例提供的序列號的生成方法的第三種方法流程圖,圖5所示的方法,至少包括如下步驟: 步驟502,伺服器接收用戶提交的轉帳業務處理請求。 步驟504,伺服器向序列號生成器發送序列號生成請求。 其中,在上述請求中攜帶有上述轉帳業務的業務標識;上述序列號生成器設置於伺服器上。 步驟506,序列號生成器接收序列號生成請求。 步驟508,從支付寶系統中獲取伺服器接收到上述轉帳請求時所對應的毫秒數以及該轉帳請求在該毫秒內伺服器接收到的業務請求的排列號。 步驟510,從支付寶系統獲取處理該轉帳業務的業務單元序號、業務單元所在伺服器的序號、業務單元所在伺服器所屬的機房序號、業務單元所在伺服器所在的邏輯單元序號。 步驟512,將上述各個資訊所對應的取值轉換為設定的格式。 步驟514,將轉化後的各個資訊所對應的取值填入建立的序列號模板中的相應位置處;其中,轉帳請求所對應的毫秒數位於序列號模板的最高位。 圖5所對應實施例中各個步驟的具體實現過程與圖1-圖4所對應方法實施例中各個步驟的具體實現過程相同,具體可參考圖1-圖4所對應方法實施例,此處不再贅述。 本說明書實施例提供的序列號的生成方法,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力;另外,將毫秒數放置在序列號模板的最高位,可以保證生成的序列號成整體遞增趨勢。 實施例3 對應於本說明書實施例1所提供的序列號的生成方法,基於相同的思路,本說明書實施例還提供了一種序列號的生成裝置,用於執行本說明書實施例1所提供的序列號的生成方法,圖6為本說明書實施例所提供的序列號的生成裝置的第一種模組組成示意圖,圖6所示的裝置,包括: 第一獲取模組601,用於在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,上述序列號生成請求中攜帶有目標業務的標識;上述處理相關資訊包括處理上述目標業務的處理時間相關資訊和處理上述目標業務的業務單元相關資訊; 第一生成模組602,用於基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號。 可選的,上述時間相關資訊包括: 上述業務單元所在伺服器接收到上述目標業務請求的計時點資訊、上述伺服器在上述計時點接收的業務請求中上述目標業務請求所對應的排序號; 上述業務單元相關資訊包括以下資訊中的至少一種: 上述業務單元的序號、上述業務單元所在的伺服器序號、上述業務單元所在的伺服器所屬的邏輯單元序號以及上述業務單元所在的伺服器所屬的機房序號。 可選的,上述計時點資訊位於序列號模板中的最高位; 相應的,上述第一生成模組602,具體用於: 按照上述序列號模板,將各個上述資訊對應的取值轉換為設定的格式;將設定格式的各個資訊的取值按照其在上述序列號模板中的排列位置進行排列,生成上述目標業務所對應的序列號。 可選的,本說明書實施例提供的序列號的生成裝置,還包括: 第一確定模組,確定上述業務單元所在的業務系統的運行時長、上述業務系統在上述運行時長內的系統擴展資訊; 第一分配模組,根據運行時長以及系統擴展資訊,對序列號模板所對應的空間進行分配; 第二生成模組,按照設定順序將上述運行時長以及上述系統擴展資訊中的各個資訊進行排列,生成上述序列號模板。 可選的,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及上述伺服器在單位時間內的業務請求量。 可選的,上述序列號模板採用64bit的Long類型的數值表徵。 本說明書實施例所提供的序列號的生成裝置中各個模組的具體實現步驟,與實施例1中各個方法步驟的具體實現過程相同,可參考實施例1中各個方法步驟的具體實現過程,此處不再贅述。 本說明書實施例所提供的序列號的生成裝置,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力。 實施例4 對應於本說明書實施例2所提供的序列號的生成方法,基於相同的思路,本說明書實施例還提供了一種序列號的生成裝置,用於執行本說明書實施例2所提供的序列號的生成方法,圖7為本說明書實施例所提供的序列號的生成裝置的第二種模組組成示意圖,圖7所示的裝置,包括: 第二獲取模組701,在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,上述序列號生成請求中攜帶有目標業務的標識;上述處理相關資訊包括處理上述目標業務的處理時間相關資訊和處理上述目標業務的業務單元相關資訊;上述時間相關資訊包括上述業務單元所在伺服器接收到上述目標業務請求時所計時的毫秒數; 第三生成模組702,基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號;其中,上述毫秒數位於上述序列號模板中的最高位。 可選的,上述時間相關資訊包括: 上述業務單元所在伺服器接收到上述目標業務請求的計時點資訊、上述伺服器在上述計時點接收的業務請求中上述目標業務請求所對應的排序號; 上述業務單元相關資訊包括以下資訊中的至少一種: 上述業務單元的序號、上述業務單元所在的伺服器序號、上述業務單元所在的伺服器所屬的邏輯單元序號以及上述業務單元所在的伺服器所屬的機房序號。 可選的,上述毫秒數位於上述序列號模板中的最高位; 上述第三生成模組702,具體用於: 按照上述序列號模板,將各個上述資訊對應的取值轉換為設定的格式; 將設定格式的各個資訊的取值按照其在上述序列號模板中的排列位置進行排列,生成上述目標業務所對應的序列號。 可選的,本說明書實施例所提供的裝置,還包括: 第二確定模組,用於確定上述業務單元所在的業務系統的運行時長、上述業務系統在上述運行時長內的系統擴展資訊; 第二分配模組,用於根據運行時長以及系統擴展資訊,對序列號模板所對應的空間進行分配; 第四生成模組,按照設定順序將上述運行時長以及上述系統擴展資訊中的各個資訊進行排列,生成上述序列號模板。 可選的,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及上述伺服器在單位時間內的業務請求量。 可選的,上述序列號模板採用64bit的Long類型的數值表徵。 本說明書實施例所提供的序列號的生成裝置中各個模組的具體實現步驟,與實施例2中各個方法步驟的具體實現過程相同,可參考實施例2中各個方法步驟的具體實現過程,此處不再贅述。 本說明書實施例所提供的序列號的生成裝置,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力;另外,將毫秒數放置在序列號模板的最高位,可以保證生成的序列號成整體遞增趨勢。 實施例5 進一步地,基於上述圖1至圖5所示的方法,本說明書實施例還提供了一種序列號的生成設備,如圖8所示。 序列號的生成設備可因配置或性能不同而產生比較大的差異,可以包括一或多個的處理器801和儲存器802,儲存器802中可以儲存有一或多個儲存應用程式或資料。其中,儲存器802可以是短暫儲存或持久儲存。儲存在儲存器802的應用程式可以包括一或多個模組(圖示未顯示),每個模組可以包括對序列號的生成設備中的一系列電腦可執行指令。更進一步地,處理器801可以設置為與儲存器802通訊,在序列號的生成設備上執行儲存器802中的一系列電腦可執行指令。序列號的生成設備還可以包括一或多個電源803,一或多個有線或無線網路介面804,一或多個輸入輸出介面805,一或多個鍵盤806等。 在一個具體的實施例中,序列號的生成設備包括有儲存器,以及一或多個的程式,其中一或多個程式儲存於儲存器中,且一或多個程式可以包括一或多個模組,且每個模組可以包括對序列號的生成設備中的一系列電腦可執行指令,且經配置以由一或多個處理器執行該一或多個程式包含用於進行以下電腦可執行指令: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,上述序列號生成請求中攜帶有目標業務的標識;上述處理相關資訊包括處理上述目標業務的處理時間相關資訊和處理上述目標業務的業務單元相關資訊; 基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號。 可選地,電腦可執行指令在被執行時,上述時間相關資訊包括: 上述業務單元所在伺服器接收到上述目標業務請求的計時點資訊、上述伺服器在上述計時點接收的業務請求中上述目標業務請求所對應的排序號; 上述業務單元相關資訊包括以下資訊中的至少一種: 上述業務單元的序號、上述業務單元所在的伺服器序號、上述業務單元所在的伺服器所屬的邏輯單元序號以及上述業務單元所在的伺服器所屬的機房序號。 可選的,電腦可執行指令在被執行時,上述計時點資訊位於上述序列號模板中的最高位; 上述基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號,包括: 按照上述序列號模板,將各個上述資訊對應的取值轉換為設定的格式; 將設定格式的各個資訊的取值按照其在上述序列號模板中的排列位置進行排列,生成上述目標業務所對應的序列號。 可選的,電腦可執行指令在被執行時,在接收序列號生成請求之前,上述方法還包括: 確定上述業務單元所在的業務系統的運行時長、上述業務系統在上述運行時長內的系統擴展資訊; 根據運行時長以及系統擴展資訊,對序列號模板所對應的空間進行分配; 按照設定順序將上述運行時長以及上述系統擴展資訊中的各個資訊進行排列,生成上述序列號模板。 可選的,電腦可執行指令在被執行時,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及上述伺服器在單位時間內的業務請求量。 可選的,電腦可執行指令在被執行時,上述序列號模板採用64bit的Long類型的數值表徵。 本說明書實施例提供的序列號的生成設備,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力。 實施例6 在一個具體的實施例中,序列號的生成設備包括有儲存器,以及一或多個的程式,其中一或多個程式儲存於儲存器中,且一或多個程式可以包括一或多個模組,且每個模組可以包括對序列號的生成設備中的一系列電腦可執行指令,且經配置以由一或多個處理器執行該一或多個程式包含用於進行以下電腦可執行指令: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,上述序列號生成請求中攜帶有目標業務的標識;上述處理相關資訊包括處理上述目標業務的處理時間相關資訊和處理上述目標業務的業務單元相關資訊;上述時間相關資訊包括上述業務單元所在伺服器接收到上述目標業務請求時所計時的毫秒數; 基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號;其中,上述毫秒數位於上述序列號模板中的最高位。 可選的,電腦可執行指令在被執行時,上述時間相關資訊還包括: 上述伺服器在上述毫秒數內接收的業務請求中上述目標業務請求所對應的排序號; 上述業務單元相關資訊包括以下資訊中的至少一種: 上述業務單元的序號、上述業務單元所在的伺服器序號、上述業務單元所在的伺服器所屬的邏輯單元序號以及上述業務單元所在的伺服器所屬的機房序號。 可選的,電腦可執行指令在被執行時,上述毫秒數位於上述序列號模板中的最高位; 上述基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號,包括: 按照上述序列號模板,將各個上述資訊對應的取值轉換為設定的格式; 將設定格式的各個資訊的取值按照其在上述序列號模板中的排列位置進行排列,生成上述目標業務所對應的序列號。 可選的,電腦可執行指令在被執行時,在接收序列號生成請求之前,上述方法還包括: 確定上述業務單元所在的業務系統的運行時長、上述業務系統在上述運行時長內的系統擴展資訊; 根據運行時長以及系統擴展資訊,對序列號模板所對應的空間進行分配; 按照設定順序將上述運行時長以及上述系統擴展資訊中的各個資訊進行排列,生成上述序列號模板。 可選的,電腦可執行指令在被執行時,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及上述伺服器在單位時間內的業務請求量。 可選的,電腦可執行指令在被執行時,上述序列號模板採用64bit的Long類型的數值表徵。 本說明書實施例所提供的序列號的生成設備,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力;另外,將毫秒數放置在序列號模板的最高位,可以保證生成的序列號成整體遞增趨勢。 實施例7 進一步地,基於上述圖1至圖5所示的方法,本說明書實施例還提供了一種儲存媒體,用於儲存電腦可執行指令,一種具體的實施例中,該儲存媒體可以為USB隨身碟、光碟、硬碟等,該儲存媒體儲存的電腦可執行指令在被處理器執行時,能實現以下流程: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,上述序列號生成請求中攜帶有目標業務的標識;上述處理相關資訊包括處理上述目標業務的處理時間相關資訊和處理上述目標業務的業務單元相關資訊; 基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述時間相關資訊包括: 上述業務單元所在伺服器接收到上述目標業務請求的計時點資訊、上述伺服器在上述計時點接收的業務請求中上述目標業務請求所對應的排序號; 上述業務單元相關資訊包括以下資訊中的至少一種: 上述業務單元的序號、上述業務單元所在的伺服器序號、上述業務單元所在的伺服器所屬的邏輯單元序號以及上述業務單元所在的伺服器所屬的機房序號。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述計時點資訊位於上述序列號模板中的最高位; 上述基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號,包括: 按照上述序列號模板,將各個上述資訊對應的取值轉換為設定的格式; 將設定格式的各個資訊的取值按照其在上述序列號模板中的排列位置進行排列,生成上述目標業務所對應的序列號。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,在接收序列號生成請求之前,上述方法還包括: 確定上述業務單元所在的業務系統的運行時長、上述業務系統在上述運行時長內的系統擴展資訊; 根據運行時長以及系統擴展資訊,對序列號模板所對應的空間進行分配; 按照設定順序將上述運行時長以及上述系統擴展資訊中的各個資訊進行排列,生成上述序列號模板。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及上述伺服器在單位時間內的業務請求量。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述序列號模板採用64bit的Long類型的數值表徵。 本說明書實施例所提供的儲存媒體儲存的電腦可執行指令在被處理器執行時,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力。 實施例8 進一步地,本說明書實施例還提供了一種儲存媒體,用於儲存電腦可執行指令,一種具體的實施例中,該儲存媒體可以為USB隨身碟、光碟、硬碟等,該儲存媒體儲存的電腦可執行指令在被處理器執行時,能實現以下流程: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,上述序列號生成請求中攜帶有目標業務的標識;上述處理相關資訊包括處理上述目標業務的處理時間相關資訊和處理上述目標業務的業務單元相關資訊;上述時間相關資訊包括上述業務單元所在伺服器接收到上述目標業務請求時的毫秒數; 基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號;其中,上述毫秒數位於上述序列號模板中的最高位。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述時間相關資訊還包括: 上述伺服器在上述毫秒數內接收的業務請求中上述目標業務請求所對應的排序號; 上述業務單元相關資訊包括以下資訊中的至少一種: 上述業務單元的序號、上述業務單元所在的伺服器序號、上述業務單元所在的伺服器所屬的邏輯單元序號以及上述業務單元所在的伺服器所屬的機房序號。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述毫秒數位於上述序列號模板中的最高位; 上述基於上述處理時間相關資訊和上述業務單元相關資訊,按照建立的序列號模板,生成上述目標業務所對應的序列號,包括: 按照上述序列號模板,將各個上述資訊對應的取值轉換為設定的格式; 將設定格式的各個資訊的取值按照其在上述序列號模板中的排列位置進行排列,生成上述目標業務所對應的序列號。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,在接收序列號生成請求之前,上述方法還包括: 確定上述業務單元所在的業務系統的運行時長、上述業務系統在上述運行時長內的系統擴展資訊; 確定上述運行時長以及上述系統擴展資訊中的各個資訊在上述序列號模板中所占的空間; 按照設定順序將上述運行時長以及上述系統擴展資訊中的各個資訊進行排列,生成上述序列號模板。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及上述伺服器在單位時間內的業務請求量。 可選的,該儲存媒體儲存的電腦可執行指令在被處理器執行時,上述序列號模板採用64bit的Long類型的數值表徵。 本說明書實施例提供的儲存媒體儲存的電腦可執行指令在被處理器執行時,根據業務系統處理目標業務的處理時間相關資訊和處理該目標業務的業務單元相關資訊,按照預先建立的序列號模板,生成針對目標業務的序列號;由於每項業務的處理時間相關資訊以及所使用的業務單元相關資訊存在差異,因此,可以生成在業務系統中全域唯一的序列號,便於後續對目標業務進行查詢;並且,不需要存取資料庫就可以生成序列號,避免了在業務請求高並發情況下對資料庫的寫入效能產生較大壓力;另外,將毫秒數放置在序列號模板的最高位,可以保證生成的序列號成整體遞增趨勢。 在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、光學儲存器等)上實施的電腦程式產品的形式。 本發明可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的例程、程式、對象、組件、資料結構等等。也可以在分布式計算環境中實踐本發明,在這些分布式計算環境中,由透過通訊網路而被連接的遠端處理設備來執行任務。在分布式計算環境中,程式模組可以位於包括儲存設備在內的本地和遠端電腦儲存媒體中。 本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於系統實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。 以上所述僅為本發明的實施例而已,並不用於限制本發明。對於本領域技術人員來說,本發明可以有各種更改和變化。凡在本發明的精神和原理之內所作的任何修改、等同替換、改進等,均應包含在本發明的申請專利範圍的範圍之內。In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be described clearly and completely in conjunction with the drawings in the embodiments of this specification. Obviously, the described The embodiments are only a part of the embodiments of this specification, but not all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this specification. The idea of the embodiment of this specification is that when generating the serial number of the target business, the business processing information of the business system processing the target business is taken into account. Specifically, it may include the time-related information of the business system processing the target business and the used System related information of business system. Due to the difference in the above processing related information of different businesses, the serial number of each business that can be generated is unique. Based on this, the embodiments of the present specification provide a method, device, device and storage medium for generating a serial number. The method, device, device and storage medium for generating the serial number provided in the embodiments of the present specification will be described in detail below. FIG. 1 is a schematic diagram of a specific application service system scenario of the method provided by the embodiment of the specification. The schematic diagram shown in FIG. 1 includes a plurality of computer rooms, which can be written as computer room 1, computer room 2, ..., computer room N, where N is a positive integer. Each computer room can be divided into multiple logical units, each logical unit is called a Zone, and the logical units in each computer room can be numbered and recorded as Zone1, Zone2, ..., Zine M, where M is a positive integer . In addition, multiple servers may be provided in each logical unit, and these servers are used to process service requests and generate serial numbers corresponding to each service. The number of logical units corresponding to each computer room may be the same or different; the number of servers corresponding to each logical unit may be the same or different. It should be noted that each server is responsible for generating the sequence number of the service in the service request received by the server. For example, if the server 1 receives the service request of the service 1, the server 1 generates the serial number corresponding to the service 1. In addition, in the schematic diagram shown in FIG. 1, each server may be provided with multiple business units, and different business units are used to process different businesses. For example, as far as the Alipay system is concerned, it can include business units such as Huabei, Jibei, Ant Wealth, and Sesame Credit. The method for generating the serial number provided in the embodiment of this specification can be applied to each server in the system shown in FIG. 1. Embodiment 1 FIG. 2 is a flowchart illustrating a first method of generating a serial number according to an embodiment. The method shown in FIG. 2 includes at least the following steps: Step 202: After receiving a serial number generation request, obtain Information related to the processing of the target business; wherein, the above-mentioned serial number generation request carries the identification of the target business; the processing information includes information about the processing time of the target business and information about the business unit processing the target business. The execution subject of the method provided by the embodiment of the present specification is a serial number generating device provided on the server. In general, when processing a service, when the server receives the service request, while the response service unit provided on the server processes the service, the serial number provided on the server The generating device generates the serial number corresponding to the service. When the serial number generating device receives the serial number generating request, it needs to obtain information about the processing of the target business. Specifically, the serial number generating device can obtain processing information related to the target business from the business system. In the embodiment of the present specification, the serial number generation request carries the identification of the target service. Therefore, the serial number generation device can obtain the processing-related information of the target service according to the identification of the target service. Wherein, the above-mentioned target service identifier may be the name of the target service, etc. In the embodiment of the present specification, the processing related information may include at least the processing time related information of the target business and the business unit related information of the target business. Specifically, the processing time-related information includes: timing information of the target service request received by the server where the service unit is located, and a sequence number corresponding to the target business request in the service request received by the server at the timing point. For example, the server where the service unit is located receives 5 service requests at the timing point, where the request corresponding to the target service is the third request received by the server at the timing point, then the target service is at the service The serial number to which the server corresponding to the unit belongs in the service request received at the above timing point is 3. To be noted, the timing point may be the number of milliseconds, seconds, or minutes accumulated by the current clock of the server when the server receives the target service request. Preferably, in the embodiment of the present specification, milliseconds are used. Specifically, the number of milliseconds can be counted from the start of operation of the business system corresponding to the business unit. For ease of understanding, the following will be described with examples. For example, the current number of milliseconds is the Sth millisecond of the business system running. If the business unit receives the target business request within this millisecond, and it can be determined that the target business request is the Pth business request received by the business unit within this millisecond , It can be considered that the number of milliseconds corresponding to the target service is S, and the corresponding sequence number of the target service request within the Sth millisecond is P, where S and P both represent values. In addition, in the embodiment of the present specification, the business unit related information includes at least one of the following information: the serial number of the business unit, the serial number of the server where the business unit is located, the serial number of the logical unit to which the server where the business unit belongs, and the location of the business unit The serial number of the server room to which the server belongs. It should be noted that, in the embodiment of the present specification, the business unit related information may include one or more of the above information. Preferably, in order to ensure that the generated serial number corresponding to the target business is a unique business serial number in the business processing system, the above-mentioned business unit related information may include all the above-mentioned information. In the embodiment of this specification, the processing target can be uniquely determined by the serial number of the business unit, the serial number of the server where the business unit is located, the serial number of the logical unit to which the server where the business unit belongs and the serial number of the machine room where the server where the business unit belongs The business unit related information of the business, that is, the above information corresponding to different business units is different, so the serial number generated by each business unit on each server under each logical unit in each computer room is not Repeated; In addition, because the processing time-related information includes the timing information of the business unit processing the target business, the sequence numbers generated at different timing points will not be repeated; because the processing time-related information includes the server in the The sequence number corresponding to the target business request in the business requests received at the timing point is different for each business request within the same timing point, therefore, the sequence number generated at the same timing point will not be repeated of. Therefore, in the embodiment of the present specification, the serial number corresponding to the target unit can be uniquely determined through the combination of the above-mentioned processing time related information and business unit related information. In step 204, based on the above processing time-related information and business unit-related information, a serial number corresponding to the target business is generated according to the established serial number template. Specifically, the above timing information is located at the highest position in the serial number template; correspondingly, in the above step 204, based on the above processing time related information and business unit related information, according to the established serial number template, the corresponding target business is generated The serial number includes: according to the serial number template, convert each corresponding value to the set format; arrange the value of each information in the set format according to its arrangement position in the serial number template to generate the corresponding target business Serial number. Among them, in the embodiment of the present specification, since the value of the timing point obtained by timing is continuously increasing, placing the timing point information in the highest position of the serial number template can ensure that the serial number in the business system is incremented as a whole. In this way, the maintenance of the serial number generation device can be facilitated, and it can be easily checked whether there is a problem with the generated serial number; in addition, the generated serial number can be incremented as a whole, and the service query performance can be improved. Specifically, the space corresponding to each piece of information and the arrangement order of each piece of information in the serial number are stored in the serial number template. After obtaining the above information, directly convert each information into the set format and fill it in the serial number template. Specifically, the format set above may be in the form of Arabic numerals or in the form of binary data. For example, in the specific implementation, the time point information corresponding to the target business is obtained as the 5th millisecond, so the number of milliseconds is 5, however, in the serial number template, the space corresponding to the information may be 39bit, in order to ensure the entire business The serial number generated by the processing system has the same number of digits. Therefore, zeros can be added in front of 5 to get the same number of digits as in the serial number template. In the embodiments of the present specification, in order to be able to generate the serial number corresponding to the target service according to the serial number template. Therefore, it is also necessary to construct a serial number template. Therefore, in the embodiment of this specification, before receiving the serial number generation request, the method further includes the following steps (1), (2), and (3); Step (1), determining the business system where the business unit is located Run time and system extension information of the business system; Step (2), allocate the space corresponding to the serial number template according to the above run time and system extension information; Step (3), the above run time according to the set order The various information in the long and system expansion information are sorted to generate a serial number template. Wherein, in the above step (1), the running time of the business system refers to starting from when the business system goes online, assuming the possible running time of the business system. For example, assuming that the business system may need to run for ten years, then convert ten years to milliseconds to get: Ten years = 365 days * 24 hours * 3600 seconds * 1000 milliseconds ≈ 320 * 10 9 Therefore, it can be determined through calculation that the running time of the business system requires 39 bits of space. Therefore, the space allocated to the number of milliseconds is 39 bits. Specifically, the above system expansion information includes at least one of the following information: business unit expansion quantity, server expansion quantity, logical unit expansion quantity, equipment room expansion quantity, and server service request quantity per unit time. The following will introduce the specific determination process of the space corresponding to the above information one by one in detail. For example, according to the business development status, it is planned that some business units will be added in the future, but the total number of business units is less than 120, that is, the number of business unit expansion is less than 120. Therefore, 7 bits of space can be reserved for the business unit. It should be noted that 7bit=2 7 =128, therefore, Reserve 7 bits of space for the business unit to meet the future development needs of the business unit. E.g, According to the business development status, The number of installed computer rooms may increase to 10-15 in the future, That is, the number of expansion of the computer room may be 10-15, therefore, 4 bits of space need to be reserved for the number of equipment rooms. In general, The number of logical units is determined according to the structure of the enterprise, If the enterprise architecture has no logical units, There is no need to reserve space corresponding to the logical unit. If there is a logical unit, You need to reserve space for the logical unit. E.g, Logical Data Center for Ant Financial LDC) architecture, With data logic unit (CZone), Three logical units: user logic unit (RZone) and global logic unit (GZone), In the future, more logical units may be refined, There are no plans to add logical units, therefore, 2bit of space can be reserved. In addition, Each business unit can be deployed on up to 256 servers in each logical unit in each computer room, therefore, 8 bits of space need to be reserved for the business unit. For the number of business requests received by each server in a unit time, It can be the number of service requests received by each server in every millisecond. E.g, Against Ant Financial, The average number of business requests per millisecond for each server will not exceed 5, therefore, 3bit of space can be reserved. In addition, In the embodiment of this specification, You can also reserve 1 bit of reserved bits for temporary expansion. A schematic diagram of the serial number template generated through the above process is shown in FIG. 3, In the serial number template shown in Figure 3, Set the space corresponding to the number of milliseconds at the highest position, Followed by business unit space, Machine room space, Logical unit space, Server space, The reserved space and the space corresponding to the sequence number of the target service in milliseconds. In the serial number template shown in Figure 3, The space corresponding to the number of milliseconds is 39bit, The business unit space is 7bit, The computer room space is 4bit, The logical unit interval is 2bit, The server space is 8bit, The reserved space is 1bit, The space corresponding to the sequence number of the template service in milliseconds is 3 bits. of course, The sequence of the various information in the serial number template shown in Figure 3 can also be other, FIG. 3 does not constitute a limitation on the arrangement order of the above information. In the embodiment of this specification, The serial number template is characterized by a 64-bit Long type value. The method for generating a serial number provided by an embodiment of this specification, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests. Embodiment 2 corresponds to the method for generating the serial number provided in Embodiment 1 above in this specification, Based on the same idea, The embodiment of this specification also provides a method for generating a serial number, FIG. 4 shows a flowchart of a second method of generating a serial number provided by an embodiment of this specification, For the method shown in Figure 4, Here, the differences from the method shown in Embodiment 1 above will be highlighted, For the similarities, please refer to Embodiment 1 above. I will not repeat them here. The method shown in Figure 4 includes at least the following steps: Step 402, After receiving the serial number generation request, Obtain information about the processing of the target business; among them, The serial number generation request carries the identification of the target business; Processing related information includes processing time related information of the target business and business unit related information of the target business; The above time-related information includes the milliseconds counted when the server where the business unit is located receives the target business request. among them, The above time related information also includes: The sequence number corresponding to the target service request among the service requests received by the server within the milliseconds; The business unit related information includes at least one of the following information: The serial number of the above business unit, The serial number of the server where the above business unit is located, The serial number of the logical unit to which the server where the above-mentioned business unit belongs and the serial number of the equipment room to which the server where the above-mentioned business unit belongs. Step 404, Based on the above processing time related information and business unit related information, According to the established serial number template, Generate the serial number corresponding to the template business; among them, The above milliseconds are located in the highest bit in the serial number template. In the embodiment of this specification, Through the processing time related information and business unit related information of the template business, The serial number corresponding to the generated target business is unique in the business system; and, Place the milliseconds corresponding to the target business in the highest position of the serial number template, As it grows over time, The number of milliseconds is always increasing, therefore, It can make the generated serial number increase in the business system as a whole. specific, The above is based on the above processing time related information and business unit related information, According to the established serial number template, Generate the serial number corresponding to the template business, This includes: According to the above serial number template, Convert the corresponding values of the above information to the set format; Arrange the value of each information in the format according to its arrangement position in the above serial number template, Generate the serial number corresponding to the above target business. Optional, Before generating the serial number corresponding to the target business by using the method provided by the embodiment of this specification, Need to create a serial number template. therefore, In the embodiment of this specification, Before receiving the serial number generation request, The method also includes: Determine the running time of the business system where the above business unit is located, System expansion information of the above business system within the above operation duration; According to the above operating time and system expansion information, Allocate the space corresponding to the serial number template; According to the setting order, arrange all the information in the above operation time and the above system expansion information, Generate the above serial number template. specific, The above system expansion information includes at least one of the following information: Number of business unit expansions, Number of server expansions, Number of logical units expanded, The number of expansion of the computer room and the amount of service requests of the server in unit time. In addition, In the embodiment of this specification, The above serial number template is characterized by a 64-bit Long type value. To facilitate understanding of the method for generating the serial number provided by the embodiments of this specification, The following will be described in conjunction with specific embodiments. E.g, Users use Alipay to transfer funds, When the server receives the transfer request submitted by the user, On the one hand, the user’s transfer request needs to be processed, On the other hand, it is necessary to generate a serial number for this transfer service. Based on this application scenario, FIG. 5 shows a flowchart of a third method of generating a serial number provided by an embodiment of this specification, The method shown in Figure 5, At least include the following steps: Step 502, The server receives the transfer service processing request submitted by the user. Step 504, The server sends a serial number generation request to the serial number generator. among them, The above request carries the service identifier of the above transfer service; The above serial number generator is installed on the server. Step 506, The serial number generator receives the serial number generation request. Step 508, Obtain the number of milliseconds corresponding to the transfer request received by the server from the Alipay system and the sequence number of the service request received by the server within the millisecond of the transfer request. Step 510, Obtain the business unit serial number for processing the transfer business from the Alipay system, The serial number of the server where the business unit is located, The serial number of the server room to which the server of the business unit belongs, The serial number of the logical unit where the server where the business unit is located. Step 512, Convert the corresponding values of the above information to the set format. Step 514, Fill in the corresponding values in the created serial number template with the corresponding values of the converted information; among them, The number of milliseconds corresponding to the transfer request is in the highest position of the serial number template. The specific implementation process of each step in the embodiment corresponding to FIG. 5 is the same as the specific implementation process of each step in the method embodiment corresponding to FIG. 1 to FIG. 4, For details, refer to the method embodiments corresponding to FIG. 1 to FIG. 4, I will not repeat them here. The method for generating a serial number provided by an embodiment of this specification, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests; In addition, Place the number of milliseconds in the highest position of the serial number template, It can ensure that the generated serial numbers increase in an overall trend. Embodiment 3 corresponds to the method for generating a serial number provided in Embodiment 1 of this specification, Based on the same idea, The embodiment of this specification also provides a serial number generating device, Used to execute the method for generating the serial number provided in Embodiment 1 of this specification, 6 is a schematic diagram of the composition of the first module of the serial number generating device provided by the embodiment of the present specification, The device shown in Figure 6, include: The first acquisition module 601, After receiving the serial number generation request, Obtain information about the processing of the target business; among them, The above serial number generation request carries the identification of the target service; The above processing related information includes processing time related information for processing the above target business and business unit related information for processing the above target business; The first generation module 602, Used based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business. Optional, The above time related information includes: The server where the business unit is located receives the timing information of the target business request, The sequence number corresponding to the target service request among the service requests received by the server at the timing point; The business unit related information includes at least one of the following information: The serial number of the above business unit, The serial number of the server where the above business unit is located, The serial number of the logical unit to which the server where the above-mentioned business unit belongs and the serial number of the equipment room to which the server where the above-mentioned business unit belongs. Optional, The above timing information is located in the highest position in the serial number template; corresponding, The above-mentioned first generation module 602, Specifically used for: According to the above serial number template, Convert the corresponding values of the above information to the set format; Arrange the value of each information in the format according to its arrangement position in the above serial number template, Generate the serial number corresponding to the above target business. Optional, The serial number generating device provided by the embodiment of this specification, Also includes: The first determination module, Determine the running time of the business system where the above business unit is located, System expansion information of the above business system within the above operation duration; The first distribution module, According to the operating time and system expansion information, Allocate the space corresponding to the serial number template; The second generation module, According to the setting order, arrange all the information in the above operation time and the above system expansion information, Generate the above serial number template. Optional, The above system expansion information includes at least one of the following information: Number of business unit expansions, Number of server expansions, Number of logical units expanded, The number of expansion of the computer room and the number of business requests for the above-mentioned servers per unit time. Optional, The above serial number template is characterized by a 64-bit Long type value. The specific implementation steps of each module in the device for generating a serial number provided by the embodiments of this specification, The specific implementation process of each method step in Embodiment 1 is the same, Refer to the specific implementation process of each method step in Embodiment 1, I will not repeat them here. The serial number generating device provided by the embodiment of this specification, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests. Embodiment 4 corresponds to the method for generating a serial number provided in Embodiment 2 of this specification, Based on the same idea, The embodiment of this specification also provides a serial number generating device, Used to execute the method for generating the serial number provided in Embodiment 2 of this specification, 7 is a schematic diagram of the composition of a second module of the serial number generating device provided by the embodiment of the present specification, The device shown in Figure 7, include: The second acquisition module 701, After receiving the serial number generation request, Obtain information about the processing of the target business; among them, The above serial number generation request carries the identification of the target service; The above processing related information includes processing time related information for processing the above target business and business unit related information for processing the above target business; The time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target service request; The third generation module 702, Based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business; among them, The number of milliseconds is located in the highest bit in the sequence number template. Optional, The above time related information includes: The server where the business unit is located receives the timing information of the target business request, The sequence number corresponding to the target service request among the service requests received by the server at the timing point; The business unit related information includes at least one of the following information: The serial number of the above business unit, The serial number of the server where the above business unit is located, The serial number of the logical unit to which the server where the above-mentioned business unit belongs and the serial number of the equipment room to which the server where the above-mentioned business unit belongs. Optional, The above milliseconds are located in the highest bit in the above sequence number template; The above third generation module 702, Specifically used for: According to the above serial number template, Convert the corresponding values of the above information to the set format; Arrange the value of each information in the format according to its arrangement position in the above serial number template, Generate the serial number corresponding to the above target business. Optional, The device provided in the embodiment of this specification, Also includes: Second determination module, Used to determine the running time of the business system where the above business unit is located, System expansion information of the above business system within the above operation duration; The second distribution module, It is used according to the operating time and system expansion information, Allocate the space corresponding to the serial number template; The fourth generation module, According to the setting order, arrange all the information in the above operation time and the above system expansion information, Generate the above serial number template. Optional, The above system expansion information includes at least one of the following information: Number of business unit expansions, Number of server expansions, Number of logical units expanded, The number of expansion of the computer room and the number of business requests for the above-mentioned servers per unit time. Optional, The above serial number template is characterized by a 64-bit Long type value. The specific implementation steps of each module in the device for generating a serial number provided by the embodiments of this specification, The specific implementation process of each method step in Embodiment 2 is the same, Refer to the specific implementation process of each method step in Embodiment 2, I will not repeat them here. The serial number generating device provided by the embodiment of this specification, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests; In addition, Place the number of milliseconds in the highest position of the serial number template, It can ensure that the generated serial numbers increase in an overall trend. Example 5 Further, Based on the methods shown in Figures 1 to 5 above, The embodiment of the specification also provides a serial number generating device, As shown in Figure 8. The serial number generating equipment can have a large difference due to different configurations or performance, May include one or more processors 801 and storage 802, The storage 802 may store one or more storage applications or data. among them, The storage 802 may be short-term storage or persistent storage. The application stored in the storage 802 may include one or more modules (not shown), Each module may include a series of computer-executable instructions in the serial number generating device. go a step further, The processor 801 may be configured to communicate with the storage 802, A series of computer-executable instructions in the storage 802 are executed on the serial number generating device. The serial number generating device may also include one or more power supplies 803, One or more wired or wireless network interfaces 804, One or more input and output interfaces 805, One or more keyboards 806, etc. In a specific embodiment, The serial number generation equipment includes storage, And one or more programs, One or more programs are stored in the memory, And one or more programs may include one or more modules, And each module can include a series of computer-executable instructions in the serial number generating device, And configured to be executed by one or more processors, the one or more programs include computer executable instructions for: After receiving the serial number generation request, Obtain information about the processing of the target business; among them, The above serial number generation request carries the identification of the target service; The above processing related information includes processing time related information for processing the above target business and business unit related information for processing the above target business; Based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business. Optionally, When computer executable instructions are executed, The above time related information includes: The server where the business unit is located receives the timing information of the target business request, The sequence number corresponding to the target service request among the service requests received by the server at the timing point; The business unit related information includes at least one of the following information: The serial number of the above business unit, The serial number of the server where the above business unit is located, The serial number of the logical unit to which the server where the above-mentioned business unit belongs and the serial number of the equipment room to which the server where the above-mentioned business unit belongs. Optional, When computer executable instructions are executed, The above timing information is located in the highest position in the above serial number template; The above is based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business, include: According to the above serial number template, Convert the corresponding values of the above information to the set format; Arrange the value of each information in the format according to its arrangement position in the above serial number template, Generate the serial number corresponding to the above target business. Optional, When computer executable instructions are executed, Before receiving the serial number generation request, The above method also includes: Determine the running time of the business system where the above business unit is located, System expansion information of the above business system within the above operation duration; According to the operating time and system expansion information, Allocate the space corresponding to the serial number template; According to the setting order, arrange all the information in the above operation time and the above system expansion information, Generate the above serial number template. Optional, When computer executable instructions are executed, The above system expansion information includes at least one of the following information: Number of business unit expansions, Number of server expansions, Number of logical units expanded, The number of expansion of the computer room and the number of business requests for the above-mentioned servers per unit time. Optional, When computer executable instructions are executed, The above serial number template is characterized by a 64-bit Long type value. The serial number generating device provided by the embodiment of this specification, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests. Embodiment 6 In a specific embodiment, The serial number generation equipment includes storage, And one or more programs, One or more programs are stored in the memory, And one or more programs may include one or more modules, And each module can include a series of computer-executable instructions in the serial number generating device, And configured to be executed by one or more processors, the one or more programs include computer executable instructions for: After receiving the serial number generation request, Obtain information about the processing of the target business; among them, The above serial number generation request carries the identification of the target service; The above processing related information includes processing time related information for processing the above target business and business unit related information for processing the above target business; The time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target service request; Based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business; among them, The number of milliseconds is located in the highest bit in the sequence number template. Optional, When computer executable instructions are executed, The above time related information also includes: The sequence number corresponding to the target service request among the service requests received by the server within the milliseconds; The business unit related information includes at least one of the following information: The serial number of the above business unit, The serial number of the server where the above business unit is located, The serial number of the logical unit to which the server where the above-mentioned business unit belongs and the serial number of the equipment room to which the server where the above-mentioned business unit belongs. Optional, When computer executable instructions are executed, The above milliseconds are located in the highest bit in the above sequence number template; The above is based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business, include: According to the above serial number template, Convert the corresponding values of the above information to the set format; Arrange the value of each information in the format according to its arrangement position in the above serial number template, Generate the serial number corresponding to the above target business. Optional, When computer executable instructions are executed, Before receiving the serial number generation request, The above method also includes: Determine the running time of the business system where the above business unit is located, System expansion information of the above business system within the above operation duration; According to the operating time and system expansion information, Allocate the space corresponding to the serial number template; According to the setting order, arrange all the information in the above operation time and the above system expansion information, Generate the above serial number template. Optional, When computer executable instructions are executed, The above system expansion information includes at least one of the following information: Number of business unit expansions, Number of server expansions, Number of logical units expanded, The number of expansion of the computer room and the number of business requests for the above-mentioned servers per unit time. Optional, When computer executable instructions are executed, The above serial number template is characterized by a 64-bit Long type value. The serial number generating device provided by the embodiment of this specification, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests; In addition, Place the number of milliseconds in the highest position of the serial number template, It can ensure that the generated serial numbers increase in an overall trend. Example 7 Further, Based on the methods shown in Figures 1 to 5 above, An embodiment of this specification also provides a storage medium, Used to store computer executable instructions, In a specific embodiment, The storage medium can be a USB flash drive, CD, Hard drives, etc., When the computer executable instructions stored in the storage medium are executed by the processor, Can achieve the following process: After receiving the serial number generation request, Obtain information about the processing of the target business; among them, The above serial number generation request carries the identification of the target service; The above processing related information includes processing time related information for processing the above target business and business unit related information for processing the above target business; Based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above time related information includes: The server where the business unit is located receives the timing information of the target business request, The sequence number corresponding to the target service request among the service requests received by the server at the timing point; The business unit related information includes at least one of the following information: The serial number of the above business unit, The serial number of the server where the above business unit is located, The serial number of the logical unit to which the server where the above-mentioned business unit belongs and the serial number of the equipment room to which the server where the above-mentioned business unit belongs. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above timing information is located in the highest position in the above serial number template; The above is based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business, include: According to the above serial number template, Convert the corresponding values of the above information to the set format; Arrange the value of each information in the format according to its arrangement position in the above serial number template, Generate the serial number corresponding to the above target business. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, Before receiving the serial number generation request, The above method also includes: Determine the running time of the business system where the above business unit is located, System expansion information of the above business system within the above operation duration; According to the operating time and system expansion information, Allocate the space corresponding to the serial number template; According to the setting order, arrange all the information in the above operation time and the above system expansion information, Generate the above serial number template. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above system expansion information includes at least one of the following information: Number of business unit expansions, Number of server expansions, Number of logical units expanded, The number of expansion of the computer room and the number of business requests for the above-mentioned servers per unit time. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above serial number template is characterized by a 64-bit Long type value. When the computer-executable instructions stored in the storage medium provided by the embodiments of the present specification are executed by the processor, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests. Example 8 Further, An embodiment of this specification also provides a storage medium, Used to store computer executable instructions, In a specific embodiment, The storage medium can be a USB flash drive, CD, Hard drives, etc., When the computer executable instructions stored in the storage medium are executed by the processor, Can achieve the following process: After receiving the serial number generation request, Obtain information about the processing of the target business; among them, The above serial number generation request carries the identification of the target service; The above processing related information includes processing time related information for processing the above target business and business unit related information for processing the above target business; The time-related information includes the number of milliseconds when the server where the service unit is located receives the target service request; Based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business; among them, The number of milliseconds is located in the highest bit in the sequence number template. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above time related information also includes: The sequence number corresponding to the target service request among the service requests received by the server within the milliseconds; The business unit related information includes at least one of the following information: The serial number of the above business unit, The serial number of the server where the above business unit is located, The serial number of the logical unit to which the server where the above-mentioned business unit belongs and the serial number of the equipment room to which the server where the above-mentioned business unit belongs. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above milliseconds are located in the highest bit in the above sequence number template; The above is based on the above processing time related information and the above business unit related information, According to the established serial number template, Generate the serial number corresponding to the above target business, include: According to the above serial number template, Convert the corresponding values of the above information to the set format; Arrange the value of each information in the format according to its arrangement position in the above serial number template, Generate the serial number corresponding to the above target business. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, Before receiving the serial number generation request, The above method also includes: Determine the running time of the business system where the above business unit is located, System expansion information of the above business system within the above operation duration; Determine the space occupied by the above-mentioned running time and each of the above-mentioned system extension information in the above-mentioned serial number template; According to the setting order, arrange all the information in the above operation time and the above system expansion information, Generate the above serial number template. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above system expansion information includes at least one of the following information: Number of business unit expansions, Number of server expansions, Number of logical units expanded, The number of expansion of the computer room and the number of business requests for the above-mentioned servers per unit time. Optional, When the computer executable instructions stored in the storage medium are executed by the processor, The above serial number template is characterized by a 64-bit Long type value. When the computer-executable instructions stored in the storage medium provided by the embodiments of the present specification are executed by the processor, According to the business system processing time related information of the target business and the business unit related information of the target business, According to the pre-built serial number template, Generate a serial number for the target business; Due to the difference in the processing time related information of each business and the related information of the business unit used, therefore, You can generate a serial number that is unique in the business system, Facilitate the follow-up query of the target business; and, The serial number can be generated without accessing the database, Avoiding greater pressure on the database's write performance under high concurrency of business requests; In addition, Place the number of milliseconds in the highest position of the serial number template, It can ensure that the generated serial numbers increase in an overall trend. In the 1990s, Improvements in a technology can be clearly distinguished as improvements in hardware (for example, For diodes, Transistor, The improvement of circuit structures such as switches) is also an improvement in software (improvement of method flow). however, with the development of technology, Many of today's method and process improvements can already be regarded as direct improvements in the hardware circuit structure. Designers almost always 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 achieved with hardware physical modules. E.g, Programmable Logic Device (Programmable Logic Device, PLD) (such as Field Programmable Gate Array, FPGA)) is such an integrated circuit, Its logical function is determined by the user programming the device. It is up to the designer to “integrate” a digital system on a PLD, There is no need to ask chip manufacturers to design and manufacture dedicated integrated circuit chips. and, now, Instead of manually making integrated circuit chips, Most of this programming is also implemented with "logic compiler" software, It is similar to the software compiler used in program development, And the original code to be compiled must also be written in a specific programming language, This is called the hardware description language (Hardware Description Language, HDL), And HDL is not the only one, But there are many kinds, 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 skilled in the art should also be clear, It is only necessary to logically program the method flow using the above hardware description languages and program it into the integrated circuit, It is easy to get the hardware circuit that implements this logic method flow. The controller can be implemented in any suitable way, E.g, The controller may be, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro) processor, Logic gate, switch, Special Application Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable logic controller and embedded microcontroller, 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 may also be implemented as part of the control logic of the memory. Those skilled in the art also know that In addition to implementing the controller in pure computer-readable program code, It is completely possible to make the controller use logic gates by logically programming the method steps. switch, Integrated circuits for special applications, Programmable logic controllers and embedded microcontrollers can be used to achieve the same function. So this controller can be considered as a hardware component, The devices included therein for realizing various functions can also be regarded as structures within the hardware components. Or even, The device for realizing various functions can be regarded as both a software module of an implementation method and a structure in a hardware component. The system described in the above embodiment, Device, Module or unit, It can be realized by computer chip or entity, Or it can be realized by a product with a certain function. A typical implementation device is a computer. specific, The computer may be, for example, a personal computer, Laptop, Cellular phone, Camera phone, Smartphone, Personal digital assistant, media Player, Navigation equipment, Email device, Game console, tablet, Wearable devices or any combination of these devices. For the convenience of description, When describing the above devices, the functions are divided into various units and described separately. of course, When implementing the present invention, the functions of each unit may be implemented in one or more software and/or hardware. Those skilled in the art should understand that Embodiments of the present invention can be provided as methods, system, Or computer program products. therefore, The present invention can use a complete hardware embodiment, Complete software embodiment, Or a combination of software and hardware. and, The present invention may use one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, The form of computer program products implemented on optical storage, etc.). The present invention refers to the method according to the embodiment of the present invention, Equipment (system), It is described by the flow chart and/or block diagram of the computer program product. It should be understood that each flow and/or block in the flowchart and/or block diagram can be implemented by computer program instructions, And a combination of processes and/or blocks in flowcharts and/or block diagrams. These computer program instructions can be provided to general-purpose computers, Dedicated computer, Embedded processor or other programmable data processing equipment processor to produce a machine, A device that causes instructions executed by a processor of a computer or other programmable data processing device to produce 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 storage that can guide the computer or other programmable data processing equipment to work in a specific way. Causing the instructions stored in the computer-readable storage to produce a manufactured product including an instruction 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 equipment, Allows a series of operating steps to be performed on a computer or other programmable device to produce computer-implemented processing, The instructions executed on the computer or other programmable equipment thus provide steps for implementing the functions specified in one block or multiple blocks of the flow chart one flow or multiple flows and/or block diagrams. In a typical configuration, The computing device includes one or more processors (CPU), Input/output interface, Network interface and memory. Memory may include non-permanent memory in computer-readable media, Random access memory (RAM) and/or non-volatile memory, etc., Such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media. Computer-readable media includes permanent and non-permanent, Removable and non-removable media can be stored by any method or technology. Information can be computer readable instructions, Data structure, Program modules or other data. Examples of computer storage media include, But not limited to phase change memory (PRAM), Static random access memory (SRAM), Dynamic Random Access Memory (DRAM), Other types of random access memory (RAM), Read only memory (ROM), Electrically erasable and programmable read-only memory (EEPROM), Flash memory or other memory technology, CD-ROM, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, Magnetic cassette tape, Magnetic tape storage or other magnetic storage devices or any other non-transmission media, It can be used to store information that can be accessed by computing devices. According to the definition in this article, Computer-readable media does not include transient computer-readable media (transitory media), Such as modulated data signals and carrier waves. It should also be noted that The term "including", "Contains" or any other variation thereof is intended to cover non-exclusive inclusions, So that the process including a series of elements, method, Goods or equipment includes not only those elements, And also includes other elements that are not explicitly listed, Or is it also included for this process, method, Elements inherent in goods or equipment. Without more restrictions, Elements defined by the sentence "include a..." Does not exclude the process of including the elements, method, There are other identical elements in goods or equipment. Those skilled in the art should understand that Embodiments of the present invention can be provided as methods, System or computer program products. therefore, The present invention can use a complete hardware embodiment, A complete software embodiment or a form of embodiment combining software and hardware. and, The present invention may use one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, The form of computer program products implemented on optical storage, etc.). The invention can be described in the general context of computer executable instructions executed by a computer, For example, program modules. normally, Program modules include routines that perform specific tasks or implement specific abstract data types, Program, Object, Components, Data structure, etc. The invention can also be practiced in a distributed computing environment, In these distributed computing environments, The tasks are performed by remote processing equipment connected through the communication network. In a distributed computing environment, Program modules can be located in local and remote computer storage media including storage devices. Each embodiment in this specification is described in a progressive manner, The same or similar parts between the various embodiments may refer to each other, Each embodiment focuses on the differences from other embodiments. especially, For the system embodiment, Since it is basically similar to the method embodiment, So the description is relatively simple, For the relevant parts, please refer to the description of the method embodiments. The above is only an embodiment of the present invention, It is not intended to limit the invention. For those skilled in the art, The present invention can have various modifications and changes. Any modification made within the spirit and principle of the present invention, Equivalent replacement, Improvement etc., All should be included in the scope of the patent application of the present invention.

S202-S204‧‧‧步驟 402-404‧‧‧步驟 502-514‧‧‧步驟 601‧‧‧第一獲取模組 602‧‧‧第一生成模組 701‧‧‧第二獲取模組 702‧‧‧第三生成模組 801‧‧‧處理器 802‧‧‧儲存器 803‧‧‧電源 804‧‧‧有線或無線網路介面 805‧‧‧輸入輸出介面 806‧‧‧鍵盤S202-S204‧‧‧Step 402-404‧‧‧Step 502-514‧‧‧Step 601‧‧‧ First acquisition module 602‧‧‧The first generation module 701‧‧‧Second acquisition module 702‧‧‧ third generation module 801‧‧‧ processor 802‧‧‧Storage 803‧‧‧Power supply 804‧‧‧Wired or wireless network interface 805‧‧‧I/O interface 806‧‧‧Keyboard

為了更清楚地說明本說明書實施例或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的圖式作簡單地介紹,顯而易見地,下面描述中的圖式僅僅是本說明書中記載的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動性的前提下,還可以根據這些圖式獲得其他的圖式。 圖1為本說明書實施例提供的序列號的生成方法的應用系統示意圖; 圖2為本說明書實施例提供的序列號的生成方法的第一種方法流程圖; 圖3為本說明書實施例提供的序列號的生成方法中,建立的序列號模板的一種示意圖; 圖4為本說明書實施例提供的序列號的生成方法的第二種方法流程圖; 圖5為本說明書實施例提供的序列號的生成方法的第三種方法流程圖; 圖6為本說明書實施例提供的序列號的生成裝置的第一種模組組成示意圖; 圖7為本說明書實施例提供的序列號的生成裝置的第二種模組組成示意圖; 圖8為本說明書實施例提供的序列號的生成設備的結構示意圖。In order to more clearly explain the embodiments of the present specification or the technical solutions in the prior art, the drawings required in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only For some embodiments described in the specification, for those of ordinary skill in the art, without paying any creative labor, other drawings can also be obtained according to these drawings. 1 is a schematic diagram of an application system of a method for generating a serial number provided by an embodiment of this specification; 2 is a flowchart of a first method of generating a serial number according to an embodiment of the present specification; 3 is a schematic diagram of a serial number template established in the method for generating a serial number provided by an embodiment of the present specification; 4 is a flowchart of a second method of generating a serial number according to an embodiment of the present specification; 5 is a flowchart of a third method of generating a serial number according to an embodiment of the present specification; 6 is a schematic diagram of the composition of the first module of the serial number generating device provided by the embodiment of the present specification; 7 is a schematic diagram of the composition of a second module of a serial number generating device provided by an embodiment of the present specification; 8 is a schematic structural diagram of a serial number generation device provided by an embodiment of the present specification.

Claims (17)

一種序列號的生成方法,包括: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。A method for generating a serial number, including: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Processing business unit related information of the target business; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template. 如申請專利範圍第1項所述的方法,所述時間相關資訊包括: 所述業務單元所在伺服器接收到所述目標業務請求的計時點資訊、所述伺服器在所述計時點接收的業務請求中所述目標業務請求所對應的排序號; 所述業務單元相關資訊包括以下資訊中的至少一種: 所述業務單元的序號、所述業務單元所在的伺服器序號、所述業務單元所在的伺服器所屬的邏輯單元序號以及所述業務單元所在的伺服器所屬的機房序號。According to the method described in item 1 of the patent application scope, the time-related information includes: The timing information of the target service request received by the server where the business unit is located, and the sequence number corresponding to the target business request in the business request received by the server at the timing point; The business unit related information includes at least one of the following information: The serial number of the business unit, the serial number of the server where the business unit is located, the serial number of the logical unit to which the server where the business unit belongs belongs, and the serial number of the machine room where the server where the business unit belongs belongs. 如申請專利範圍第2項所述的方法,所述計時點資訊位於所述序列號模板中的最高位; 所述基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號,包括: 按照所述序列號模板,將各個所述資訊對應的取值轉換為設定的格式; 將設定格式的各個資訊的取值按照其在所述序列號模板中的排列位置進行排列,生成所述目標業務所對應的序列號。According to the method described in item 2 of the patent application scope, the timing information is located at the highest position in the serial number template; Based on the processing time-related information and the business unit-related information, generating the serial number corresponding to the target business according to the established serial number template includes: Convert the corresponding value of each piece of information into a set format according to the serial number template; Arranging the value of each piece of information in a set format according to its arrangement position in the serial number template to generate a serial number corresponding to the target business. 如申請專利範圍第1至3項中任一項所述的方法,在接收序列號生成請求之前,所述方法還包括: 確定所述業務單元所在的業務系統的運行時長、所述業務系統在所述運行時長內的系統擴展資訊; 根據所述運行時長以及所述系統擴展資訊,對所述序列號模板所對應的空間進行分配; 按照設定順序將所述運行時長以及所述系統擴展資訊中的各個資訊進行排列,生成所述序列號模板。The method according to any one of items 1 to 3 of the patent application scope, before receiving the serial number generation request, the method further includes: Determine the operating duration of the business system where the business unit is located, and system expansion information of the business system within the operating duration; Allocate the space corresponding to the serial number template according to the running time and the system extension information; Arrange the running time and each piece of information in the system extension information according to a set order to generate the serial number template. 如申請專利範圍第4項所述的方法,所述系統擴展資訊包括以下資訊中的至少一種: 業務單元擴展數量、伺服器擴展數量、邏輯單元擴展數量、機房擴展數量以及所述伺服器在單位時間內的業務請求量。According to the method described in item 4 of the patent application scope, the system extension information includes at least one of the following information: The number of business unit extensions, the number of server extensions, the number of logical unit extensions, the number of computer room extensions, and the number of service requests of the server per unit time. 如申請專利範圍第1至3項中任一項所述的方法,所述序列號模板採用64bit的Long類型的數值表徵。According to the method described in any one of items 1 to 3 of the patent application range, the serial number template is characterized by a 64-bit Long type value. 一種序列號的生成方法,包括: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。A method for generating a serial number, including: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Relevant information of the business unit processing the target business; the time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template; wherein the millisecond number is located in the highest bit in the serial number template. 如申請專利範圍第7項所述的方法,所述時間相關資訊還包括: 所述伺服器在所述毫秒數內接收的業務請求中所述目標業務請求所對應的排序號; 所述業務單元相關資訊包括以下資訊中的至少一種: 所述業務單元的序號、所述業務單元所在的伺服器序號、所述業務單元所在的伺服器所屬的邏輯單元序號以及所述業務單元所在的伺服器所屬的機房序號。According to the method described in item 7 of the patent application scope, the time-related information also includes: The sequence number corresponding to the target service request in the service requests received by the server within the milliseconds; The business unit related information includes at least one of the following information: The serial number of the business unit, the serial number of the server where the business unit is located, the serial number of the logical unit to which the server where the business unit belongs belongs, and the serial number of the machine room where the server where the business unit belongs belongs. 一種序列號的生成裝置,包括: 第一獲取模組,在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 第一生成模組,基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。A serial number generating device, including: The first acquisition module, after receiving the serial number generation request, acquires processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing the target business Related processing time information and related information of the business unit processing the target business; The first generating module generates a serial number corresponding to the target business based on the established serial number template based on the processing time related information and the business unit related information. 如申請專利範圍第9項所述的裝置,所述時間相關資訊包括: 所述業務單元所在伺服器接收到所述目標業務請求的計時點資訊、所述伺服器在所述計時點接收的業務請求中所述目標業務請求所對應的排序號; 所述業務單元相關資訊包括以下資訊中的至少一種: 所述業務單元的序號、所述業務單元所在的伺服器序號、所述業務單元所在的伺服器所屬的邏輯單元序號以及所述業務單元所在的伺服器所屬的機房序號。For the device described in item 9 of the patent application scope, the time-related information includes: The timing information of the target service request received by the server where the business unit is located, and the sequence number corresponding to the target business request in the business request received by the server at the timing point; The business unit related information includes at least one of the following information: The serial number of the business unit, the serial number of the server where the business unit is located, the serial number of the logical unit to which the server where the business unit belongs belongs, and the serial number of the machine room where the server where the business unit belongs belongs. 如申請專利範圍第10項所述的裝置,所述計時點資訊位於所述序列號模板中的最高位; 所述第一生成模組,具體用於: 按照所述序列號模板,將各個所述資訊對應的取值轉換為設定的格式;將設定格式的各個資訊的取值按照其在所述序列號模板中的排列位置進行排列,生成所述目標業務所對應的序列號。For the device described in item 10 of the patent application scope, the timing information is located at the highest position in the serial number template; The first generation module is specifically used for: According to the serial number template, convert the corresponding value of each piece of information into a set format; arrange the value of each piece of information in the set format according to its arrangement position in the serial number template to generate the target The serial number corresponding to the business. 如申請專利範圍第9至11項中任一項所述的裝置,所述裝置還包括: 第一確定模組,確定所述業務單元所在的業務系統的運行時長、所述業務系統在所述運行時長內的系統擴展資訊; 第一分配模組,根據所述運行時長以及所述系統擴展資訊,對所述序列號模板所對應的空間進行分配; 第二生成模組,按照設定順序將所述運行時長以及所述系統擴展資訊中的各個資訊進行排列,生成所述序列號模板。The device according to any one of items 9 to 11 of the patent application scope, the device further includes: The first determining module determines the operating time of the business system where the business unit is located, and system expansion information of the business system within the operating time; The first allocation module allocates the space corresponding to the serial number template according to the running time and the system expansion information; The second generation module arranges the running time and each piece of information in the system expansion information according to a set order to generate the serial number template. 一種序列號的生成裝置,包括: 第二獲取模組,在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 第三生成模組,基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。A serial number generating device, including: The second acquisition module, after receiving the serial number generation request, acquires the processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing the target business Processing time related information and business unit related information processing the target business; the time related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; The third generation module generates a serial number corresponding to the target business based on the established serial number template based on the processing time related information and the business unit related information; wherein the millisecond number is located in the serial number The highest bit in the template. 一種序列號的生成設備,包括: 處理器;以及 被安排成儲存電腦可執行指令的儲存器,所述可執行指令在被執行時使所述處理器: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。A serial number generating device, including: Processor; and A memory arranged to store computer executable instructions which, when executed, causes the processor to: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Processing business unit related information of the target business; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template. 一種序列號的生成設備,包括: 處理器;以及 被安排成儲存電腦可執行指令的儲存器,所述可執行指令在被執行時使所述處理器: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。A serial number generating device, including: Processor; and A memory arranged to store computer executable instructions which, when executed, causes the processor to: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Relevant information of the business unit processing the target business; the time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template; wherein the millisecond number is located in the highest bit in the serial number template. 一種儲存媒體,用於儲存電腦可執行指令,所述可執行指令在被執行時實現以下流程: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號。A storage medium is used to store computer executable instructions, and the executable instructions, when executed, implement the following process: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Processing business unit related information of the target business; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template. 一種儲存媒體,用於儲存電腦可執行指令,所述可執行指令在被執行實現以下流程: 在接收到序列號生成請求後,獲取目標業務的處理相關資訊;其中,所述序列號生成請求中攜帶有目標業務的標識;所述處理相關資訊包括處理所述目標業務的處理時間相關資訊和處理所述目標業務的業務單元相關資訊;所述時間相關資訊包括所述業務單元所在伺服器接收到所述目標業務請求時所計時的毫秒數; 基於所述處理時間相關資訊和所述業務單元相關資訊,按照建立的序列號模板,生成所述目標業務所對應的序列號;其中,所述毫秒數位於所述序列號模板中的最高位。A storage medium is used to store computer executable instructions. The executable instructions are executed to implement the following process: After receiving the serial number generation request, obtain processing-related information of the target business; wherein, the serial number generation request carries the identification of the target business; the processing-related information includes processing time-related information for processing the target business and Relevant information of the business unit processing the target business; the time-related information includes the number of milliseconds counted when the server where the business unit is located receives the target business request; Based on the processing time related information and the business unit related information, the serial number corresponding to the target business is generated according to the established serial number template; wherein the millisecond number is located in the highest bit in the serial number template.
TW108116549A 2018-07-26 2019-05-14 Method and device for generating serial number TWI728357B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810834825.1A CN109063088B (en) 2018-07-26 2018-07-26 Serial number generation method and device
CN201810834825.1 2018-07-26

Publications (2)

Publication Number Publication Date
TW202008150A true TW202008150A (en) 2020-02-16
TWI728357B TWI728357B (en) 2021-05-21

Family

ID=64835693

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108116549A TWI728357B (en) 2018-07-26 2019-05-14 Method and device for generating serial number

Country Status (3)

Country Link
CN (1) CN109063088B (en)
TW (1) TWI728357B (en)
WO (1) WO2020019894A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063088B (en) * 2018-07-26 2020-07-28 阿里巴巴集团控股有限公司 Serial number generation method and device
CN109933574B (en) * 2019-02-27 2021-03-19 常州猛犸电动科技有限公司 Unique key generation method and device and terminal equipment
CN111861292A (en) * 2019-04-25 2020-10-30 北京京东尚科信息技术有限公司 Waybill number generation method, apparatus, server and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020065734A1 (en) * 2000-11-30 2002-05-30 Tien-Fu Kuo Method of processing purchase information applied to a business information processing platform
CN103051448B (en) * 2011-10-12 2016-06-22 中兴通讯股份有限公司 Home gateway attached service terminal is to the authentication method of code, Apparatus and system
US9648125B2 (en) * 2013-10-04 2017-05-09 Akamai Technologies, Inc. Systems and methods for caching content with notification-based invalidation
CN104461863B (en) * 2014-10-29 2018-04-17 中国建设银行股份有限公司 A kind of operation system test method, equipment and system
CN106454559A (en) * 2015-08-07 2017-02-22 中兴通讯股份有限公司 Optical fiber port recognition method and intelligent optical distributed network node
CN105183794B (en) * 2015-08-24 2018-12-14 用友网络科技股份有限公司 Business serial number generating means and method
CN105245367B (en) * 2015-10-08 2018-11-13 北京搜狗科技发展有限公司 A kind of sequence number generation method and electronic equipment
CN106657216B (en) * 2016-09-19 2020-07-24 腾讯征信有限公司 Serial number generation method and device
CN106790510B (en) * 2016-12-16 2020-07-31 北京小米移动软件有限公司 Method, device and system for generating serial number
CN108243264A (en) * 2016-12-27 2018-07-03 中国移动通信有限公司研究院 A kind of sequence number generation method and system
CN106899666B (en) * 2017-02-21 2019-12-24 阿里巴巴集团控股有限公司 Data processing method and device for service identification
CN107229555B (en) * 2017-05-04 2021-07-20 北京星选科技有限公司 Identification generation method and device
CN108173706B (en) * 2017-11-29 2020-06-19 阿里巴巴集团控股有限公司 Service marking method, device and equipment under multi-service system
CN109063088B (en) * 2018-07-26 2020-07-28 阿里巴巴集团控股有限公司 Serial number generation method and device

Also Published As

Publication number Publication date
WO2020019894A1 (en) 2020-01-30
CN109063088B (en) 2020-07-28
CN109063088A (en) 2018-12-21
TWI728357B (en) 2021-05-21

Similar Documents

Publication Publication Date Title
AU2018246770B2 (en) Block chain based data processing method and device
US10545794B2 (en) Blockchain-based data processing method and equipment
TWI694342B (en) Data cache method, device and system
CN108173706B (en) Service marking method, device and equipment under multi-service system
TW202008150A (en) Method and device for generating serial number
CN110008018A (en) A kind of batch tasks processing method, device and equipment
US11074246B2 (en) Cluster-based random walk processing
TW201941132A (en) Information display method, apparatus and device
WO2017097159A1 (en) Method and apparatus for generating random character string
TW201933812A (en) Data processing method, apparatus and device
CN108255471A (en) A kind of system configuration item configuration device based on configuration external member, method and apparatus
CN110297955B (en) Information query method, device, equipment and medium
US9069807B2 (en) Method and system for implementing an array using different data structures
US8700676B2 (en) System and method for appending metadata to objects
CN116305298B (en) Method and device for managing computing power resources, storage medium and electronic equipment
CN110134735A (en) The storage method and device of distributed transaction log
CN108959330A (en) A kind of processing of database, data query method and apparatus
CN114780630A (en) Data display method, device and equipment
TW201913370A (en) Application page display method and device, device, storage medium
WO2020063181A1 (en) Data processing method, device and apparatus
CN113342840A (en) Data determination method, device, equipment and medium
CN116011003A (en) Information recommendation method, device and equipment based on privacy protection
CN113360715A (en) Data determination method, device, equipment and medium
CN116226225A (en) Single number generation method, device and equipment