TWI710894B - Method and device for generating data object identification - Google Patents

Method and device for generating data object identification Download PDF

Info

Publication number
TWI710894B
TWI710894B TW108117079A TW108117079A TWI710894B TW I710894 B TWI710894 B TW I710894B TW 108117079 A TW108117079 A TW 108117079A TW 108117079 A TW108117079 A TW 108117079A TW I710894 B TWI710894 B TW I710894B
Authority
TW
Taiwan
Prior art keywords
identification
time
machine
serial number
target client
Prior art date
Application number
TW108117079A
Other languages
Chinese (zh)
Other versions
TW202024908A (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 TW202024908A publication Critical patent/TW202024908A/en
Application granted granted Critical
Publication of TWI710894B publication Critical patent/TWI710894B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • G06F11/1489Generic software techniques for error detection or fault masking through recovery blocks

Abstract

本說明書提供一種資料物件標識生成方法及裝置。所述方法包括:確定資料標識物件,和所述分散式系統中生成所述資料標識物件的識別標識的目標用戶端;獲取所述目標用戶端的機器屬性資訊;根據所述機器屬性資訊生成所述資料標識物件的識別標識。利用本說明書中各個實施例,基於目標用戶端本身的機器屬性資訊生成資料標識物件的識別標識,可以不需要依賴中央控制系統或統一的資料庫獨立生成資料標識,依賴性比較弱,適用性強,可以避免因依賴同一個資料庫導致單點容災等問題。This manual provides a method and device for generating data object identification. The method includes: determining a data identification object, and a target client that generates the identification of the data identification object in the distributed system; acquiring machine attribute information of the target user; generating the machine attribute information according to the machine attribute information The identification mark of the data identification object. Using the various embodiments in this specification, the identification of the data identification object is generated based on the machine attribute information of the target client itself, and the data identification can be generated independently without relying on the central control system or a unified database. The dependence is relatively weak and the applicability is strong. , Can avoid problems such as single-point disaster tolerance caused by relying on the same database.

Description

資料物件標識生成方法及裝置Method and device for generating data object identification

本說明書屬於電腦技術領域,尤其涉及一種資料物件標識生成方法及裝置。This manual belongs to the field of computer technology, and particularly relates to a method and device for generating data object identification.

在分散式系統中往往需要對大量的資料和訊息等進行唯一的標識,如在支付系統中的訂單號,資金帳號等。隨著分散式系統中的資料量日益增長,對資料庫分庫分表後需要一個全域唯一ID(Identification)標識來標識一條資料或者一筆訊息。 圖1是現有技術中應用資料庫自增序號生成資料標識的示意圖,如圖1所示,現有技術中,通常可以採用資料庫自增序號的方法生成分散式系統的ID標識,該方法中分散式系統中各個用戶端共用一個資料庫,各用戶端基於資料庫的自增序號功能生成資料標識。可以看出,資料庫自增序號的方法對資料庫的依賴性比較強,若資料庫出現故障,則整個分散式系統均不能生成資料標識,容易出現單點容災等問題,不能滿足分散式系統環境下的全域唯一ID生成的需求。因此,極需一種能夠滿足分散式系統的標識生成需求的實施方案。In a distributed system, it is often necessary to uniquely identify a large amount of data and messages, such as the order number and fund account number in the payment system. With the increasing amount of data in the distributed system, a global unique ID (Identification) is required to identify a piece of data or a piece of information after sub-database and sub-table. Figure 1 is a schematic diagram of the application of database self-incrementing serial number to generate data identification in the prior art. As shown in Figure 1, in the prior art, the method of database self-incrementing serial number can usually be used to generate the ID identification of the distributed system. In the system, each client shares a database, and each client generates a data identification based on the self-increasing serial number function of the database. It can be seen that the method of self-incrementing the serial number of the database has a strong dependence on the database. If the database fails, the entire distributed system cannot generate data identification, which is prone to single-point disaster recovery and other problems, which cannot satisfy the distributed system. The requirements for the generation of a global unique ID in the system environment. Therefore, there is a great need for an implementation solution that can meet the identification generation requirements of a distributed system.

本說明書目的在於提供一種資料物件標識生成方法及裝置,可以由分散式系統內各用戶端獨立生成對應資料的識別標識,依賴性比較弱,適用性強。 一方面本說明書實施例提供了一種資料物件標識生成方法,包括: 確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端; 獲取所述目標用戶端的機器屬性資訊; 根據所述機器屬性資訊生成所述資料標識物件的識別標識。 進一步地,所述方法的另一個實施例中,所述目標用戶端的機器屬性資訊包括:所述目標用戶端的機器時間、所述目標用戶端的機器號; 相應地,所述根據所述機器屬性資訊生成所述資料標識物件的識別標識,包括: 將所述目標用戶端的機器時間轉換成預設格式的時間標識; 基於所述機器時間生成所述資料標識物件對應的序列號標識; 根據所述時間標識、所述機器號、所述序列號標識生成所述資料標識物件的識別標識。 進一步地,所述方法的另一個實施例中,所述目標用戶端的機器號的獲取方法包括: 將所述目標用戶端連結到所述分散式系統的程式協調服務組件,在所述程式協調服務組件的機器號根節點下檢測是否存在所述目標用戶端註冊資訊; 若存在所述目標用戶端的註冊資訊,則從所述程式協調服務組件中獲取順序持久節點中的序號,根據所述順序持久節點中的序號生成所述目標用戶端對應的機器號; 若不存在所述目標用戶端的註冊資訊,則在所述程式協調服務組件中的機器號根節點下創建順序持久節點,並根據所述創建的順序持久節點的序號生成所述目標用戶端對應的機器號。 進一步地,所述方法的另一個實施例中,所述基於所述目標用戶端的機器時間生成所述資料標識物件對應的序列號標識,包括: 獲取所述目標用戶端的歷史機器時間,所述歷史機器時間為所述目標用戶端生成歷史資料標識物件的識別標識時的機器時間,所述歷史資料標識物件表示所述資料標識物件對應的前一個資料標識物件; 判斷所述機器時間與所述歷史機器時間是否相同; 若所述機器時間與所述歷史機器時間相同,則將所述歷史資料標識物件的序列號標識增加預設序列值生成所述資料標識物件的序列號標識; 若判斷所述機器時間與所述歷史機器時間不相同,則將序列號初始值作為所述資料標識物件的序列號標識。 進一步地,所述方法的另一個實施例中,所述根據所述目標用戶端的機器時間生成所述資料標識物件對應的序列號標識,還包括: 生成資料標識物件對應的序列號標識後,判斷所述機器時間對應的序列號標識的數量是否超過預設臨界值,若超過,則更新所述機器時間獲得更新機器時間,並根據所述更新機器時間生成所述資料標識物件對應的序列號標識。 進一步地,所述方法的另一個實施例中,所述判斷所述機器時間對應的序列號標識的數量是否超過預設臨界值的方法包括: 判斷所述序列號標識的值是否大於所述預設臨界值,若大於,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值; 和/或,判斷所述序列號標識的值與所述預設臨界值進行模數運算的結果是否等於零,若等於零,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值。 進一步地,所述方法的另一個實施例中,所述方法還包括: 每隔預設時間獲取所述目標用戶端的上報時間; 若所述機器時間小於所述上報時間,則確定所述目標用戶端存在異常行為,進行警告提示。 進一步地,所述方法的另一個實施例中,所述方法還包括: 若所述機器時間大於等於所述上報時間,則獲取所述上報時間對應的各用戶端對應的上報時間的平均值; 判斷所述機器時間與所述上報時間的平均值的差值的絕對值是否大於時間臨界值,若大於,則確定所述目標用戶端存在異常行為,進行警告提示。 另一方面,本說明書提供了資料物件標識生成裝置,應用於分散式系統,包括: 標識物件確定模組,用於確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端; 屬性資訊獲取模組,用於獲取所述目標用戶端的機器屬性資訊; 標識生成模組,用於根據所述機器屬性資訊生成所述資料標識物件的識別標識。 進一步地,所述裝置的另一個實施例中,所述目標用戶端的機器屬性資訊包括:所述目標用戶端的機器時間、所述目標用戶端的機器號; 相應地,所述標識生成模組包括: 時間標識生成單元,用於將所述目標用戶端的機器時間轉換成預設格式的時間標識; 序列號生成單元,用於基於所述機器時間生成所述資料標識物件對應的序列號標識; 標識合成單元,用於根據所述時間標識、所述機器號、所述序列號標識生成所述資料標識物件的識別標識。 進一步地,所述裝置的另一個實施例中,所述屬性資訊獲取模組包括機器號生成單元,所述機器號生成單元用於: 將所述目標用戶端連結到所述分散式系統的程式協調服務組件,在所述程式協調服務組件的機器號根節點下檢測是否存在所述目標用戶端註冊資訊; 若存在所述目標用戶端的註冊資訊,則從所述程式協調服務組件中獲取順序持久節點中的序號,根據所述順序持久節點中的序號生成所述目標用戶端對應的機器號; 若不存在所述目標用戶端的註冊資訊,則在所述程式協調服務組件中的機器號根節點下創建順序持久節點,並根據所述創建的順序持久節點的序號生成所述目標用戶端對應的機器號。 進一步地,所述裝置的另一個實施例中,所述序列號生成單元具體用於: 獲取所述目標用戶端的歷史機器時間,所述歷史機器時間為所述目標用戶端生成歷史資料標識物件的識別標識時的機器時間,所述歷史資料標識物件表示所述資料標識物件對應的前一個資料標識物件; 判斷所述機器時間與所述歷史機器時間是否相同; 若所述機器時間與所述歷史機器時間相同,則將所述歷史資料標識物件的序列號標識增加預設序列值生成所述資料標識物件的序列號標識; 若判斷所述機器時間與所述歷史機器時間不相同,則將序列號初始值作為所述資料標識物件的序列號標識。 進一步地,所述裝置的另一個實施例中,所述序列號生成單元還用於: 生成所述序列號標識後,判斷所述機器時間對應的序列號標識的數量是否超過預設臨界值,若超過,則更新所述機器時間獲得更新機器時間,並根據所述更新機器時間生成所述序列號標識。 進一步地,所述裝置的另一個實施例中,所述序列號生成單元還用於: 判斷所述序列號標識的值是否大於所述預設臨界值,若大於,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值; 和/或,判斷所述序列號標識的值與所述預設臨界值進行模數運算的結果是否等於零,若等於零,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值。 進一步地,所述裝置的另一個實施例中,所述裝置還包括回撥處理模組,所述回撥處理模組用於: 每隔預設時間獲取所述目標用戶端的上報時間; 若所述機器時間小於所述上報時間,則確定所述目標用戶端存在異常行為,進行警告提示。 進一步地,所述裝置的另一個實施例中,所述回撥處理模組還用於: 在所述機器時間大於等於所述上報時間時,則獲取所述上報時間對應的各用戶端對應的上報時間的平均值; 判斷所述機器時間與所述上報時間的平均值的差值的絕對值是否大於時間臨界值,若大於,則確定所述目標用戶端存在異常行為,進行警告提示。 再一方面,本說明書實施例提供了一種資料物件標識生成設備,應用於分散式系統,包括處理器及用於儲存處理器可執行指令的儲存器,所述指令被所述處理器執行時實現包括以下步驟: 確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端; 獲取所述目標用戶端的機器屬性資訊; 根據所述機器屬性資訊生成所述資料標識物件的識別標識。 又一方面,本說明書實施例提供了一種分散式系統,包括至少一個應用伺服器,所述應用伺服器包括至少一個處理器以及用於儲存處理器可執行指令的儲存器,所述應用伺服器在生成資料標識物件的識別標識時,所述處理器執行所述指令時實現上述資料物件標識生成方法。 本說明書提供的資料物件標識生成方法、裝置、設備,基於目標用戶端本身的機器屬性資訊生成資料標識物件的識別標識,可以區別於其他用戶端生成的標識,避免資料標識的重複,使得生成的識別標識可以在整個分散式系統中應用。方法簡單快捷,分散式系統中的各用戶端可以不需要依賴中央控制系統或統一的資料庫獨立生成資料標識,依賴性比較弱,適用性強,可以避免因依賴同一個資料庫導致的單點容災等問題。The purpose of this manual is to provide a method and device for generating data object identifiers, which can independently generate corresponding data identifiers by each user in the distributed system, with relatively weak dependence and strong applicability. On the one hand, the embodiments of this specification provide a method for generating a data object identifier, including: Determine a data identification object, and a target client used in the distributed system to generate an identification of the data identification object; Acquiring machine attribute information of the target client; The identification mark of the data identification object is generated according to the machine attribute information. Further, in another embodiment of the method, the machine attribute information of the target client includes: the machine time of the target client, and the machine number of the target client; Correspondingly, the generating the identification mark of the data identification object according to the machine attribute information includes: Converting the machine time of the target client into a time identifier in a preset format; Generating a serial number identification corresponding to the data identification object based on the machine time; The identification mark of the material identification object is generated according to the time mark, the machine number, and the serial number mark. Further, in another embodiment of the method, the method for obtaining the machine number of the target client includes: Link the target client to the program coordination service component of the distributed system, and detect whether the target client registration information exists under the root node of the machine number of the program coordination service component; If the registration information of the target client exists, obtain the serial number in the sequence persistent node from the program coordination service component, and generate the machine number corresponding to the target client according to the serial number in the sequence persistent node; If the registration information of the target client does not exist, create a sequential persistent node under the machine number root node in the program coordination service component, and generate the corresponding target client according to the sequence number of the created sequential persistent node machine code. Further, in another embodiment of the method, the generating the serial number identification corresponding to the data identification object based on the machine time of the target client includes: Obtain the historical machine time of the target client, where the historical machine time is the machine time when the target client generates the identification identifier of the historical data identification object, and the historical data identification object represents the previous one corresponding to the data identification object Data identification objects; Determine whether the machine time is the same as the historical machine time; If the machine time is the same as the historical machine time, adding a preset serial value to the serial number identification of the historical data identification object to generate the serial number identification of the data identification object; If it is determined that the machine time is not the same as the historical machine time, the initial value of the serial number is used as the serial number identification of the data identification object. Further, in another embodiment of the method, the generating the serial number identification corresponding to the data identification object according to the machine time of the target client terminal further includes: After the serial number identification corresponding to the data identification object is generated, it is determined whether the number of the serial number identification corresponding to the machine time exceeds a preset threshold, if it exceeds, the machine time is updated to obtain the updated machine time, and the machine time is updated according to the machine time. The serial number identification corresponding to the data identification object is generated in time. Further, in another embodiment of the method, the method of judging whether the number of serial number identifiers corresponding to the machine time exceeds a preset threshold value includes: Judging whether the value of the serial number identifier is greater than the preset critical value, and if it is greater, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset critical value; And/or, determining whether the result of the modulo operation between the value of the serial number identifier and the preset critical value is equal to zero, and if it is equal to zero, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset threshold value. Further, in another embodiment of the method, the method further includes: Obtain the reporting time of the target client every preset time; If the machine time is less than the report time, it is determined that the target client has abnormal behavior, and a warning is given. Further, in another embodiment of the method, the method further includes: If the machine time is greater than or equal to the reporting time, obtain the average value of the reporting time corresponding to each user terminal corresponding to the reporting time; It is determined whether the absolute value of the difference between the machine time and the average value of the reported time is greater than the time critical value, and if it is greater, it is determined that the target client has abnormal behavior and a warning is given. On the other hand, this manual provides a data object identification generating device, which is applied to a distributed system, including: The identification object determination module is used to determine the data identification object, and the target client used in the distributed system to generate the identification identification of the data identification object; The attribute information obtaining module is used to obtain the machine attribute information of the target client; The identification generation module is used to generate the identification identification of the data identification object according to the machine attribute information. Further, in another embodiment of the device, the machine attribute information of the target client includes: the machine time of the target client, and the machine number of the target client; Correspondingly, the identification generating module includes: A time mark generating unit, used to convert the machine time of the target client into a time mark in a preset format; A serial number generating unit, configured to generate a serial number identification corresponding to the data identification object based on the machine time; The identification synthesis unit is configured to generate the identification identification of the material identification object according to the time identification, the machine number, and the serial number identification. Further, in another embodiment of the device, the attribute information acquisition module includes a machine number generating unit, and the machine number generating unit is configured to: Link the target client to the program coordination service component of the distributed system, and detect whether the target client registration information exists under the root node of the machine number of the program coordination service component; If the registration information of the target client exists, obtain the serial number in the sequence persistent node from the program coordination service component, and generate the machine number corresponding to the target client according to the serial number in the sequence persistent node; If the registration information of the target client does not exist, create a sequential persistent node under the machine number root node in the program coordination service component, and generate the corresponding target client according to the sequence number of the created sequential persistent node machine code. Further, in another embodiment of the device, the serial number generating unit is specifically configured to: Obtain the historical machine time of the target client, where the historical machine time is the machine time when the target client generates the identification identifier of the historical data identification object, and the historical data identification object represents the previous one corresponding to the data identification object Data identification objects; Determine whether the machine time is the same as the historical machine time; If the machine time is the same as the historical machine time, adding a preset serial value to the serial number identification of the historical data identification object to generate the serial number identification of the data identification object; If it is determined that the machine time is not the same as the historical machine time, the initial value of the serial number is used as the serial number identification of the data identification object. Further, in another embodiment of the device, the serial number generating unit is further configured to: After the serial number identification is generated, it is determined whether the number of serial number identifications corresponding to the machine time exceeds a preset critical value, and if it exceeds, the machine time is updated to obtain the updated machine time, and the machine time is generated according to the updated machine time. The serial number identification. Further, in another embodiment of the device, the serial number generating unit is further configured to: Judging whether the value of the serial number identifier is greater than the preset critical value, and if it is greater, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset critical value; And/or, determining whether the result of the modulo operation between the value of the serial number identifier and the preset critical value is equal to zero, and if it is equal to zero, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset threshold value. Further, in another embodiment of the device, the device further includes a callback processing module, and the callback processing module is configured to: Obtain the reporting time of the target client every preset time; If the machine time is less than the report time, it is determined that the target client has abnormal behavior, and a warning is given. Further, in another embodiment of the device, the callback processing module is further used for: When the machine time is greater than or equal to the reporting time, obtaining the average value of the reporting time corresponding to each user terminal corresponding to the reporting time; It is determined whether the absolute value of the difference between the machine time and the average value of the reported time is greater than the time critical value, and if it is greater, it is determined that the target client has abnormal behavior and a warning is given. On the other hand, an embodiment of this specification provides a data object identification generating device, which is applied to a distributed system, and includes a processor and a memory for storing executable instructions of the processor, which are implemented when the instructions are executed by the processor. It includes the following steps: Determine a data identification object, and a target client used in the distributed system to generate an identification of the data identification object; Acquiring machine attribute information of the target client; The identification mark of the data identification object is generated according to the machine attribute information. In another aspect, an embodiment of the present specification provides a distributed system, including at least one application server, the application server including at least one processor and a memory for storing executable instructions of the processor, the application server When generating the identification mark of the data identification object, the processor executes the instruction to implement the above-mentioned data object identification generation method. The data object identification generation method, device, and equipment provided in this manual generate the identification identification of the data identification object based on the machine attribute information of the target client itself, which can be distinguished from the identification generated by other users, avoiding the duplication of data identification and making the generated The identification mark can be applied in the entire decentralized system. The method is simple and fast. Each user terminal in the distributed system does not need to rely on the central control system or a unified database to independently generate data identification. The dependence is relatively weak and the applicability is strong. It can avoid the single point caused by relying on the same database. Disaster tolerance and other issues.

為了使本技術領域的人員更好地理解本說明書中的技術方案,下面將結合本說明書實施例中的圖式,對本說明書實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本說明書一部分實施例,而不是全部的實施例。基於本說明書中的實施例,本領域普通技術人員在沒有作出創造性勞動前提下所獲得的所有其他實施例,都應當屬本說明書保護的範圍。 分散式系統是建立在網路之上的軟體系統,可以處理各項協助的任務,整合出結果。分散式系統中可以擁有多種通用的實體和邏輯資源,可以動態的分配任務,分散的實體和邏輯資源透過電腦網路實現資訊交換。通常情況下,分散式系統中可以包括多個用戶端,各用戶端可以協調工作,即分散式系統中的各用戶端可以相互協調處理一個任務。在個用戶端進行協調工作時,同一個資料可能會流入不同的用戶端中,此時,可以將資料進行標識,以便系統對資料的識別和統一管理。例如:支付系統可以包括用戶用戶端和商戶用戶端,可以使用訂單號對用戶的訂單資訊進行標識,在用戶用戶端和商戶用戶端中相同的訂單號可以表示同一個訂單資訊,方便系統管理以及對其他的資料處理。 本說明書實施例提供的資料物件標識生成方法,可以在分散式系統中的各個用戶端中整合一個用於生成將資料物件標識的組件,各用戶端可以根據自身的標識資訊為資料標識物件生成對應的識別標識。各用戶端生成的資料物件的標識基於用戶端本身的機器屬性資訊,因此,各用戶端生成的識別標識可以區別於其他用戶端生成的標識。方法簡單,分散式系統中的各用戶端可以獨立生成資料標識,不需要共用一個資料庫也不需要中央控制系統控制資料標識的生成,依賴性比較弱,適用性強,可以避免因依賴同一個資料庫導致單點容災等問題。 本說明書實施例中的用戶端可以是能夠提供資料處理的應用伺服器,例如:可以是電腦、智慧手機、平板電腦、智慧可穿戴設備(智慧手錶、虛擬實境眼鏡、虛擬實境頭盔等)等電子設備。 具體地,圖2是本說明書提供的一個實施例中的資料物件標識生成方法的流程示意圖,如圖2所示,本說明書實施例提供的資料物件標識生成方法,包括: S2、確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端。 圖3是本說明書一個實施例中分散式系統的結構示意圖,如圖3所示,分散式系統一般可以包括多個用戶端如:N個應用伺服器,圖3中的用戶端也可以是應用伺服器。本說明書一個實施例中,可以在每個應用伺服器中整合ID生成組件(即標識生成組件)。在對資料標識物件生成識別標識即ID時,ID生成組件可以先確定出資料標識物件以及為該資料標識物件生成識別標識的目標用戶端(可以是應用伺服器中的一個或多個)。可以在接收到標識生成請求後,根據標識生成請求確定出資料標識物件以及對應的目標用戶端,如:若目標用戶端在資料處理過程中,接收到某個資料標識物件的標識生成請求,目標用戶端中的ID生成組件可以根據標識生成請求確定出對應的資料標識物件;或者分散式系統接收到標識生成請求後,可以根據標識生成請求確定出資料標識物件,基於資料標識物件確定出為該資料標識物件生成識別標識的目標用戶端。 S4、獲取所述目標用戶端的機器屬性資訊。 在確定出需要生成識別標識的資料標識物件以及對應的目標用戶端後,可以獲取目標用戶端對應的機器屬性資訊,機器屬性資訊可以包括用來生成識別標識的目標用戶端以及資料標識物件的資訊。例如:機器屬性資訊可以包括目標用戶端的機器號、目標用戶端的通訊位址標識、接收資料標識物件時目標用戶端的時間、目標用戶端當前的時間、資料標識物件的標識資訊(如:關鍵詞等)。 本說明書一個實施例中,所述目標用戶端的機器屬性資訊可以包括:所述目標用戶端的機器時間、所述目標用戶端的機器號。目標用戶端的機器時間可以表示目標用戶端接收到標識生成請求時目標用戶端上的時間,也可以是目標用戶端在生成資料標識時的目標用戶端上的時間,當然根據實際需要還可以是其他的時間如:接收到資料標識物件時目標用戶端上的時間等。目標用戶端的機器號可以表示用於標識識別目標用戶端的序號、編碼、標識等,通常情況下同一個用戶端的機器號是相同的。目標用戶端的機器號可以是目標用戶端自帶的,也可以是根據實際需要預先為各個用戶端設置好的。 S6、根據所述機器屬性資訊生成所述資料標識物件的識別標識。 在獲取到目標用戶端對應的機器屬性資訊後,基於獲取到的機器屬性資訊生成資料標識物件的識別標識,如:可以將獲取到的機器屬性資訊作為資料標識物件的識別標識,或者將獲取到的機器屬性資訊按照預設的規則進行編碼生成資料標識物件的識別標識,完成分散式系統中資料標識(即識別標識)的生成。目標用戶端生成的識別標識基於目標用戶端本身的機器屬性資訊,可以區別於其他用戶端生成的標識,避免不同資料標識物件的識別標識出現重複,使得生成的識別標識可以在整個分散式系統中應用。本說明書實施例中資料物件標識的生成方法簡單快捷,分散式系統中的各用戶端可以獨立生成資料標識,可以不需要依賴中央控制系統或統一的資料庫獨立生成資料標識,依賴性比較弱,適用性強,可以避免因依賴同一個資料庫導致的單點容災等問題。 在上述實施例的基礎上,本說明書一個實施例中,在獲取到目標用戶端的機器時間、機器號後,根據所述機器屬性資訊生成所述資料標識物件的識別標識的方法可以包括: 將所述目標用戶端的機器時間轉換成預設格式的時間標識; 基於所述機器時間生成所述資料標識物件對應的序列號標識; 根據所述時間標識、所述機器號、所述序列號標識生成所述資料標識物件的識別標識。 具體地,本說明書一個實施例中資料標識物件的識別標識可以包括時間標識、機器號、序列號標識。可以預先設置時間標識的編碼方式如:時間標識的位數等,在獲取到目標用戶端對應的機器時間後,可以將機器時間按照預設格式轉換成時間標識。如:本發明實施例中的時間精度可以設置為毫秒,可以預先設置時間標識的編碼方式為41位的時間戳號段。可以獲取目標用戶端的機器時間後,將機器時間作為資料標識物件對應的時間標識,其中,若機器時間的位數小於預先設置的時間標識的位數,則可以將不足的位數設置為0。根據實際需要還可以設置時間標識為其他位數或其他的編碼格式,本說明書實施例不作具體限定。 當然,也可以預先設置機器號、序列號標識的編碼方式如位數等,按照預先設置的編碼方式生成對應的機器號、序列號標識。 此外,本說明書實施例還可以根據獲取到的目標用戶端的機器時間生成序列號標識,如:可以將機器時間加上前綴或後綴以表示生成的識序列號的前後順序以及數量等。例如:獲取到的機器時間為T,則可以在機器時間之後加上後綴如:T-0001,可以表示在時間T內生成的第一個序列號標識。 本說明書一個實施例中,機器號的位數可以根據線上的用戶端的數量來決定,如:若將機器號的位數設置為P,則能夠生成2^P個用戶端的機器號,如:當P=10的時候,能夠設置1024個用戶端的機器號。在用戶端的資料量少的情況下也可以採取手工配置機器號的方式。若預先設置的序列號標識的位數為M,則共計能夠生成2^M個序列號,如:當M=12時,能夠計數4096個序列號。 在獲得時間標識、機器號、序列號標識後,可以將時間標識、機器號、序列號標識合併作為資料標識物件的識別標識,或者可以在時間標識、機器號、序列號標識之間加上間隔符號等其他符號組合在一起作為資料標識物件的識別標識。圖4是本說明書一個實施例中資料物件標識生成的規則示意圖,如圖4所示,本發明實施例中生成的資料標識物件的識別標識為“時間標識-機器號-序列號標識”,其中時間標識為41位,機器號為P位,序列號為M位,可以根據實際需要設置時間標識、機器號、序列號的位數。M、P的具體數值可以根據實際需要進行設置,本發明實施例不作具體限定。 本說明書實施例提供的方法,利用目標用戶端的機器時間、機器號,生成資料標識物件的識別標識,機器時間可以區別不同時間生成的識別標識,機器號可以區別不同用戶端生成的識別標識,序列號可以區別同一時間同一用戶端生成的識別標識,使得生成的識別標識具有全域唯一性,可以應用於整個分散式系統,方法簡單方便,適用性強。 在上述實施例的基礎上,本說明書一個實施例中,所述目標用戶端的機器號的獲取方法包括: 將所述目標用戶端連結到所述分散式系統的程式協調服務組件,在所述程式協調服務組件的機器號根節點下檢測是否存在所述目標用戶端註冊資訊; 若存在所述目標用戶端的註冊資訊,則從所述程式協調服務組件中獲取順序持久節點中的序號,根據所述順序持久節點中的序號生成所述目標用戶端對應的機器號; 若不存在所述目標用戶端的註冊資訊,則在所述程式協調服務組件中的機器號根節點下創建順序持久節點,並根據所述創建的順序持久節點的序號生成所述目標用戶端對應的機器號。 分散式系統的程式協調服務組件可以用於協調分散式系統中各用戶端的工作,本說明書一個實施例中,分散式系統的程式協調服務組件可以是ZooKeeper組件,ZooKeeper是一個分散式的,開放源碼的分散式應用程式協調服務,可以為分散式系統提供一致性服務的軟體,提供的功能可以包括:配置維護、域名服務、分散式同步、組服務等。當然,根據實際需要分散式系統的程式協調服務組件還可以是其他能夠協調分散式系統的組件,本發明實施例不作具體限定。 圖5是本說明書一個實施例中機器號生成的流程示意圖,如圖5所示,本說明書一個實施例中可以在目標用戶端(應用伺服器)啟動時,將目標用戶端連結到分散式系統的程式協調服務組件如ZooKeeper上。若分散式系統中的用戶端在ZooKeeper的機器號根節點中註冊過,則ZooKeeper可以為註冊過的用戶端生成一個順序持久節點。在創建節點的過程中,ZooKeeper會在創建的節點名後自動追加一個單調增長的數字後綴,作為新的節點名,並且ZooKeeper具有順序持久節點的特性,即節點創建後,會一直存在,不會因用戶端會話失效而刪除。 本說明書一個實施例中,可以在ZooKeeper的機器號根節點下檢測目標用戶端是否註冊過,即檢測ZooKeeper的機器號根節點下是否有目標用戶端的註冊資訊。如圖3所示,ZooKeeper的順序持久節點中可以包括機器號根節點,機器號根節點中可以儲存註冊過的用戶端以及用戶端對應的節點的序號。圖3中只示意出兩個用戶端的機器號根節點的序號和上報時間,實際ZooKeeper的順序持久節點可以儲存多個,圖3中不作具體示意。若目標用戶端在ZooKeeper的機器號根節點下註冊過,則可以直接在ZooKeeper的機器號根節點下獲取目標用戶端對應的順序持久節點中的序號,可以根據獲取到的順序持久節點中的序號生成目標用戶端的機器號。如:可以將獲取到的順序持久節點中的序號作為目標用戶端的機器號,或者將獲取到的順序持久節點中的序號按照預設的機器號編碼格式轉換成目標用戶端的機器號。若檢測到目標用戶端沒有在ZooKeeper的機器號根節點下註冊過,即ZooKeeper的機器號根節點下沒有目標用戶端的註冊資訊,可以說明目標用戶端是第一次生成機器號。可以在ZooKeeper的機器號根節點下創建一個順序持久節點,並根據創建的順序持久節點對應的序號生成目標用戶端對應的機器號。同樣的,也可以將創建的順序持久節點的序號作為目標用戶端的機器號,或者將創建的順序持久節點的序號按照預設的機器號編碼格式轉換成目標用戶端的機器號。 本說明書一個實施例中在獲取到目標用戶端的機器號後,該機器號通常不會發生變化,因此,在資料標識的生成過程中,可以只獲取一次目標用戶端的機器號,將獲取到的目標用戶端的機器號保存。在利用該目標用戶端生成其他資料標識物件的識別標識時,可以直接使用第一次獲取到的目標用戶端的機器號,不需要再利用ZooKeeper重新獲取。 此外,還可以利用ZooKeeper獲取目標用戶端的機器時間,如在檢測目標用戶端是否在ZooKeeper的機器號根節點中註冊過時,若目標用戶端已經註冊,可以利用ZooKeeper記錄目標用戶端的機器時間,若目標用戶端沒有註冊,則可以創建目標用戶端的順序持久節點,並記錄目標用戶端的機器時間。 本說明書一個實施例,利用ZooKeeper的順序持久節點自適應的生成出機器號,免去人工配置機器號的複雜度,並且配置機器號的用戶端的數量沒有一定的限制,方法簡單,適用性強。 圖6是本說明書一個實施中序列號標識生成的流程示意圖,如圖6所示,在上述實施例的基礎上,本說明書一個實施例中,所述基於所述目標用戶端的機器時間生成所述資料標識物件對應的序列號標識,包括: 獲取所述目標用戶端的歷史機器時間,所述歷史機器時間為所述目標用戶端生成歷史資料標識物件的識別標識時的機器時間,所述歷史資料標識物件表示所述資料標識物件對應的前一個資料標識物件; 判斷所述機器時間與所述歷史機器時間是否相同; 若所述機器時間與所述歷史機器時間相同,則將所述歷史資料標識物件的序列號標識增加預設序列值生成所述資料標識物件的序列號標識; 若判斷所述機器時間與所述歷史機器時間不相同,則將序列號初始值作為所述資料標識物件的序列號標識。 具體地,本說明書實施例中的時間精度可以設置為毫秒,一毫秒內同一個用戶端可能會為多個資料標識物件生成識別標識。獲取目標用戶端的機器時間以及目標用戶端在生成上一個資料標識物件(即歷史資料標識物件)的識別標識時的機器時間即歷史機器時間,比較機器時間和歷史機器時間是否相同。具體可以比較機器時間中的毫秒數和歷史機器時間中的毫秒數是否相同,如:圖6中獲取的當前毫秒數可以表示為目標用戶端的機器時間的毫秒數,上次毫秒數可以表示為歷史機器時間中的毫秒數。若機器時間和歷史機器時間一致,即當前毫秒數與上次毫秒數相同,則可以說明此時序列號標識的生成時間與上次序列號標識的生成時間一致,可以將上一個資料標識物件的序列號標識增加預設序列值,生成當前的資料標識物件的序列號標識。若機器時間和歷史機器時間不一致,即當前毫秒數與上次毫秒數不相同,則說明此時序列號的生成時間與上次序列號生成的時間不一致,不能按照上次序列號標識的生成規則生成此次的序列號標識。本說明書實施例中,在機器時間和歷史機器時間不一致時,可以將當前的資料標識物件的序列號標識設置為序列號初始值,序列號初始值可以設置為0或其他數值。 例如:若需要利用目標用戶端上對資料標識物件A生成對應的識別標識,獲取目標用戶端的當前的機器時間的毫秒數即當前毫秒數,以及目標用戶端在生成資料標識物件A之前一個資料標識物件B的識別標識對應的歷史機器時間的毫秒數即上次毫秒數。判斷當前毫秒數是否等於上次毫秒數,若等於,則可以將資料標識物件B的識別標識中的序列號標識b增加預設序列值c作為資料標識物件A的序列號標識a。如圖6所示,也可以使用序列號標識=(序列號標識+1)%(2^M)計算資料標識物件A的序列號標識,其中“%”表示取模計算,M可以表示預先設置的序列號標識的位數。公式中等號右邊括號內的序列號標識可以表示上一個資料標識物件的序列號標識即資料標識物件B的識別標識中的序列號標識b,等號左邊的序列號可以表示當前的資料標識物件的序列號標識即資料標識物件A的序列號標識a。當然,也可以直接使用序列號標識=序列號標識+1的計算方法生成資料標識物件A的序列號標識,“序列號標識+1”也可以使用“序列號標識+其他數值”進行計算。若判斷當前毫秒數不等於上次毫秒數,則可以將資料標識物件A的序列號標識設置為0,0可以表示序列號標識的初始值。 如圖6所示,本說明書一個實施例中,所述根據所述目標用戶端的機器時間生成所述資料標識物件對應的序列號標識,還包括: 生成資料標識物件對應的序列號標識後,判斷所述機器時間對應的序列號標識的數量是否超過預設臨界值,若超過,則更新所述機器時間獲得更新機器時間,並根據所述更新機器時間生成所述資料標識物件對應的序列號標識。 例如:在生成資料標識物件A的序列號標識後,可以判斷當前的機器時間如當前毫秒數內生成的序列號標識是否超過預設臨界值,若超過,則生成的序列號標識可能會出現重複。預設臨界值可以設置為2^M,M可以表示序列號標識的位數。本說明書一個實施例中,在判斷當前的機器時間如當前毫秒數內生成的序列號標識超過預設臨界值後,可以阻塞到下一毫秒數即更新機器時間即:可以等待1毫秒,獲取等待1毫秒後的目標用戶端的機器時間,此時更新機器時間的毫秒數等於當前毫秒數+1。基於更新後的機器時間生成資料標識物件對應的序列號標識,更新後的機器時間可以認為是第一次生成序列號標識,因此,此時生成的序列號標識可以是序列號標識的初始值。同時,如圖6所示,還可以即時更新歷史機器時間即更新上次毫秒數,以便於為下一個資料標識物件生成序列號標識。 本說明書一個實施例中,判斷當前的機器時間如當前毫秒數內生成的序列號標識是否超過預設臨界值的方法可以包括: 判斷所述序列號標識的值是否大於所述預設臨界值,若大於,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值; 和/或,判斷所述序列號標識的值與所述預設臨界值進行模數運算的結果是否等於零,若等於零,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值。 具體地,若使用上一個資料標識物件的序列號標識增加預設序列值的方式生成序列號標識時,則可以判斷當前的資料標識物件的序列號標識的值是否大於預設臨界值的方式,判斷當前的機器時間(如:當前毫秒數)內生成的序列號標識是否超過預設臨界值。若當前的資料標識物件的序列號標識的值大於預設臨界值,則可以確定當前的機器時間內生成的序列號標識超過預設臨界值。若使用的是序列號標識的值與預設臨界值進行模數運算的方式生成序列號標識時,則可以透過判斷當前的資料標識物件的序列號標識的值與預設臨界值進行模數運算的結果是否為0,判斷當前的機器時間生成的序列號標識是否超過預設臨界值。若當前的資料標識物件的序列號標識的值與預設臨界值進行模數運算的結果為0,則可以確定當前的機器時間內生成的序列號標識超過預設臨界值。 本說明書實施例中,可以預先設置序列號標識的編碼方式,如:預先設置序列號標識的位數,若當前的機器時間內生成的序列號標識超過預設臨界值,說明按照當前的機器時間繼續生成序列號標識時,序列號標識會出現重複或者超出預先設置的序列號標識的位數。本說明書實施例可以透過等待一毫秒更新機器時間的方式,繼續生成序列號標識,以避免序列號標識重複或者超出預先設置的序列號標識的位數。 下面結合圖6具體介紹本說明書實施例中序列號標識的生成方法: (1)獲取目標用戶端的當前毫秒數、上次毫秒數。 (2)判斷上次毫秒數與當前毫秒數是否一致,若一致轉步驟(3),若不一致轉步驟(4)。 (3)序列號標識=(序列號標識+1)%(2^M)。 (4)序列號標識=0,轉到步驟(7)。 (5)判斷序列號標識是否等於0,若不為零轉到步驟(7),若為零轉到步驟(6)。 (6)若序列號標識為0,說明當前毫秒數已經溢出,需要阻塞到下一毫秒。 (7)更新上次毫秒數為當前毫秒數。 (8)傳回序列號標識即輸出序列號標識。 本說明書實施例提供的方法,基於目標用戶端的機器時間以依次遞增的方式生成資料標識物件的序列號標識,生成的資料標識物件的識別標識基於時間序列整體呈遞增趨勢,有利於後續資料庫索引,能夠提升資料庫檢索的效率。 圖7是本說明書一個實施例中時鐘回撥控制的流程示意圖,如圖7所示,在上述實施例的基礎上,本說明書一個實施例中,所述方法還包括: 每隔預設時間獲取所述目標用戶端的上報時間; 若所述機器時間小於所述上報時間,則確定所述目標用戶端存在異常行為,進行警告提示。 目標用戶端的上報時間可以表示目標用戶端上報到分散式系統的時間,即目標用戶端向分散式系統上報該用戶端的當前時間。可以每隔預設時間獲取一次目標用戶端的上報時間,判斷目標用戶端的上報時間與獲取到的目標用戶端的機器時間的大小關係。若獲取到的目標用戶端的機器時間小於目標用戶端的上報時間,則可以說明目標用戶端存在時鐘回撥等異常。目標用戶端出現時鐘回撥時,可能會導致基於目標用戶端的機器時間生成的時間標識、序列號標識出現重複,進一步導致生成的資料標識物件的識別標識出現重複。此時,可以進行警告提示,提醒操作人員檢修,警告提示操作可以包括:將當前的資料標識物件的識別標識的生成操作進行置失敗操作並警告提示,也可以只是發出警報提醒操作人員檢修。 透過目標用戶端的機器時間、上報時間進行對比,識別目標用戶端是否出現機器時鐘回撥等異常,在目標用戶端出現機器時鐘回撥等異常時,可以進行警告提示。避免生成的資料標識物件的識別標識出現重複,以提高生成的資料標識物件的識別標識的準確性。 如圖7所示,本說明書一個實施例中,若判斷出所述機器時間大於等於所述上報時間,則獲取所述上報時間對應的各用戶端對應的上報時間的平均值; 判斷所述機器時間與所述上報時間的平均值的差值的絕對值是否大於時間臨界值,若大於,則確定所述目標用戶端存在異常行為,進行警告提示。 具體地,若目標用戶端的機器時間大於等於上報時間,本說明書一個實施例中還可以獲取該上報時間對應的所有用戶端的上報時間的平均值。可以透過ZooKeeper獲取上報時間對應的所有用戶端的上報時間,並計算出各上報時間的平均值。判斷目標用戶端的機器時間和計算獲得的目標用戶端的上報時間對應的所有用戶端的上報時間的平均值之間的差值的絕對值是否大於時間臨界值,時間臨界值可以為設定的各用戶端時間差異臨界值。若判斷目標用戶端的機器時間和計算獲得的上報時間的平均值之間的差值的絕對值大於時間臨界值,可以表示目標用戶端的時鐘與其他用戶端的機器時鐘差異較大,可能出現機器時鐘回撥等異常,可以進行警告提示。 例如:若目標用戶端的機器時間為T、上報時間為T1,則可以透過ZooKeeper獲取到目標用戶端的上報時間對應的上報時間根節點,在該上報時間根節點下可以獲取到所有用戶端在T1時刻的上報時間,計算T1時刻所有用戶端對應的上報時間的平均值T0。計算目標用戶端的機器時間T與上報時間的平均值T0之間的差值的絕對值為T2,判斷T2是否大於時間臨界值t,若大於,則可以確定目標用戶端存在異常,進行警告提示。 如圖7所示,本說明書一個實施例中,可以在目標用戶端啟動時,透過ZooKeeper獲取目標用戶端的上報時間,將上報時間與獲取到的目標用戶端的機器時間進行對比,若確定目標用戶端存在異常時,可以將該啟動操作置失敗並進行警告。若確定出目標用戶端沒有異常,則用戶端啟動成功,並且可以每隔預設時間獲取一次目標用戶端的上報時間,進行目標用戶端的異常行為檢測。 下面結合圖7具體介紹本說明書實施例中機器時鐘回撥控制的過程: (1)目標用戶端啟動,校驗ZooKeeper中機器上報時間根節點中目標用戶端是否已註冊。 (2)若沒註冊則在該機器上報時間根節點下創建順序持久節點,並記錄目標用戶端的上報時間。 (3)獲取目標用戶端的上報時間。 (4)若機器時間小於上報時間,說明該用戶端存在時鐘回撥等異常,轉到步驟(8);若機器時間大於等於上報時間,轉到步驟(5)。 (5)獲取目標用戶端的上報時間根節點下所有用戶端的上報時間,取上報時間的平均值。 (6)判斷目標用戶端的機器時間與上報時間的平均值的差值的絕對值是否大於時間臨界值,若大於轉步驟(8),若不大於,轉步驟(7)。 (7)置成功,並每隔預設時間獲取目標用戶端的上報時間。 (8)置失敗並警告。 本說明書提供的資料物件標識生成方法,針對機器時鐘回撥等異常情況,具備時鐘回撥的監控控制和警告功能,能夠避免機器回撥導致的識別標識的序列號標識、時間標識重複等異常情況,提高了資料標識物件的識別標識生成的準確性。 本說明書中上述方法的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。相關之處參見方法實施例的部分說明即可。 基於上述所述的資料物件標識生成方法,本說明書一個或多個實施例還提供一種資料物件標識生成裝置。所述的裝置可以包括使用了本說明書實施例所述方法的系統(包括分散式系統)、軟體(應用)、模組、組件、伺服器、用戶端等並結合必要的實施硬體的裝置。基於同一創新構思,本說明書實施例提供的一個或多個實施例中的裝置如下面的實施例所述。由於裝置解決問題的實現方案與方法相似,因此本說明書實施例具體的裝置的實施可以參見前述方法的實施,重複之處不再贅述。以下所使用的,術語“單元”或者“模組”可以實現預定功能的軟體和/或硬體的組合。儘管以下實施例所描述的裝置較佳地以軟體來實現,但是硬體,或者軟體和硬體的組合的實現也是可能並被構想的。 具體地,圖8是本說明書提供的資料物件標識生成裝置一個實施例的模組結構示意圖,如圖8所示,本說明書中提供的資料物件標識生成裝置,應用於分散式系統,可以包括:標識物件確定模組81、屬性資訊獲取模組82、標識生成模組83,其中: 標識物件確定模組81,可以用於確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端; 屬性資訊獲取模組82,可以用於獲取所述目標用戶端的機器屬性資訊; 標識生成模組83,可以用於根據所述機器屬性資訊生成所述資料標識物件的識別標識。 本說明書實施例提供的資料物件標識生成裝置, 圖9是本說明書一個實施例中標識生成模組的結構示意圖,如圖9所示,在上述實施例的基礎上,所述目標用戶端的機器屬性資訊包括:所述目標用戶端的機器時間、所述目標用戶端的機器號; 相應地,所述標識生成模組83包括: 時間標識生成單元91,可以用於將所述目標用戶端的機器時間轉換成預設格式的時間標識; 序列號生成單元92,可以用於基於所述機器時間生成所述資料標識物件對應的序列號標識; 標識合成單元93,可以用於根據所述時間標識、所述機器號、所述序列號標識生成所述資料標識物件的識別標識。 本說明書實施例,目標用戶端生成的識別標識基於目標用戶端本身的機器屬性資訊,可以區別於其他用戶端生成的標識,避免資料標識的重複,使得生成的識別標識可以在整個分散式系統中應用。分散式系統中的各用戶端可以獨立生成資料標識,依賴性比較弱,適用性強,可以避免因依賴同一個資料庫導致單點容災等問題。 圖10是本說明書一個實施例中屬性資訊獲取模組的結構示意圖,如圖10所示,在上述實施例的基礎上,所述屬性資訊獲取模組82包括機器號生成單元101,所述機器號生成單元101用於: 將所述目標用戶端連結到所述分散式系統的程式協調服務組件,在所述程式協調服務組件的機器號根節點下檢測是否存在所述目標用戶端註冊資訊; 若存在所述目標用戶端的註冊資訊,則從所述程式協調服務組件中獲取順序持久節點中的序號,根據所述順序持久節點中的序號生成所述目標用戶端對應的機器號; 若不存在所述目標用戶端的註冊資訊,則在所述程式協調服務組件中的機器號根節點下創建順序持久節點,並根據所述創建的順序持久節點的序號生成所述目標用戶端對應的機器號。 本說明書實施例,利用目標用戶端的機器時間、機器號,生成資料標識物件的識別標識,機器時間可以區別不同時間生成的識別標識,機器號可以區別不同用戶端生成的識別標識,序列號可以區別同一時間同一用戶端生成的識別標識,使得生成的識別標識具有全域唯一性,可以應用於整個分散式系統,方法簡單方便,適用性強。 在上述實施例的基礎上,所述序列號生成單元具體用於: 獲取所述目標用戶端的歷史機器時間,所述歷史機器時間為所述目標用戶端生成歷史資料標識物件的識別標識時的機器時間,所述歷史資料標識物件表示所述資料標識物件對應的前一個資料標識物件; 判斷所述機器時間與所述歷史機器時間是否相同; 若所述機器時間與所述歷史機器時間相同,則將所述歷史資料標識物件的序列號標識增加預設序列值生成所述資料標識物件的序列號標識; 若判斷所述機器時間與所述歷史機器時間不相同,則將序列號初始值作為所述資料標識物件的序列號標識。 本說明書實施例,基於目標用戶端的機器時間以依次遞增的方式生成資料標識物件的序列號標識,生成出來的生成資料標識物件的識別標識基於時間序列整體呈遞增趨勢,有利於後續資料庫索引,能夠提升資料庫檢索的效率。 在上述實施例的基礎上,所述序列號生成單元還用於: 生成所述序列號標識後,判斷所述機器時間對應的序列號標識的數量是否超過預設臨界值,若超過,則更新所述機器時間獲得更新機器時間,並根據所述更新機器時間生成所述序列號標識。 本說明書實施例在機器時間內生成指定數量的序列號標識,以避免序列號標識出現重複,提高了分散式系統中資料標識生成的準確性。 在上述實施例的基礎上,所述序列號生成單元還用於: 判斷所述序列號標識的值是否大於所述預設臨界值,若大於,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值; 和/或,判斷所述序列號標識的值與所述預設臨界值進行模數運算的結果是否等於零,若等於零,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值。 圖11是本說明書又一個實施例中資料物件標識生成裝置的模組示意圖,如圖11所示,本說明書一個實施例中的資料物件標識生成裝置還可以包括:回撥處理模組111,所述回撥處理模組111用於: 每隔預設時間獲取所述目標用戶端的上報時間; 若所述機器時間小於所述上報時間,則確定所述目標用戶端存在異常行為,進行警告提示。 本說明書實施例,透過目標用戶端的機器時間、上報時間進行對比,識別目標用戶端是否出現機器時鐘回撥等異常,在目標用戶端出現機器時鐘回撥等異常時,可以進行警告提示。避免生成的資料標識物件的識別標識出現重複,以提高生成的資料標識物件的識別標識的準確性。 在上述實施例的基礎上,所述回撥處理模組還用於: 在所述機器時間大於等於所述上報時間時,則獲取所述上報時間對應的各用戶端對應的上報時間的平均值; 判斷所述機器時間與所述上報時間的平均值的差值的絕對值是否大於時間臨界值,若大於,則確定所述目標用戶端存在異常行為,進行警告提示。 本說明書實施例,透過將目標用戶端的機器時間與同一時間所有用戶端的上報時間的平均值進行對比,提高了目標用戶端機器時間是否準確判斷的準確性,以避免用戶端出現時鐘回撥等問題,提高了分散式系統中資料標識生成的準確性。 本說明書一個實施例中還提供了一種資料物件標識生成設備,本說明書實施例提供的資料物件標識生成設備可以包括處理器以及用於儲存處理器可執行指令的儲存器,所述處理器用於呼叫所述儲存器中的程式指令,以執行上述各資料物件標識生成方法的實施例所提供的方法,例如包括: 確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端; 獲取所述目標用戶端的機器屬性資訊; 根據所述機器屬性資訊生成所述資料標識物件的識別標識。 本說明書實施例還提供了一種分散式系統,包括至少一個應用伺服器,可以參考上述圖3中分散式系統的結構,每個應用伺服器可以包括至少一個處理器以及用於儲存處理器可執行指令的儲存器,每個應用伺服器在生成資料標識物件的識別標識時,該應用伺服器中的處理器執行所述指令時實現上述資料物件標識生成方法的實施例所提供的方法。 圖12是本說明書實施例的一種資料物件標識生成應用伺服器的硬體結構方塊圖。如圖12所示,伺服器10可以包括一個或多個(圖中僅顯示一個)處理器100(處理器100可以包括但不限於微處理器MCU或可程式化邏輯裝置FPGA等的處理裝置)、用於儲存資料的儲存器200、以及用於通訊功能的傳輸模組300。本領域普通技術人員可以理解,圖12所示的結構僅為示意,其並不對上述電子裝置的結構造成限定。例如,伺服器10還可包括比圖12中所示更多或者更少的組件,例如還可以包括其他的處理硬體,如資料庫或多級快取、GPU,或者具有與圖12所示不同的配置。 儲存器200可用於儲存應用軟體的軟體程式以及模組,如本發明實施例中的資料物件標識生成方法對應的程式指令/模組,處理器100透過運行儲存在儲存器200內的軟體程式以及模組,從而執行各種功能應用以及資料處理。儲存器200可包括高速隨機儲存器,還可包括非揮發性儲存器,如一個或者多個磁性儲存裝置、快閃記憶體、或者其他非揮發性固態儲存器。在一些實例中,儲存器200可進一步包括相對於處理器100遠端設置的儲存器,這些遠端儲存器可以透過網路連接至電腦終端10。上述網路的實例包括但不限於網際網路、企業內部網路、區域網路、行動通訊網路及其組合。 傳輸模組300用於經由一個網路接收或者發送資料。上述的網路具體實例可包括電腦終端10的通訊供應商提供的無線網路。在一個實例中,傳輸模組300包括一個網路適配器(Network Interface Controller,NIC),其可透過基地台與其他網路設備相連從而可與網際網路進行通訊。在一個實例中,傳輸模組300可以為射頻(Radio Frequency,RF)模組,其用於透過無線方式與網際網路進行通訊。 需要說明的是說明書上述所述的裝置、設備、伺服器、系統根據相關方法實施例的描述還可以包括其他的實施方式,具體的實現方式可以參照方法實施例的描述,在此不作一一贅述。 上述對本說明書特定實施例進行了描述。其它實施例在所附申請專利範圍的範圍內。在一些情況下,在申請專利範圍中記載的動作或步驟可以按照不同於實施例中的順序來執行並且仍然可以實現期望的結果。另外,在圖式中描繪的過程不一定要求顯示的特定順序或者連續順序才能實現期望的結果。在某些實施方式中,多任務處理和並行處理也是可以的或者可能是有利的。 本說明書提供的上述實施例所述的方法或裝置可以透過電腦程式實現業務邏輯並記錄在儲存媒體上,所述的儲存媒體可以電腦讀取並執行,實現本說明書實施例所描述方案的效果。 本說明書實施例提供的上述資料物件標識生成方法或裝置可以在電腦中由處理器執行相應的程式指令來實現,如使用windows作業系統的c++語言在PC端實現、linux系統實現,或其他例如使用android、iOS系統程式設計語言在智慧終端實現,以及基於量子電腦的處理邏輯實現等。 本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於硬體+程式類實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。 本說明書實施例並不局限於必須是符合行業通訊標準、標準電腦資料處理和資料儲存規則或本說明書一個或多個實施例所描述的情況。某些行業標準或者使用自定義方式或實施例描述的實施基礎上略加修改後的實施方案也可以實現上述實施例相同、等同或相近、或變形後可預料的實施效果。應用這些修改或變形後的資料獲取、儲存、判斷、處理方式等獲取的實施例,仍然可以屬於本說明書實施例的可選實施方案範圍之內。 在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,儲存器控制器還可以被實現為儲存器的控制邏輯的一部分。本領域技術人員也知道,除了以純電腦可讀程式代碼方式實現控制器以外,完全可以透過將方法步驟進行邏輯程式化來使得控制器以邏輯閘、開關、特殊應用積體電路、可程式化邏輯控制器和嵌入微控制器等的形式來實現相同功能。因此這種控制器可以被認為是一種硬體部件,而對其內包括的用於實現各種功能的裝置也可以視為硬體部件內的結構。或者甚至,可以將用於實現各種功能的裝置視為既可以是實現方法的軟體模組又可以是硬體部件內的結構。 上述實施例闡明的系統、裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦。具體的,電腦例如可以為個人電腦、膝上型電腦、車載人機互動設備、蜂巢式電話、相機電話、智慧手機、個人數位助理、媒體播放器、導航設備、電子郵件設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任何設備的組合。 雖然本說明書一個或多個實施例提供了如實施例或流程圖所述的方法操作步驟,但基於常規或者無創造性的手段可以包括更多或者更少的操作步驟。實施例中列舉的步驟順序僅僅為眾多步驟執行順序中的一種方式,不代表唯一的執行順序。在實際中的裝置或終端產品執行時,可以按照實施例或者圖式所示的方法順序執行或者並行執行(例如平行處理器或者多執行緒處理的環境,甚至為分散式資料處理環境)。術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、產品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、產品或者設備所固有的要素。在沒有更多限制的情況下,並不排除在包括所述要素的過程、方法、產品或者設備中還存在另外的相同或等同要素。第一,第二等詞語用來表示名稱,而並不表示任何特定的順序。 為了描述的方便,描述以上裝置時以功能分為各種模組分別描述。當然,在實施本說明書一個或多個時可以把各模組的功能在同一個或多個軟體和/或硬體中實現,也可以將實現同一功能的模組由多個子模組或子單元的組合實現等。以上所描述的裝置實施例僅僅是示意性的,例如,所述單元的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式,例如多個單元或組件可以結合或者可以整合到另一個系統,或一些特徵可以忽略,或不執行。另一點,所顯示或討論的相互之間的耦接或直接耦接或通訊連接可以是透過一些介面,裝置或單元的間接耦接或通訊連接,可以是電性,機械或其它的形式。 本發明是參照根據本發明實施例的方法、裝置(系統)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一流程和/或方塊、以及流程圖和/或方塊圖中的流程和/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式化資料處理設備的處理器以產生一個機器,使得透過電腦或其他可程式化資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的裝置。 這些電腦程式指令也可儲存在能引導電腦或其他可程式化資料處理設備以特定方式工作的電腦可讀儲存器中,使得儲存在該電腦可讀儲存器中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能。 這些電腦程式指令也可裝載到電腦或其他可程式化資料處理設備上,使得在電腦或其他可程式化設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式化設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的步驟。 在一個典型的配置中,計算設備包括一個或多個處理器(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 following will clearly and completely describe the technical solutions in the embodiments of this specification 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, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the protection scope of this specification. A distributed system is a software system built on the Internet that can handle various assisted tasks and integrate the results. A distributed system can have a variety of general-purpose entities and logic resources, and tasks can be allocated dynamically. The scattered entities and logic resources can exchange information through a computer network. Under normal circumstances, a distributed system can include multiple client terminals, and each client terminal can coordinate work, that is, each client terminal in the distributed system can coordinate with each other to process a task. When coordinating work on a client side, the same data may flow into different client terminals. At this time, the data can be identified so that the system can identify and manage the data in a unified manner. For example, a payment system can include a user client and a merchant client. The order number can be used to identify the user's order information. The same order number in the user client and the merchant client can represent the same order information, which is convenient for system management and For other data processing. The method for generating a data object identifier provided by the embodiment of this specification can integrate a component for generating a data object identifier in each client in a distributed system, and each client can generate a corresponding data identifier object based on its own identification information. The identification mark. The identification of the data object generated by each client is based on the machine attribute information of the client itself. Therefore, the identification generated by each client can be distinguished from the identifiers generated by other clients. The method is simple. Each client in the distributed system can independently generate data identification. There is no need to share a database or a central control system to control the generation of data identification. The dependence is relatively weak, and the applicability is strong. It can avoid relying on the same one. The database causes problems such as single point disaster recovery. The user terminal in the embodiments of this specification may be an application server that can provide data processing, for example: a computer, a smart phone, a tablet, a smart wearable device (smart watch, virtual reality glasses, virtual reality helmet, etc.) And other electronic equipment. Specifically, FIG. 2 is a schematic flowchart of a method for generating a data object identifier in an embodiment provided in this specification. As shown in FIG. 2, the method for generating a data object identifier provided in an embodiment of this specification includes: S2. Determine a data identification object, and a target client used in the distributed system to generate an identification of the data identification object. Fig. 3 is a schematic diagram of the structure of a distributed system in an embodiment of this specification. As shown in Fig. 3, a distributed system can generally include multiple client terminals such as N application servers. The client terminal in Fig. 3 can also be an application server. In an embodiment of this specification, an ID generation component (ie, an identity generation component) can be integrated in each application server. When generating the identification mark or ID for the data identification object, the ID generation component may first determine the data identification object and the target client (which may be one or more of the application servers) that generates the identification mark for the data identification object. After receiving the mark generation request, the data mark object and the corresponding target client can be determined according to the mark generation request. For example, if the target user receives a mark generation request for a certain data mark object during data processing, the target The ID generation component in the user terminal can determine the corresponding data identification object according to the identification generation request; or after the distributed system receives the identification generation request, it can determine the data identification object according to the identification generation request, and determine the data identification object based on the data identification object. The data identification object generates the identification identification target client. S4. Obtain the machine attribute information of the target client. After determining the data identification object that needs to generate the identification mark and the corresponding target client, the machine attribute information corresponding to the target client can be obtained. The machine property information can include the information of the target client used to generate the identification mark and the data identification object . For example: machine attribute information can include the target client's machine number, the target client's communication address identification, the target client's time when receiving the data identification object, the current time of the target client, and the identification information of the data identification object (such as keywords, etc.) ). In an embodiment of this specification, the machine attribute information of the target client may include: the machine time of the target client, and the machine number of the target client. The machine time of the target client can represent the time on the target client when the target client receives the logo generation request, or it can be the time on the target client when the target client generates the data logo, and of course it can be other according to actual needs. For example, the time on the target client when the data identification object is received. The machine number of the target client can represent the serial number, code, identification, etc. used to identify the target client. Generally, the machine number of the same client is the same. The machine number of the target client can be provided by the target client, or it can be preset for each client according to actual needs. S6. Generate an identification mark of the data identification object according to the machine attribute information. After obtaining the machine attribute information corresponding to the target client, the identification of the data identification object is generated based on the obtained machine attribute information. For example, the obtained machine attribute information can be used as the identification of the data identification object, or the obtained The attribute information of the machine is encoded according to preset rules to generate the identification mark of the data identification object, completing the generation of the data identification (ie identification mark) in the distributed system. The identification mark generated by the target client is based on the machine attribute information of the target client itself, which can be distinguished from the marks generated by other clients, avoiding the duplication of identification marks of different materials and identifying objects, so that the generated identification marks can be used in the entire distributed system application. The method for generating data object identifiers in the embodiments of this specification is simple and quick. Each client in the distributed system can generate data identifiers independently, and does not need to rely on a central control system or a unified database to independently generate data identifiers, and the dependence is relatively weak. It has strong applicability and can avoid problems such as single point disaster tolerance caused by relying on the same database. On the basis of the foregoing embodiment, in an embodiment of this specification, after obtaining the machine time and machine number of the target client, the method of generating the identification of the data identification object according to the machine attribute information may include: Converting the machine time of the target client into a time identifier in a preset format; Generating a serial number identification corresponding to the data identification object based on the machine time; The identification mark of the material identification object is generated according to the time mark, the machine number, and the serial number mark. Specifically, the identification of the material identification object in an embodiment of this specification may include a time identification, a machine number, and a serial number identification. The coding method of the time mark can be set in advance, such as the number of digits of the time mark, etc. After obtaining the machine time corresponding to the target client, the machine time can be converted into a time mark according to the preset format. For example, the time precision in the embodiment of the present invention can be set to milliseconds, and the coding mode of the time identifier can be preset to a 41-bit time stamp number segment. After the machine time of the target client can be obtained, the machine time is used as the time identifier corresponding to the data identification object. If the number of digits of the machine time is less than the number of the preset time identifier, the insufficient number of digits can be set to 0. According to actual needs, the time identifier can also be set to other digits or other encoding formats, which are not specifically limited in the embodiment of this specification. Of course, it is also possible to preset the encoding method of the machine number and serial number identification, such as the number of digits, and generate the corresponding machine number and serial number identification according to the preset encoding method. In addition, the embodiment of the present specification can also generate the serial number identification according to the acquired machine time of the target client. For example, the machine time can be prefixed or suffixed to indicate the sequence and quantity of the generated identification number. For example, if the obtained machine time is T, you can add a suffix such as: T-0001 after the machine time, which can indicate the first serial number identification generated within time T. In an embodiment of this specification, the number of digits of the machine number can be determined according to the number of online clients. For example, if the number of digits of the machine number is set to P, then 2^P client machine numbers can be generated, such as: When P=10, 1024 client machine numbers can be set. In the case of a small amount of data on the user side, you can also manually configure the machine number. If the preset number of digits for serial number identification is M, a total of 2^M serial numbers can be generated, for example, when M=12, 4096 serial numbers can be counted. After obtaining the time identifier, machine number, and serial number identifier, the time identifier, machine number, and serial number identifier can be combined as the identification identifier of the material identification object, or a space can be added between the time identifier, machine number, and serial number identifier Symbols and other symbols are combined together as the identification mark of the material identification object. Figure 4 is a schematic diagram of the rules for generating a data object identifier in an embodiment of this specification. As shown in Figure 4, the identification identifier of the data object identifier generated in the embodiment of the present invention is "time identifier-machine number-serial number identifier", where The time identifier is 41 digits, the machine number is P digits, and the serial number is M digits. The digits of the time identifier, machine number, and serial number can be set according to actual needs. The specific values of M and P can be set according to actual needs, and the embodiment of the present invention sets no specific limitation. The method provided in the embodiment of this specification uses the machine time and machine number of the target client to generate the identification mark of the material identification object. The machine time can distinguish the identification marks generated at different times, and the machine number can distinguish the identification marks generated by different users. The number can distinguish the identification marks generated by the same user terminal at the same time, so that the generated identification marks have global uniqueness, can be applied to the entire distributed system, the method is simple and convenient, and the applicability is strong. On the basis of the foregoing embodiment, in an embodiment of this specification, the method for obtaining the machine number of the target client includes: Link the target client to the program coordination service component of the distributed system, and detect whether the target client registration information exists under the root node of the machine number of the program coordination service component; If the registration information of the target client exists, obtain the serial number in the sequence persistent node from the program coordination service component, and generate the machine number corresponding to the target client according to the serial number in the sequence persistent node; If the registration information of the target client does not exist, create a sequential persistent node under the machine number root node in the program coordination service component, and generate the corresponding target client according to the sequence number of the created sequential persistent node machine code. The program coordination service component of the distributed system can be used to coordinate the work of each client in the distributed system. In an embodiment of this specification, the program coordination service component of the distributed system can be the ZooKeeper component. ZooKeeper is a distributed, open source code. Decentralized application coordination service, software that can provide consistent services for decentralized systems. The functions provided can include: configuration maintenance, domain name services, decentralized synchronization, group services, etc. Of course, the program coordination service component of the distributed system may also be other components capable of coordinating the distributed system according to actual needs, which is not specifically limited in the embodiment of the present invention. Figure 5 is a schematic diagram of the machine number generation process in an embodiment of this specification. As shown in Figure 5, in an embodiment of this specification, the target client (application server) can be connected to the distributed system when the target client (application server) is started. The program coordination service components such as ZooKeeper. If the client in the distributed system has been registered in the root node of ZooKeeper's machine number, ZooKeeper can generate a sequential persistent node for the registered client. In the process of creating a node, ZooKeeper will automatically add a monotonically increasing number suffix to the created node name as a new node name, and ZooKeeper has the characteristic of sequential persistent nodes, that is, after the node is created, it will always exist. Deleted due to invalid client session. In an embodiment of this specification, it is possible to detect whether the target client has been registered under the root node of the machine number of ZooKeeper, that is, whether there is registration information of the target client under the root node of the machine number of ZooKeeper. As shown in Figure 3, the sequence persistence node of ZooKeeper can include a machine number root node, and the machine number root node can store the serial numbers of the registered client and the node corresponding to the client. Figure 3 only shows the serial numbers and reporting time of the root nodes of the machine numbers of the two users. Actual ZooKeeper sequence persistent nodes can be stored in multiple, which is not shown in Figure 3. If the target client has been registered under the root node of the machine number of ZooKeeper, you can directly obtain the serial number in the sequence persistent node corresponding to the target client under the root node of the machine number of ZooKeeper, and the sequence number in the persistent node can be persisted according to the acquired sequence Generate the machine number of the target client. For example, the obtained serial number in the sequential persistent node can be used as the machine number of the target user end, or the obtained serial number in the sequential persistent node can be converted into the machine number of the target user end according to a preset machine number encoding format. If it is detected that the target client has not been registered under the root node of the machine number of ZooKeeper, that is, there is no registration information of the target client under the root node of the machine number of ZooKeeper, it can indicate that the target client has generated the machine number for the first time. You can create a sequential persistent node under the root node of the machine number of ZooKeeper, and generate the corresponding machine number of the target client according to the sequence number corresponding to the created sequential persistent node. Similarly, the serial number of the created sequential persistent node can also be used as the machine number of the target client, or the serial number of the created sequential persistent node can be converted into the machine number of the target client according to a preset machine number encoding format. In an embodiment of this specification, after the machine number of the target client is obtained, the machine number usually does not change. Therefore, in the process of generating the data identification, the machine number of the target client can be obtained only once, and the obtained target The machine number of the client is saved. When the target client is used to generate the identification of other materials to identify the object, the machine number of the target client obtained for the first time can be directly used, and it is not necessary to use ZooKeeper to obtain it again. In addition, you can also use ZooKeeper to obtain the machine time of the target client. For example, to detect whether the target client is registered in the root node of ZooKeeper's machine number, if the target client is already registered, you can use ZooKeeper to record the machine time of the target client. If the client is not registered, you can create a sequential persistent node of the target client and record the machine time of the target client. An embodiment of this specification uses ZooKeeper's sequential persistent nodes to adaptively generate machine numbers, eliminating the complexity of manually configuring machine numbers, and there is no certain limit to the number of users configuring machine numbers. The method is simple and has strong applicability. Fig. 6 is a schematic diagram of the process of generating the serial number identifier in an implementation of this specification. As shown in Fig. 6, on the basis of the above-mentioned embodiment, in an embodiment of this specification, the generating of the serial number is based on the machine time of the target client. The serial number identification corresponding to the data identification object, including: Obtain the historical machine time of the target client, where the historical machine time is the machine time when the target client generates the identification identifier of the historical data identification object, and the historical data identification object represents the previous one corresponding to the data identification object Data identification objects; Determine whether the machine time is the same as the historical machine time; If the machine time is the same as the historical machine time, adding a preset serial value to the serial number identification of the historical data identification object to generate the serial number identification of the data identification object; If it is determined that the machine time is not the same as the historical machine time, the initial value of the serial number is used as the serial number identification of the data identification object. Specifically, the time precision in the embodiment of this specification may be set to milliseconds, and the same user terminal may generate identification marks for multiple data identification objects within one millisecond. Obtain the machine time of the target client and the machine time when the target client generated the identification mark of the last data identification object (ie historical data identification object), that is, the historical machine time, and compare whether the machine time and the historical machine time are the same. Specifically, you can compare whether the milliseconds in the machine time and the milliseconds in the historical machine time are the same. For example, the current milliseconds obtained in Figure 6 can be expressed as the milliseconds of the target client's machine time, and the last milliseconds can be expressed as the history The number of milliseconds in machine time. If the machine time is the same as the historical machine time, that is, the current milliseconds are the same as the last milliseconds, it can indicate that the generation time of the serial number identification at this time is consistent with the generation time of the last serial number identification, and the previous data can be used to identify the object The serial number identification adds a preset serial value to generate the serial number identification of the current data identification object. If the machine time and the historical machine time are inconsistent, that is, the current milliseconds are different from the last milliseconds, it means that the generation time of the serial number at this time is inconsistent with the time of the last serial number generation, and the generation rules of the last serial number identification cannot be followed. Generate the serial number identification this time. In the embodiment of this specification, when the machine time and the historical machine time are inconsistent, the serial number identifier of the current data identification object can be set as the initial value of the serial number, and the initial value of the serial number can be set to 0 or other values. For example: if it is necessary to use the target client to generate a corresponding identification mark for the data identification object A, obtain the current milliseconds of the current machine time of the target client, that is, the current milliseconds, and the target client to generate a data identification before the data identification object A The milliseconds of the historical machine time corresponding to the identification mark of the object B is the last millisecond. Determine whether the current number of milliseconds is equal to the last number of milliseconds. If it is, the serial number identifier b in the identification identifier of the data identification object B can be added with a preset serial value c as the serial number identifier a of the data identification object A. As shown in Figure 6, you can also use the serial number identification=(serial number identification+1)%(2^M) to calculate the serial number identification of the material identification object A, where “%” means modulo calculation, and M can mean preset The number of digits identified by the serial number. The serial number identifier in the parentheses on the right side of the equal sign of the formula can indicate the serial number identifier of the last data identification object, that is, the serial number identifier b in the identification identifier of the data identification object B. The serial number on the left side of the equal sign can indicate the current data identification object The serial number identification is the serial number identification a of the material identification object A. Of course, you can also directly use the calculation method of serial number identification = serial number identification + 1 to generate the serial number identification of material identification object A, and "serial number identification + 1" can also be calculated using "serial number identification + other values". If it is determined that the current number of milliseconds is not equal to the last number of milliseconds, the serial number identifier of the material identification object A can be set to 0, and 0 can represent the initial value of the serial number identifier. As shown in FIG. 6, in an embodiment of the present specification, the generating the serial number identification corresponding to the data identification object according to the machine time of the target client terminal further includes: After the serial number identification corresponding to the data identification object is generated, it is determined whether the number of the serial number identification corresponding to the machine time exceeds a preset threshold, if it exceeds, the machine time is updated to obtain the updated machine time, and the machine time is updated according to the machine time. The serial number identification corresponding to the data identification object is generated in time. For example: After generating the serial number identification of material identification object A, it can be judged whether the current machine time, such as the serial number identification generated in the current milliseconds, exceeds the preset threshold. If it exceeds, the generated serial number identification may be duplicated . The preset threshold can be set to 2^M, and M can represent the number of digits identified by the serial number. In an embodiment of this specification, after judging that the current machine time, such as the serial number identifier generated in the current milliseconds, exceeds the preset threshold, the machine can be blocked until the next millisecond to update the machine time, that is: you can wait for 1 millisecond, get the wait The machine time of the target client after 1 millisecond. At this time, the number of milliseconds for updating the machine time is equal to the current number of milliseconds + 1. The serial number identification corresponding to the data identification object is generated based on the updated machine time. The updated machine time can be considered as the first time the serial number identification is generated. Therefore, the serial number identification generated at this time can be the initial value of the serial number identification. At the same time, as shown in Figure 6, the historical machine time can also be updated in real time, that is, the last milliseconds, so as to generate a serial number identification for the next data identification object. In an embodiment of this specification, the method of judging whether the current machine time, such as the serial number identifier generated within the current milliseconds, exceeds a preset threshold may include: Judging whether the value of the serial number identifier is greater than the preset critical value, and if it is greater, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset critical value; And/or, determining whether the result of the modulo operation between the value of the serial number identifier and the preset critical value is equal to zero, and if it is equal to zero, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset threshold value. Specifically, if the serial number identifier of the previous data identification object is used to increase the preset serial value to generate the serial number identification, it can be determined whether the serial number identification value of the current data identification object is greater than the preset threshold value. Determine whether the serial number identifier generated in the current machine time (such as the current milliseconds) exceeds the preset threshold. If the value of the serial number identification of the current data identification object is greater than the preset threshold, it can be determined that the serial number identification generated in the current machine time exceeds the preset threshold. If you use the serial number identification value and the preset threshold value to perform the modulo operation to generate the serial number identification, you can perform the modulo operation by judging the serial number identification value of the current data identification object and the preset threshold value Whether the result of is 0, it is judged whether the serial number identifier generated by the current machine time exceeds the preset threshold. If the value of the serial number identification of the current data identification object and the preset threshold value are modulo arithmetic, the result is 0, it can be determined that the serial number identification generated in the current machine time exceeds the preset threshold. In the embodiment of this specification, the encoding method of the serial number identification can be preset, such as: preset the number of digits of the serial number identification, if the serial number identification generated in the current machine time exceeds the preset threshold, it means that the current machine time When the serial number identification continues to be generated, the serial number identification will be repeated or exceed the preset number of digits for the serial number identification. The embodiment of the present specification can continue to generate the serial number identification by waiting for one millisecond to update the machine time, so as to avoid the serial number identification being repeated or exceeding the preset number of digits of the serial number identification. The method for generating the serial number identifier in the embodiment of this specification will be specifically described below in conjunction with FIG. 6: (1) Get the current and last milliseconds of the target client. (2) Determine whether the last milliseconds are consistent with the current milliseconds, if they are consistent, go to step (3), if they are not, go to step (4). (3) Serial number identification=(serial number identification+1)%(2^M). (4) Serial number identification=0, go to step (7). (5) Determine whether the serial number identifier is equal to 0, if it is not zero, go to step (7), if it is zero, go to step (6). (6) If the serial number is identified as 0, it means that the current milliseconds has overflowed and it needs to be blocked until the next millisecond. (7) Update the last millisecond to the current millisecond. (8) The serial number identification is returned, that is, the serial number identification is output. The method provided by the embodiment of this specification generates the serial number identification of the data identification object in an incremental manner based on the machine time of the target client, and the identification identification of the data identification object generated shows an overall increasing trend based on the time series, which is beneficial to subsequent database indexing , Can improve the efficiency of database retrieval. Fig. 7 is a schematic flow chart of clock callback control in an embodiment of this specification. As shown in Fig. 7, on the basis of the foregoing embodiment, in an embodiment of this specification, the method further includes: Obtain the reporting time of the target client every preset time; If the machine time is less than the report time, it is determined that the target client has abnormal behavior, and a warning is given. The reporting time of the target client can indicate the time when the target client reports to the distributed system, that is, the target client reports the current time of the client to the distributed system. The report time of the target client can be obtained every preset time, and the relationship between the report time of the target client and the obtained machine time of the target client can be judged. If the obtained machine time of the target client is less than the reported time of the target client, it can indicate that the target client has an abnormality such as a clock callback. When the target client's clock is dialed back, the time identifier and serial number identifier generated based on the target client's machine time may be duplicated, which further causes the generated identification of the data identification object to be duplicated. At this time, a warning reminder can be made to remind the operator to overhaul. The warning reminder operation can include: setting the current data identification object's identification mark generation operation to a failure operation and warning, or just issuing an alarm to remind the operator to overhaul. The machine time and reported time of the target client are compared to identify whether the target client has abnormalities such as machine clock callback. When the target client has abnormalities such as machine clock callback, a warning can be given. Avoid duplication of the identification mark of the generated data identification object, so as to improve the accuracy of the identification mark of the generated data identification object. As shown in FIG. 7, in an embodiment of the present specification, if it is determined that the machine time is greater than or equal to the reporting time, the average value of the reporting time corresponding to each client terminal corresponding to the reporting time is obtained; It is determined whether the absolute value of the difference between the machine time and the average value of the reported time is greater than the time critical value, and if it is greater, it is determined that the target client has abnormal behavior and a warning is given. Specifically, if the machine time of the target client terminal is greater than or equal to the reporting time, in an embodiment of this specification, the average value of the reporting time of all client terminals corresponding to the reporting time can also be obtained. The report time of all clients corresponding to the report time can be obtained through ZooKeeper, and the average value of each report time can be calculated. Determine whether the absolute value of the difference between the machine time of the target client and the average value of the reported times of all clients corresponding to the reported time of the target client is greater than the time threshold, which can be set for each user End time difference critical value. If it is judged that the absolute value of the difference between the machine time of the target client and the calculated average value of the reported time is greater than the time critical value, it can indicate that the clock of the target client is very different from the machine clocks of other clients, and a machine clock may appear For exceptions such as callback, a warning can be given. For example: if the machine time of the target client is T and the reporting time is T1, the reporting time root node corresponding to the reporting time of the target client can be obtained through ZooKeeper, and all users can be obtained under the reporting time root node The reporting time of the terminal at time T1 is calculated, and the average value T0 of the reporting time corresponding to all user terminals at time T1 is calculated. Calculate the absolute value of the difference between the machine time T of the target client terminal and the average value T0 of the reported time as T2, and judge whether T2 is greater than the critical time t, if it is greater, it can be determined that the target client terminal is abnormal and give a warning . As shown in Figure 7, in an embodiment of this specification, the reported time of the target client can be obtained through ZooKeeper when the target client is started, and the reported time is compared with the obtained machine time of the target client. If the target is determined When there is an abnormality on the user side, the startup operation can be set to fail and a warning can be issued. If it is determined that there is no abnormality in the target client terminal, the client terminal is started successfully, and the report time of the target client terminal can be obtained every preset time to perform abnormal behavior detection of the target client terminal. The following specifically introduces the process of the machine clock callback control in the embodiment of this specification in conjunction with FIG. 7: (1) Start the target client and verify whether the target client in the root node of the machine reporting time in ZooKeeper is registered. (2) If it is not registered, create a sequential persistent node under the root node of the machine reporting time, and record the reporting time of the target client. (3) Obtain the reporting time of the target client. (4) If the machine time is less than the reported time, it means that there is an abnormality such as a clock back on the client, go to step (8); if the machine time is greater than or equal to the reported time, go to step (5). (5) Obtain the report time of the target client terminal. The report time of all client terminals under the root node is obtained, and the average value of the report time is taken. (6) Determine whether the absolute value of the difference between the machine time of the target client and the average value of the reported time is greater than the time critical value, if it is greater than the time threshold, go to step (8), if not, go to step (7). (7) The setting is successful, and the report time of the target client is obtained every preset time. (8) Set failure and warning. The method for generating the identification of data objects provided in this manual is equipped with monitoring control and warning functions of clock callback for abnormal situations such as machine clock callback, which can avoid abnormal situations such as serial number identification and time identification duplication of identification identification caused by machine callback. , Improve the accuracy of generating the identification mark of the data mark object. The various embodiments of the above method in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For relevant details, please refer to the part of the description of the method embodiment. Based on the aforementioned method for generating data object identifiers, one or more embodiments of this specification also provide a device for generating data object identifiers. The described devices may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc., which use the methods described in the embodiments of this specification, combined with necessary implementation hardware devices. Based on the same innovative concept, the devices in one or more embodiments provided in the embodiments of this specification are as described in the following embodiments. Since the implementation scheme of the device to solve the problem is similar to the method, the implementation of the specific device in the embodiment of this specification can refer to the implementation of the foregoing method, and the repetition will not be repeated. As used below, the term "unit" or "module" can be a combination of software and/or hardware that can implement predetermined functions. Although the device described in the following embodiments is preferably implemented by software, the implementation of hardware or a combination of software and hardware is also possible and conceived. Specifically, FIG. 8 is a schematic diagram of the module structure of an embodiment of the data object identification generating device provided in this specification. As shown in FIG. 8, the data object identification generating device provided in this specification is applied to a distributed system and may include: The identification object determination module 81, the attribute information acquisition module 82, and the identification generation module 83, in which: The identification object determination module 81 can be used to determine a data identification object, and a target client used in the distributed system to generate an identification mark of the data identification object; The attribute information obtaining module 82 may be used to obtain the machine attribute information of the target client; The identification generating module 83 can be used to generate the identification identification of the data identification object according to the machine attribute information. The data object identification generating device provided by the embodiment of this specification, Figure 9 is a schematic structural diagram of an identification generation module in an embodiment of this specification. As shown in Figure 9, on the basis of the above embodiment, the machine attribute information of the target client includes: the machine time of the target client, all State the machine number of the target client; Correspondingly, the identification generating module 83 includes: The time mark generating unit 91 may be used to convert the machine time of the target client into a time mark in a preset format; The serial number generating unit 92 may be configured to generate a serial number identification corresponding to the data identification object based on the machine time; The identification synthesis unit 93 may be used to generate the identification identification of the data identification object according to the time identification, the machine number, and the serial number identification. In the embodiment of this specification, the identification mark generated by the target client is based on the machine attribute information of the target client itself, which can be distinguished from the marks generated by other clients, avoiding duplication of data identification, and making the generated identification mark available in the entire distributed system application. Each client in the decentralized system can independently generate data identification, with weak dependence and strong applicability, which can avoid problems such as single-point disaster tolerance caused by relying on the same database. FIG. 10 is a schematic diagram of the structure of an attribute information acquisition module in an embodiment of this specification. As shown in FIG. 10, on the basis of the above embodiment, the attribute information acquisition module 82 includes a machine number generating unit 101. The number generating unit 101 is used to: Link the target client to the program coordination service component of the distributed system, and detect whether the target client registration information exists under the root node of the machine number of the program coordination service component; If the registration information of the target client exists, obtain the serial number in the sequence persistent node from the program coordination service component, and generate the machine number corresponding to the target client according to the serial number in the sequence persistent node; If the registration information of the target client does not exist, create a sequential persistent node under the machine number root node in the program coordination service component, and generate the corresponding target client according to the sequence number of the created sequential persistent node machine code. In the embodiment of this specification, the machine time and machine number of the target client are used to generate the identification mark of the material identification object. The machine time can distinguish the identification marks generated at different times, the machine number can distinguish the identification marks generated by different users, and the serial number can be distinguished. The identification mark generated by the same user terminal at the same time makes the generated identification mark unique in the whole domain, which can be applied to the entire distributed system, the method is simple and convenient, and the applicability is strong. On the basis of the foregoing embodiment, the serial number generating unit is specifically configured to: Obtain the historical machine time of the target client, where the historical machine time is the machine time when the target client generates the identification identifier of the historical data identification object, and the historical data identification object represents the previous one corresponding to the data identification object Data identification objects; Determine whether the machine time is the same as the historical machine time; If the machine time is the same as the historical machine time, adding a preset serial value to the serial number identification of the historical data identification object to generate the serial number identification of the data identification object; If it is determined that the machine time is not the same as the historical machine time, the initial value of the serial number is used as the serial number identification of the data identification object. In the embodiment of the present specification, the serial number identification of the data identification object is generated in an incremental manner based on the machine time of the target client, and the generated identification identification of the generated data identification object shows an increasing trend based on the time series, which is beneficial to subsequent database indexing. Can improve the efficiency of database retrieval. On the basis of the foregoing embodiment, the serial number generating unit is further configured to: After the serial number identification is generated, it is determined whether the number of serial number identifications corresponding to the machine time exceeds a preset critical value, and if it exceeds, the machine time is updated to obtain the updated machine time, and the machine time is generated according to the updated machine time. The serial number identification. The embodiment of this specification generates a specified number of serial number identifications within machine time to avoid duplication of serial number identifications and improve the accuracy of data identification generation in a distributed system. On the basis of the foregoing embodiment, the serial number generating unit is further configured to: Judging whether the value of the serial number identifier is greater than the preset critical value, and if it is greater, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset critical value; And/or, determining whether the result of the modulo operation between the value of the serial number identifier and the preset critical value is equal to zero, and if it is equal to zero, determining that the number of serial number identifiers corresponding to the machine time exceeds the preset threshold value. FIG. 11 is a schematic diagram of the module of the data object identifier generating device in another embodiment of this specification. As shown in FIG. 11, the data object identifier generating device in an embodiment of this specification may further include: a callback processing module 111, so The callback processing module 111 is used for: Obtain the reporting time of the target client every preset time; If the machine time is less than the report time, it is determined that the target client has abnormal behavior, and a warning is given. In the embodiment of this specification, the target client's machine time and reported time are compared to identify whether the target client has abnormalities such as machine clock callback. When the target client has abnormalities such as machine clock callback, a warning can be given. Avoid duplication of the identification mark of the generated data identification object, so as to improve the accuracy of the identification mark of the generated data identification object. On the basis of the foregoing embodiment, the callback processing module is further used for: When the machine time is greater than or equal to the reporting time, obtaining the average value of the reporting time corresponding to each user terminal corresponding to the reporting time; It is determined whether the absolute value of the difference between the machine time and the average value of the reported time is greater than the time critical value, and if it is greater, it is determined that the target client has abnormal behavior and a warning is given. In the embodiment of this specification, by comparing the machine time of the target client with the average value of the reported time of all clients at the same time, the accuracy of judging whether the machine time of the target client is accurate is improved, so as to avoid clock callbacks on the client side, etc. The problem has improved the accuracy of data identification generation in a distributed system. An embodiment of this specification also provides a data object identification generating device. The data object identification generating device provided in the embodiment of this specification may include a processor and a memory for storing executable instructions of the processor, and the processor is used for calling The program instructions in the storage to execute the methods provided in the foregoing embodiments of the method for generating data object identifiers include, for example: Determine a data identification object, and a target client used in the distributed system to generate an identification of the data identification object; Acquiring machine attribute information of the target client; The identification mark of the data identification object is generated according to the machine attribute information. The embodiment of this specification also provides a distributed system, including at least one application server. You can refer to the structure of the distributed system in FIG. 3 above. Each application server may include at least one processor and a processor for storing executables. A storage of instructions. When each application server generates an identification mark of a data identification object, the processor in the application server implements the method provided in the embodiment of the above-mentioned data object identification generation method when the processor in the application server executes the instruction. FIG. 12 is a block diagram of the hardware structure of a data object identification generating application server according to an embodiment of this specification. As shown in FIG. 12, the server 10 may include one or more (only one is shown in the figure) processor 100 (the processor 100 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) , A memory 200 for storing data, and a transmission module 300 for communication functions. Those of ordinary skill in the art can understand that the structure shown in FIG. 12 is only for illustration, and it does not limit the structure of the above electronic device. For example, the server 10 may also include more or fewer components than shown in FIG. 12, for example, may also include other processing hardware, such as a database or multi-level cache, GPU, or have the same components as shown in FIG. Different configurations. The storage 200 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the method for generating data object identifiers in the embodiment of the present invention. The processor 100 runs the software programs and modules stored in the storage 200 and Modules to perform various functional applications and data processing. The storage 200 may include a high-speed random storage device, and may also include a non-volatile storage, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state storage. In some examples, the storage 200 may further include storage remotely disposed relative to the processor 100, and these remote storages may be connected to the computer terminal 10 via a network. Examples of the aforementioned networks include but are not limited to the Internet, corporate intranet, local area network, mobile communication network, and combinations thereof. The transmission module 300 is used to receive or send data via a network. The aforementioned specific example of the network may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 300 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission module 300 may be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner. It should be noted that the device, equipment, server, and system described above in the specification can also include other implementation manners according to the description of the related method embodiments. For specific implementation manners, please refer to the description of the method embodiments, which will not be repeated here. . The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the attached patent application. In some cases, the actions or steps described in the scope of the patent application may be performed in a different order from the embodiment and still achieve desired results. In addition, the process depicted in the drawings does not necessarily require a specific order or sequential order of display to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. The method or device described in the above embodiment provided in this specification can implement business logic through a computer program and record it on a storage medium. The storage medium can be read and executed by a computer to achieve the effects of the solution described in the embodiment of this specification. The above-mentioned data object identification generation method or device provided by the embodiments of this specification can be implemented by the processor in the computer by executing the corresponding program instructions, such as using the c++ language of the windows operating system to implement on the PC side, the linux system, or other such Android and iOS system programming languages are implemented in smart terminals, and processing logic based on quantum computers is implemented. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant part can refer to the part of the description of the method embodiment. The embodiments of this specification are not limited to the conditions described in one or more embodiments of this specification that must comply with industry communication standards, standard computer data processing and data storage rules. Certain industry standards or implementations described in custom methods or examples with slight modifications can also achieve the same, equivalent or similar implementation effects of the foregoing examples, or predictable implementation effects after modification. The examples obtained by applying these modified or deformed data acquisition, storage, judgment, processing methods, etc., may still fall within the scope of the optional implementation scheme of the examples of this specification. In the 1990s, the improvement of a technology can be clearly distinguished from the improvement of the hardware (for example, the improvement of the circuit structure of diodes, transistors, switches, etc.) or the improvement of the software (for the method flow Improve). However, with the development of technology, the improvement of many methods and processes of today can be regarded as a direct improvement of 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 flow cannot be realized by the hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. It is programmed by the designer to "integrate" a digital system on a PLD without requiring the chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this programming is mostly realized by using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation must also be written in a specific programming language, which is called Hardware Description Language (HDL), and HDL is not only one, but there are many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., Currently the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be clear that only need to logically program the method flow in the above-mentioned hardware description languages and program it into an integrated circuit, the hardware circuit that implements the logic method flow can be easily obtained. The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer readable program code (such as software or firmware) that can be executed by the (micro) processor. Media, logic gates, switches, Application Specific Integrated Circuits (ASIC), programmable logic controllers, and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D , Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the memory control logic. Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code manner, it is completely possible to make the controller use logic gates, switches, integrated circuits for special applications, and programmable logic by logically programming method steps. Controllers and embedded microcontrollers can realize the same functions. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component. The systems, devices, modules, or units explained in the above embodiments may be implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, Tablets, wearable devices, or any combination of these devices. Although one or more embodiments of this specification provide method operation steps as described in the embodiments or flowcharts, conventional or non-inventive means may include more or fewer operation steps. The sequence of steps listed in the embodiments is only one way of the execution order of the steps, and does not represent the only execution order. When an actual device or terminal product is executed, it can be executed sequentially or in parallel according to the methods shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, product or device including a series of elements includes not only those elements, but also other elements not explicitly listed Elements, or also include elements inherent to such processes, methods, products, or equipment. If there are no more restrictions, it does not exclude that there are other identical or equivalent elements in the process, method, product, or device including the elements. Words such as first and second are used to denote names, but do not denote any specific order. For the convenience of description, when describing the above device, the functions are divided into various modules and described separately. Of course, when implementing one or more of this specification, the functions of each module can be implemented in the same one or more software and/or hardware, or the modules that implement the same function can be composed of multiple sub-modules or sub-units. The combination of realization and so on. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation. For example, multiple units or components can be combined or integrated into Another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms. The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, dedicated computers, embedded processors, or other programmable data processing equipment to generate a machine that can be executed by the processors of the computer or other programmable data processing equipment A device for realizing the functions specified in one flow or multiple flows in the flowchart and/or one block or multiple blocks in the block diagram is generated. These computer program instructions can also be stored in a computer-readable storage that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable storage produce a manufactured product including the instruction device , The instruction device realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram. These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to generate computer-implemented processing, and then the computer or other programmable equipment The instructions executed above provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram. In a typical configuration, the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory. Memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, 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, and information storage can be realized by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only CD-ROM (CD-ROM), digital multi-function Optical discs (DVD) or other optical storage, magnetic cassettes, magnetic tape storage, graphene storage or other magnetic storage devices or any other non-transmission media 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. Those skilled in the art should understand that one or more embodiments of this specification can be provided as a method, a system or a computer program product. Therefore, one or more embodiments of this specification may adopt the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of this specification can be implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. In the form of a computer program product. One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the partial description of the method embodiment. In the description of this specification, descriptions with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean specific features described in conjunction with the embodiment or example , Structure, materials or features are included in at least one embodiment or example in this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples and the features of the different embodiments or examples described in this specification without mutual contradiction. The above descriptions are only examples of one or more embodiments of this specification, and are not used to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the patent application.

S2-S6:步驟 81:標識物件確定模組 82:屬性資訊獲取模組 83:標識生成模組 91:時間標識生成單元 92:序列號生成單元 93:標識合成單元 101:機器號生成單元 111:回撥處理模組 10:伺服器 100:處理器 200:儲存器 300:傳輸模組S2-S6: steps 81: Identification object determination module 82: Attribute Information Obtaining Module 83: Logo Generation Module 91: Time stamp generating unit 92: Serial number generation unit 93: Identification synthesis unit 101: machine number generation unit 111: callback processing module 10: Server 100: processor 200: storage 300: Transmission module

為了更清楚地說明本說明書實施例或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的圖式作簡單地介紹,顯而易見地,下面描述中的圖式僅僅是本說明書中記載的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動性的前提下,還可以根據這些圖式獲得其他的圖式。 圖1是現有技術中應用資料庫自增序號生成資料標識的示意圖; 圖2是本說明書提供的一個實施例中的資料物件標識生成方法的流程示意圖; 圖3是本說明書一個實施例中分散式系統的結構示意圖; 圖4是本說明書一個實施例中資料物件標識生成的規則示意圖; 圖5是本說明書一個實施例中機器號生成的流程示意圖; 圖6是本說明書一個實施中序列號標識生成的流程示意圖; 圖7是本說明書一個實施例中時鐘回撥控制的流程示意圖; 圖8是本說明書提供的資料物件標識生成裝置一個實施例的模組結構示意圖; 圖9是本說明書一個實施例中標識生成模組的結構示意圖; 圖10是本說明書一個實施例中屬性資訊獲取模組的結構示意圖; 圖11是本說明書又一個實施例中資料物件標識生成裝置的模組示意圖; 圖12是本說明書實施例的一種資料物件標識生成應用伺服器的硬體結構方塊圖。In order to more clearly explain the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings that need to be used in the embodiments or the description of the prior art. Obviously, the drawings in the following description are merely the present For some of the embodiments described in the specification, for those of ordinary skill in the art, without creative labor, other schemes can be obtained from these schemes. Fig. 1 is a schematic diagram of the application of a self-increasing serial number of a database to generate a data identification in the prior art; FIG. 2 is a schematic flowchart of a method for generating a data object identifier in an embodiment provided in this specification; Figure 3 is a schematic structural diagram of a distributed system in an embodiment of this specification; Fig. 4 is a schematic diagram of a rule for generating a data object identifier in an embodiment of this specification; Fig. 5 is a schematic diagram of a machine number generation process in an embodiment of this specification; Fig. 6 is a schematic diagram of a sequence number identification generation process in an implementation of this specification; FIG. 7 is a schematic diagram of the flow of clock callback control in an embodiment of this specification; 8 is a schematic diagram of the module structure of an embodiment of the data object identification generating device provided in this specification; FIG. 9 is a schematic diagram of the structure of an identification generation module in an embodiment of the present specification; FIG. 10 is a schematic structural diagram of an attribute information acquisition module in an embodiment of this specification; 11 is a schematic diagram of a module of a device for generating a data object identifier in another embodiment of this specification; FIG. 12 is a block diagram of the hardware structure of a data object identification generating application server according to an embodiment of this specification.

Claims (16)

一種資料物件標識生成方法,應用於分散式系統,所述方法包括:確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端;獲取所述目標用戶端的機器屬性資訊;其中,所述目標用戶端的機器屬性資訊包括:所述目標用戶端的機器時間、所述目標用戶端的機器號;將所述目標用戶端的機器時間轉換成預設格式的時間標識;基於所述目標用戶端的機器時間以依次遞增的方式生成所述資料標識物件的序列號標識;所述序列號標識用於區別同一時間同一目標用戶端生成的識別標識;根據所述時間標識、所述機器號、所述序列號標識生成所述資料標識物件的識別標識。 A method for generating a data object identifier, applied to a distributed system, the method comprising: determining a data identifier object, and a target client in the distributed system for generating the identification identifier of the data identifier object; acquiring the target The machine attribute information of the client; wherein, the machine attribute information of the target client includes: the machine time of the target client, the machine number of the target client; the machine time of the target client is converted into a time identifier in a preset format The serial number identification of the material identification object is generated in an incremental manner based on the machine time of the target user terminal; the serial number identification is used to distinguish the identification identification generated by the same target user terminal at the same time; according to the time identification, The machine number and the serial number identifier generate the identification identifier of the material identification object. 如申請專利範圍第1項所述的方法,所述目標用戶端的機器號的獲取方法包括:將所述目標用戶端連結到所述分散式系統的程式協調服務組件,在所述程式協調服務組件的機器號根節點下檢測是否存在所述目標用戶端註冊資訊;若存在所述目標用戶端的註冊資訊,則從所述程式協調服務組件中獲取順序持久節點中的序號,根據所述順序 持久節點中的序號生成所述目標用戶端對應的機器號;若不存在所述目標用戶端的註冊資訊,則在所述程式協調服務組件中的機器號根節點下創建順序持久節點,並根據所述創建的順序持久節點的序號生成所述目標用戶端對應的機器號。 For the method described in item 1 of the scope of patent application, the method for obtaining the machine number of the target client includes: linking the target client to the program coordination service component of the distributed system, and the program coordination service component Under the root node of the machine number, it is detected whether there is registration information of the target client; if the registration information of the target client exists, the serial number in the sequence persistent node is obtained from the program coordination service component, and the sequence number is obtained according to the sequence The serial number in the persistent node generates the machine number corresponding to the target client; if the registration information of the target client does not exist, a sequential persistent node is created under the root node of the machine number in the program coordination service component, and according to all The sequence number of the persistent node in the created sequence generates the machine number corresponding to the target client. 如申請專利範圍第1項所述的方法,所述基於所述目標用戶端的機器時間生成所述資料標識物件對應的序列號標識,包括:獲取所述目標用戶端的歷史機器時間,所述歷史機器時間為所述目標用戶端生成歷史資料標識物件的識別標識時的機器時間,所述歷史資料標識物件表示所述資料標識物件對應的前一個資料標識物件;判斷所述機器時間與所述歷史機器時間是否相同;若所述機器時間與所述歷史機器時間相同,則將所述歷史資料標識物件的序列號標識增加預設序列值生成所述資料標識物件的序列號標識;若判斷所述機器時間與所述歷史機器時間不相同,則將序列號初始值作為所述資料標識物件的序列號標識。 According to the method described in item 1 of the scope of patent application, the generating the serial number identifier corresponding to the data identification object based on the machine time of the target client includes: obtaining the historical machine time of the target client, and the historical machine The time is the machine time when the target client generates the identification mark of the historical data identification object, and the historical data identification object represents the previous data identification object corresponding to the data identification object; determining the machine time and the historical machine Whether the time is the same; if the machine time is the same as the historical machine time, the serial number identification of the historical data identification object is added to the preset serial value to generate the serial number identification of the data identification object; if it is determined that the machine When the time is different from the historical machine time, the initial value of the serial number is used as the serial number identification of the data identification object. 如申請專利範圍第3項所述的方法,所述根據所述目標用戶端的機器時間生成所述資料標識物件對應的序列號標識,還包括:生成資料標識物件對應的序列號標識後,判斷所述機 器時間對應的序列號標識的數量是否超過預設臨界值,若超過,則更新所述機器時間獲得更新機器時間,並根據所述更新機器時間生成所述資料標識物件對應的序列號標識。 For example, the method described in item 3 of the scope of patent application, said generating the serial number identification corresponding to the data identification object according to the machine time of the target client, further includes: after generating the serial number identification corresponding to the data identification object, judging Narrative Whether the number of serial number identifiers corresponding to the device time exceeds a preset critical value, if it exceeds, update the machine time to obtain an updated machine time, and generate a serial number identifier corresponding to the data identification object according to the updated machine time. 如申請專利範圍第4項所述的方法,所述判斷所述機器時間對應的序列號標識的數量是否超過預設臨界值的方法包括:判斷所述序列號標識的值是否大於所述預設臨界值,若大於,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值;和/或,判斷所述序列號標識的值與所述預設臨界值進行模數運算的結果是否等於零,若等於零,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值。 For the method described in item 4 of the scope of patent application, the method for judging whether the number of serial number identifiers corresponding to the machine time exceeds a preset critical value includes: judging whether the value of the serial number identifier is greater than the preset threshold If the critical value is greater than, it is determined that the number of serial number identifiers corresponding to the machine time exceeds the preset critical value; and/or the value of the serial number identifier is determined to perform a modulo operation with the preset critical value Whether the result of is equal to zero, if it is equal to zero, it is determined that the number of serial number identifiers corresponding to the machine time exceeds the preset threshold. 如申請專利範圍第1項所述的方法,所述方法還包括:每隔預設時間獲取所述目標用戶端的上報時間;若所述機器時間小於所述上報時間,則確定所述目標用戶端存在異常行為,進行警告提示。 For the method described in item 1 of the scope of patent application, the method further includes: obtaining the reporting time of the target client every preset time; if the machine time is less than the reporting time, determining the target If there is abnormal behavior on the user side, a warning will be given. 如申請專利範圍第6項所述的方法,所述方法還包括:若所述機器時間大於等於所述上報時間,則獲取所述 上報時間對應的各用戶端對應的上報時間的平均值;判斷所述機器時間與所述上報時間的平均值的差值的絕對值是否大於時間臨界值,若大於,則確定所述目標用戶端存在異常行為,進行警告提示。 For the method described in item 6 of the scope of patent application, the method further includes: if the machine time is greater than or equal to the reporting time, obtaining the The average value of the reporting time corresponding to each client terminal corresponding to the reporting time; judging whether the absolute value of the difference between the machine time and the average value of the reporting time is greater than the time critical value, and if it is greater than, then determining the If there is abnormal behavior on the target client, a warning will be given. 一種資料物件標識生成裝置,應用於分散式系統,包括:標識物件確定模組,用於確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端;屬性資訊獲取模組,用於獲取所述目標用戶端的機器屬性資訊;其中,所述目標用戶端的機器屬性資訊包括:所述目標用戶端的機器時間、所述目標用戶端的機器號;標識生成模組,包括:時間標識生成單元,用於將所述目標用戶端的機器時間轉換成預設格式的時間標識;序列號生成單元,用於基於所述目標用戶端的機器時間以依次遞增的方式生成所述資料標識物件的序列號標識;所述序列號標識用於區別同一時間同一目標用戶端生成的識別標識;標識合成單元,用於根據所述時間標識、所述機器號、所述序列號標識生成所述資料標識物件的識別標識。 A data object identification generating device applied to a distributed system, comprising: an identification object determining module for determining a data identification object, and a target client terminal in the distributed system for generating the identification identification of the data identification object Attribute information acquisition module for acquiring the machine attribute information of the target client; wherein, the machine attribute information of the target client includes: the machine time of the target client, the machine number of the target client; The group includes: a time identification generating unit for converting the machine time of the target user terminal into a time identification of a preset format; a serial number generating unit for generating all data in an incremental manner based on the machine time of the target user terminal The serial number identification of the material identification object; the serial number identification is used to distinguish the identification identification generated by the same target user terminal at the same time; the identification synthesis unit is used to identify the time identification, the machine number, and the serial number identification An identification mark of the data identification object is generated. 如申請專利範圍第8項所述的裝置,所述屬性資訊獲取模組包括機器號生成單元,所述機器號生成單元用於:將所述目標用戶端連結到所述分散式系統的程式協調服務組件,在所述程式協調服務組件的機器號根節點下檢測是否存在所述目標用戶端註冊資訊;若存在所述目標用戶端的註冊資訊,則從所述程式協調服務組件中獲取順序持久節點中的序號,根據所述順序持久節點中的序號生成所述目標用戶端對應的機器號;若不存在所述目標用戶端的註冊資訊,則在所述程式協調服務組件中的機器號根節點下創建順序持久節點,並根據所述創建的順序持久節點的序號生成所述目標用戶端對應的機器號。 As for the device described in item 8 of the scope of patent application, the attribute information acquisition module includes a machine number generating unit for: linking the target client to the program coordination of the distributed system The service component detects whether there is registration information of the target client under the root node of the machine number of the program coordination service component; if the registration information of the target client exists, obtain the sequential persistent node from the program coordination service component The serial number in the sequence number is generated according to the serial number in the sequence persistent node to generate the machine number corresponding to the target client; if the registration information of the target client does not exist, it is under the machine number root node in the program coordination service component Create a sequential persistent node, and generate the machine number corresponding to the target client according to the sequence number of the created sequential persistent node. 如申請專利範圍第8項所述的裝置,所述序列號生成單元具體用於:獲取所述目標用戶端的歷史機器時間,所述歷史機器時間為所述目標用戶端生成歷史資料標識物件的識別標識時的機器時間,所述歷史資料標識物件表示所述資料標識物件對應的前一個資料標識物件;判斷所述機器時間與所述歷史機器時間是否相同;若所述機器時間與所述歷史機器時間相同,則將所述歷史資料標識物件的序列號標識增加預設序列值生成所述資料標識物件的序列號標識;若判斷所述機器時間與所述歷史機器時間不相同,則 將序列號初始值作為所述資料標識物件的序列號標識。 For the device described in item 8 of the scope of patent application, the serial number generating unit is specifically configured to: obtain the historical machine time of the target client, and the historical machine time is the identification of the target client to generate historical data to identify the object The machine time at the time of identification, the historical data identification object represents the previous data identification object corresponding to the data identification object; it is determined whether the machine time is the same as the historical machine time; if the machine time is the same as the historical machine If the time is the same, the serial number identification of the historical data identification object is increased by a preset serial value to generate the serial number identification of the data identification object; if it is determined that the machine time is different from the historical machine time, then The initial value of the serial number is used as the serial number identification of the data identification object. 如申請專利範圍第10項所述的裝置,所述序列號生成單元還用於:生成所述序列號標識後,判斷所述機器時間對應的序列號標識的數量是否超過預設臨界值,若超過,則更新所述機器時間獲得更新機器時間,並根據所述更新機器時間生成所述序列號標識。 For the device described in item 10 of the scope of patent application, the serial number generating unit is further used to: after generating the serial number identifier, determine whether the number of serial number identifiers corresponding to the machine time exceeds a preset critical value, if If it exceeds, update the machine time to obtain an updated machine time, and generate the serial number identifier according to the updated machine time. 如申請專利範圍第11項所述的裝置,所述序列號生成單元還用於:判斷所述序列號標識的值是否大於所述預設臨界值,若大於,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值;和/或,判斷所述序列號標識的值與所述預設臨界值進行模數運算的結果是否等於零,若等於零,則確定所述機器時間對應的序列號標識的數量超過所述預設臨界值。 For the device described in item 11 of the scope of patent application, the serial number generating unit is further used to determine whether the value of the serial number identifier is greater than the preset threshold value, and if it is greater than, determine the machine time corresponding to the The number of serial number identifiers exceeds the preset threshold; and/or, determining whether the result of the modulo operation between the value of the serial number identifier and the preset threshold is equal to zero; if it is equal to zero, determine the machine time The number of corresponding serial number identifiers exceeds the preset threshold. 如申請專利範圍第8項所述的裝置,所述裝置還包括回撥處理模組,所述回撥處理模組用於:每隔預設時間獲取所述目標用戶端的上報時間;若所述機器時間小於所述上報時間,則確定所述目標用戶端存在異常行為,進行警告提示。 For the device described in item 8 of the scope of patent application, the device further includes a callback processing module, the callback processing module is configured to: obtain the report time of the target client at a preset time; If the machine time is less than the report time, it is determined that the target client has abnormal behavior, and a warning is given. 如申請專利範圍第13項所述的裝置,所述回撥處理模組還用於:在所述機器時間大於等於所述上報時間時,則獲取所述上報時間對應的各用戶端對應的上報時間的平均值;判斷所述機器時間與所述上報時間的平均值的差值的絕對值是否大於時間臨界值,若大於,則確定所述目標用戶端存在異常行為,進行警告提示。 As for the device described in item 13 of the scope of patent application, the callback processing module is also used to: when the machine time is greater than or equal to the reporting time, obtain the corresponding user end corresponding to the reporting time The average value of the reported time; determine whether the absolute value of the difference between the machine time and the average of the reported time is greater than the time critical value, and if it is greater, it is determined that the target client has abnormal behavior and a warning is issued prompt. 一種資料物件標識生成設備,應用於分散式系統,包括處理器及用於儲存處理器可執行指令的儲存器,所述指令被所述處理器執行時實現包括以下步驟:確定資料標識物件,和所述分散式系統中用於生成所述資料標識物件的識別標識的目標用戶端;獲取所述目標用戶端的機器屬性資訊;其中,所述目標用戶端的機器屬性資訊包括:所述目標用戶端的機器時間、所述目標用戶端的機器號;將所述目標用戶端的機器時間轉換成預設格式的時間標識;基於所述目標用戶端的機器時間以依次遞增的方式生成所述資料標識物件的序列號標識;所述序列號標識用於區別同一時間同一目標用戶端生成的識別標識;根據所述時間標識、所述機器號、所述序列號標識生成所述資料標識物件的識別標識。 A data object identification generating device applied to a distributed system, comprising a processor and a memory for storing executable instructions of the processor, the instructions being executed by the processor include the following steps: determining data identification objects, and In the distributed system, a target client used for generating the identification of the data identification object; acquiring machine attribute information of the target client; wherein the machine attribute information of the target client includes: the machine of the target client Time, the machine number of the target client; convert the machine time of the target client into a time identifier in a preset format; generate the serial number identifier of the material identification object in an incremental manner based on the machine time of the target client The serial number identification is used to distinguish the identification identification generated by the same target client at the same time; the identification identification of the material identification object is generated according to the time identification, the machine number, and the serial number identification. 一種分散式系統,包括至少一個應用伺服器,所述應用伺服器包括至少一個處理器以及用於儲存處理器可執行指令的儲存器,所述應用伺服器在生成資料標識物件的識別標識時,所述處理器執行所述指令時實現申請專利範圍第1至7項中任一項所述的方法。 A distributed system includes at least one application server. The application server includes at least one processor and a memory for storing executable instructions of the processor. When the application server generates an identification mark of a data identification object, When the processor executes the instructions, the method described in any one of items 1 to 7 of the scope of patent application is implemented.
TW108117079A 2018-07-27 2019-05-17 Method and device for generating data object identification TWI710894B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810839749.3A CN109240848A (en) 2018-07-27 2018-07-27 A kind of data object tag generation method and device
CN201810839749.3 2018-07-27

Publications (2)

Publication Number Publication Date
TW202024908A TW202024908A (en) 2020-07-01
TWI710894B true TWI710894B (en) 2020-11-21

Family

ID=65073128

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108117079A TWI710894B (en) 2018-07-27 2019-05-17 Method and device for generating data object identification

Country Status (3)

Country Link
CN (1) CN109240848A (en)
TW (1) TWI710894B (en)
WO (1) WO2020019893A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240848A (en) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 A kind of data object tag generation method and device
CN109862097A (en) * 2019-01-31 2019-06-07 上海易点时空网络有限公司 ID generation method and device
CN111831639B (en) * 2019-04-19 2024-01-30 北京车和家信息技术有限公司 Global unique ID generation method and device and vehicle management system
CN110046192B (en) * 2019-04-22 2021-08-20 广州荔支网络技术有限公司 System and method for generating serial number of request information
CN111083228B (en) * 2019-12-24 2023-06-30 腾讯云计算(北京)有限责任公司 Identification number generation method and device and electronic equipment
CN111291424B (en) * 2020-02-19 2023-03-24 望海康信(北京)科技股份公司 Identification number generation method and device, computer equipment and storage medium
CN111694841A (en) * 2020-04-29 2020-09-22 平安科技(深圳)有限公司 Order mark generation method, device, server and storage medium
CN113742553B (en) * 2021-09-03 2024-03-19 上海哔哩哔哩科技有限公司 Data processing method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW473660B (en) * 1999-06-17 2002-01-21 Ibm Method and apparatus for autosynchronizing distributed versions of documents
TW200612255A (en) * 2004-10-01 2006-04-16 Microsoft Corp System and method for determining target failback and target priority for a distributed file system
TW200701018A (en) * 2005-04-21 2007-01-01 Microsoft Corp Systems and methods for manipulating data in a data storage system
TW200910126A (en) * 2007-06-28 2009-03-01 Salesforce Com Inc Method and system for sharing data between subscribers of a multi-tenant database service
TW201029393A (en) * 2008-10-24 2010-08-01 Microsoft Corp Atomic multiple modification of data in a distributed storage system
TW201113724A (en) * 2009-10-01 2011-04-16 Alibaba Group Holding Ltd Method, server and system for updating images in an image database
TW201145054A (en) * 2010-01-18 2011-12-16 Microsoft Corp Replication protocol for database systems
TW201602802A (en) * 2012-05-16 2016-01-16 蘋果公司 Locally backed cloud-based storage
TW201812674A (en) * 2016-07-08 2018-04-01 英商凱理普特恩國際有限公司 Distributed transaction processing and authentication system
TW201814620A (en) * 2016-10-13 2018-04-16 香港商阿里巴巴集團服務有限公司 Data label distribution
TW201824018A (en) * 2016-12-30 2018-07-01 香港商阿里巴巴集團服務有限公司 Real-time data processing method and device

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8776186B2 (en) * 2011-10-04 2014-07-08 Cleversafe, Inc. Obtaining a signed certificate for a dispersed storage network
CN104252457B (en) * 2013-06-25 2018-11-23 北京百度网讯科技有限公司 A kind of method and apparatus for being managed to data acquisition system
CN104361065B (en) * 2014-11-04 2018-07-06 福建亿榕信息技术有限公司 The ordered sequence generation method of distributed system based on Zookeeper
CN105072160A (en) * 2015-07-17 2015-11-18 联动优势科技有限公司 Serial number generating method and device, and a server
CN105404953A (en) * 2015-10-23 2016-03-16 努比亚技术有限公司 Identification generation method and apparatus
CN105653639A (en) * 2015-12-25 2016-06-08 北京奇虎科技有限公司 ID generation method and apparatus
CN106060125A (en) * 2016-05-24 2016-10-26 南京国电南自美卓控制系统有限公司 Distributed real-time data transmission method based on data tags
CN106572165A (en) * 2016-10-26 2017-04-19 宜人恒业科技发展(北京)有限公司 Distributed global unique ID application method
CN106570097B (en) * 2016-10-31 2020-09-08 华为技术有限公司 Sequence generation method and device
CN107945064A (en) * 2017-10-27 2018-04-20 链家网(北京)科技有限公司 A kind of service order numbering generation method and device
CN109240848A (en) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 A kind of data object tag generation method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW473660B (en) * 1999-06-17 2002-01-21 Ibm Method and apparatus for autosynchronizing distributed versions of documents
TW200612255A (en) * 2004-10-01 2006-04-16 Microsoft Corp System and method for determining target failback and target priority for a distributed file system
TW200701018A (en) * 2005-04-21 2007-01-01 Microsoft Corp Systems and methods for manipulating data in a data storage system
TW200910126A (en) * 2007-06-28 2009-03-01 Salesforce Com Inc Method and system for sharing data between subscribers of a multi-tenant database service
TW201029393A (en) * 2008-10-24 2010-08-01 Microsoft Corp Atomic multiple modification of data in a distributed storage system
TW201113724A (en) * 2009-10-01 2011-04-16 Alibaba Group Holding Ltd Method, server and system for updating images in an image database
TW201145054A (en) * 2010-01-18 2011-12-16 Microsoft Corp Replication protocol for database systems
TW201602802A (en) * 2012-05-16 2016-01-16 蘋果公司 Locally backed cloud-based storage
TW201812674A (en) * 2016-07-08 2018-04-01 英商凱理普特恩國際有限公司 Distributed transaction processing and authentication system
TW201814620A (en) * 2016-10-13 2018-04-16 香港商阿里巴巴集團服務有限公司 Data label distribution
TW201824018A (en) * 2016-12-30 2018-07-01 香港商阿里巴巴集團服務有限公司 Real-time data processing method and device

Also Published As

Publication number Publication date
TW202024908A (en) 2020-07-01
CN109240848A (en) 2019-01-18
WO2020019893A1 (en) 2020-01-30

Similar Documents

Publication Publication Date Title
TWI710894B (en) Method and device for generating data object identification
TWI748175B (en) Data processing method, device and equipment
EP3557452B1 (en) Database state determining method and device, and consistency verifying method and device
TWI718375B (en) Data processing method and equipment based on blockchain
TWI696083B (en) A consensus method and device based on blockchain
CN109949111A (en) Electronic bill mark distributing method, electronic bill generation method, apparatus and system
JP2019503525A (en) Event batch processing, output sequencing, and log-based state storage in continuous query processing
CN109600186B (en) Clock synchronization method and device
CN107016029B (en) Method, device and system for processing service data
CN105335389B (en) A kind of business method for visualizing and system
CN111767144B (en) Transaction route determination method, device, equipment and system for transaction data
CN108599973B (en) Log association method, device and equipment
CN113868868A (en) Equipment data interaction method, system and platform based on object model structure
WO2020168901A1 (en) Data calculation method and engine
CN110297955B (en) Information query method, device, equipment and medium
CN108616361A (en) A kind of method and device of identification equipment uniqueness
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
Kim Desirable advances in cyber-physical system software engineering
CN114860346A (en) Management method of modeling task and operation method of modeling task
JP2019510306A (en) Method and apparatus for checking integrity of distributed service processing
CN112182507A (en) Data quality measuring method, device and equipment
CN117312074A (en) Data monitoring method, device and equipment
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN111414162B (en) Data processing method, device and equipment thereof
CN116662032A (en) Service system calling method and device, electronic equipment and storage medium