Distributed identifier generation method and device, equipment and medium

By generating distributed identifiers in a distributed system, using the configuration center to manage the length of the machine identifier field and introducing an expansion flag, the expansion and identifier duplication problems of the Snowflake algorithm in financial technology scenarios are solved, and the elastic expansion of the system and the accuracy of transaction data are achieved. It is suitable for banking core systems and payment clearing platforms.

CN120671203APending Publication Date: 2025-09-19INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510775637.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

When the existing Snowflake algorithm is expanded in complex financial technology application scenarios, the fixed number of machine identification bits makes expansion difficult, and there is a high risk of identification duplication when upgrading new and old strategies. The full upgrade must be costly and may lead to transaction data confusion and fund reconciliation failures.

Method used

Distributed identifiers are generated in a distributed system through the master node, the configuration center is used to manage the length of the machine identifier field, an expansion flag is introduced to distinguish between new and old strategies, and atomic operations and millisecond-level time window isolation are combined to ensure the uniqueness and consistency of identifier generation.

Benefits of technology

It achieves elastic expansion of distributed systems, avoids duplication of old and new node identifiers, reduces operation and maintenance costs, ensures the accuracy of transaction data and high availability of the system, and is suitable for large-scale cluster deployments such as banking core systems and payment clearing platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671203A_ABST
    Figure CN120671203A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed identification generation method and device, equipment and a medium, and relates to the field of financial science and technology, and the method comprises the steps: responding to an identification generation request for a stock node, and reading a global variable initial value and a machine identification; when the validity verification condition is met, obtaining a fixed-length stock timestamp field according to a time difference value between the current time and the preset standard time; calling a serial number generator to generate a fixed-length stock serial number field, and converting the machine identifier into a fixed-length stock working machine identifier field; and carrying out data series connection on a preset sign bit, a stock timestamp field, a stock serial number field, a stock working machine identifier field and a stock expansion flag bit determined according to the parity of the initial value of the global variable to form a distributed identifier. According to the embodiment of the invention, by dynamically managing the length of the machine identification field, the traditional bit limitation is broken through to realize elastic capacity expansion, so that the capacity of a single cluster node is expanded as required to adapt to large-scale cluster deployment requirements of a bank core system and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, applicable to the field of financial technology, and in particular to a distributed identification generation method, device, equipment and medium. Background Art

[0002] In the field of financial technology, the Snowflake algorithm has extremely wide applications. The unique identifier generated by the Snowflake algorithm can ensure that in high-concurrency transaction scenarios, each transaction has an accurate and non-repetitive identifier, avoiding transaction confusion caused by identifier conflicts.

[0003] However, the existing snowflake algorithm has exposed some obvious shortcomings in the complex application scenarios of financial technology. When the system scales up and the node capacity needs to be expanded, if the existing number of machine identification bits cannot meet the demand, the number of machine identification bits can only be expanded by reconstructing the algorithm, borrowing bits from the serial number, etc. However, when adopting a grayscale upgrade or batch upgrade strategy, the new and old nodes use different identification generation strategies, which is very likely to cause identification duplication problems. This will directly lead to serious consequences such as confusion in transaction data and failure of fund reconciliation. To avoid this risk, the traditional solution can only choose to upgrade all nodes at the same time. However, this "one-size-fits-all" upgrade method not only significantly increases operation and maintenance costs, but also causes business interruption due to system downtime, resulting in huge economic losses and reputation risks for financial institutions. Summary of the Invention

[0004] Based on this, the present invention provides a distributed identifier generation method, device, equipment and medium to solve the problems of the traditional snowflake algorithm in high-concurrency and strong consistency business scenarios in the financial industry, such as difficulty in expansion due to the fixed number of machine identifier bits, high risk of identifier duplication when upgrading new and old strategies, and huge cost of full upgrade.

[0005] In a first aspect, an embodiment of the present invention provides a distributed identifier generation method, which is executed by a master node in a distributed system including multiple nodes, comprising:

[0006] In response to a request to generate a distributed identifier for an existing node in the distributed system before expansion, the initial value of a global variable of the non-expanded distributed system is read from the configuration center, and the machine identifier of the existing node is read from the local configuration file;

[0007] When the validity verification conditions are met according to the global variable initial value and the machine identification of the inventory node, a fixed-length inventory timestamp field is obtained according to the time difference between the current time and the preset standard time;

[0008] Based on the time difference, the serial number generator is called to generate a fixed-length inventory serial number field, and the machine ID of the inventory node is converted into a fixed-length inventory working machine ID field;

[0009] The preset sign bit, inventory timestamp field, inventory serial number field, inventory working machine identification field and inventory expansion flag bit determined according to the parity of the initial value of the global variable are concatenated, and the concatenated data is used as the distributed identification of the inventory node in the distributed system.

[0010] In a second aspect, an embodiment of the present invention further provides a distributed identifier generation device, which is deployed in a master node in a distributed system including multiple nodes, including:

[0011] An identifier generation request response module is used to respond to a distributed identifier generation request for existing nodes in the distributed system before expansion, read the initial values ​​of global variables of the non-expanded distributed system from the configuration center, and read the machine identifiers of the existing nodes from the local configuration file;

[0012] The first field generation module is configured to obtain a fixed-length stock timestamp field based on the time difference between the current time and the preset standard time when the validity verification condition is satisfied according to the global variable initial value and the machine identification of the stock node;

[0013] The second field generation module is used to call the sequence number generator to generate a fixed-length inventory sequence number field according to the time difference, and convert the machine ID of the inventory node into a fixed-length inventory working machine ID field;

[0014] The distributed identification generation module is used to concatenate the preset sign bit, the inventory timestamp field, the inventory serial number field, the inventory working machine identification field, and the inventory expansion flag bit determined according to the parity of the initial value of the global variable, and use the concatenated data as the distributed identification of the inventory node in the distributed system.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a distributed identifier generation method according to any embodiment of the present invention.

[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a distributed identifier generation method described in any embodiment of the present invention when executed.

[0020] In the embodiment of the present invention, the length of the machine identification field is dynamically managed by the configuration center, breaking through the traditional bit limit to achieve elastic expansion, so that the capacity of a single cluster node can be expanded on demand, and adapting to the large-scale cluster deployment requirements of banking core systems, payment and clearing platforms, etc. By introducing an expansion flag to distinguish between old and new strategies, it is ensured that the identifiers generated by new and old nodes during grayscale upgrades are completely isolated to avoid duplication risks. In terms of performance implementation, the embodiment of the present invention uses atomic operation technology to generate the serial number field, and cooperates with millisecond-level time window isolation to achieve single-node single-millisecond high concurrency lock-free generation. At the same time, the timestamp field is calibrated through the clock synchronization algorithm, combined with double hash verification of the configuration parameter integrity, to ensure that the identifier generation meets the financial regulatory requirements for data temporality and tamper-proofing, and provide a reliable unique identification solution for real-time transaction scenarios.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 This is a flow chart of a distributed identifier generation method provided in accordance with the first embodiment of the present invention;

[0024] Figure 2 This is a schematic diagram of the internal structure division of a 64-bit distributed identifier before and after expansion according to the first embodiment of the present invention;

[0025] Figure 3 This is a structural diagram of a distributed identifier generation device provided according to the second embodiment of the present invention;

[0026] Figure 4 The present invention is a schematic diagram of the structure of an electronic device for implementing a distributed identifier generation method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Example 1

[0030] Figure 1 This is a flowchart of a distributed identification generation provided by the first embodiment of the present invention. This embodiment is applicable to the situation where high-frequency and concurrent transactions in financial technology scenarios require continuous expansion of nodes. The method can be executed by a master node in a distributed system containing multiple nodes. The device can be implemented in the form of hardware and / or software. The device can be configured in a master node deployed in a distributed system containing multiple nodes. Figure 1 As shown, the method includes:

[0031] S110 , in response to a request to generate a distributed identifier for existing nodes before expansion in the distributed system, read the initial values ​​of global variables of the non-expanded distributed system from the configuration center, and read the machine identifiers of the existing nodes from the local configuration file.

[0032] The core goal of the embodiments of this invention is to generate a globally unique, ordered, and information-specific distributed identifier for existing nodes in a distributed system before the expansion operation. A master node is a special node selected or elected to coordinate and manage specific tasks in a distributed system consisting of multiple nodes.

[0033] When the master node receives a request to generate a distributed identifier for an existing node (i.e., a node that has been deployed and running before the distributed system is expanded), it first needs to obtain the necessary configuration information. The master node reads the initial value of the global variable of the unexpanded distributed system from the configuration center (a service or component that centrally stores and manages system configuration information). The "initial value of the global variable" is usually a preset constant determined when the system is initially deployed, which serves as the root or offset for generating the identifier. At the same time, the master node reads the machine identifier of the specific existing node in the local configuration file (a configuration file stored on the node's own disk). The machine identifier is a unique code (usually an integer or string) assigned to each physical machine, virtual machine, or container instance, which is used to distinguish different working nodes in the cluster.

[0034] S120. When the validity verification condition is satisfied according to the initial value of the global variable and the machine identification of the stock node, a fixed-length stock timestamp field is obtained according to the time difference between the current time and the preset standard time.

[0035] The master node uses the global variable initial value just read and the machine ID of the stock node to perform some logical checks or calculations. The validity verification condition must ensure that the global variable initial value is legal and has not been tampered with (for example, check its range, format or signature). At the same time, ensure that the machine ID read locally is valid and recognized in the current configuration of the system (for example, check whether it is within the preset node ID range). If the verification fails, error handling can be triggered (such as error reporting, retrying or rejecting the request). After the verification is passed, the master node begins to construct the components of the identification. First, calculate the time difference (usually in milliseconds or seconds) between the current time (the system time when the master node executes this step) and a preset standard time (usually a fixed historical time point, such as (2025-01-01 00:00:00 UTC), or the epoch time designed by the system).

[0036] The time difference is converted into a fixed-length, stock timestamp field. "Fixed-length" means that regardless of the actual duration represented by the time difference, the resulting timestamp field occupies a fixed number of bits in the binary or final identifier string representation (in this embodiment, it can be fixed to 41 bits). The term "stock" is used primarily to emphasize that the timestamp is generated for the node before expansion.

[0037] Optionally, verifying that validity verification conditions are met based on the initial value of the global variable and the machine identification of the existing node may include:

[0038] Converting the machine identifier of the existing node into a binary representation;

[0039] If the length of the binary representation of the machine identifier does not exceed the bit limit corresponding to the initial value of the global variable, it is determined that the validity verification condition is met.

[0040] The master node first converts the machine ID of the existing node into its binary representation and checks the length of the binary bit string of the obtained machine ID. This check requires an upper length limit as a comparison benchmark, which means that the global variable initial value itself implicitly or explicitly defines a numerical value (N), which represents the maximum number of binary bits reserved by the system for the working machine ID field. For example, if the system is designed to have a working machine ID field of 10 bits, then the bit limit N is 10. Check whether the binary length of the machine ID exceeds the bit limit defined by the global variable initial value. If the above judgment is true (the length does not exceed N), the master node determines that the validity verification condition is met. This shows that the machine ID of the current node is legal, and its value can be fully and unambiguously represented within the reserved fixed number of bits. The subsequent steps can continue to generate the ID.

[0041] By converting machine identifiers into binary and verifying their lengths against global variable bit limits, distributed node parameters can be automatically checked for compliance. In fintech scenarios, this mechanism can intercept illegal machine identifiers (such as out-of-range values) caused by operational errors or malicious attacks, preventing the generation of duplicate or non-compliant transaction identifiers. It also ensures that all existing nodes adhere to uniform field length rules, providing a foundation for orthogonal isolation of new and old strategies during subsequent grayscale upgrades. This reduces the risk of system crashes due to parameter errors, meeting the financial industry's stringent requirements for high availability.

[0042] Furthermore, after converting the machine identifier of the existing node into a binary representation, the following steps may be further included:

[0043] If the length of the binary representation of the machine identifier exceeds the digit limit corresponding to the initial value of the global variable, it is determined that the validity verification condition is not met;

[0044] Restart the existing nodes before the expansion.

[0045] If the above judgment is true (the binary length of the machine identifier exceeds the bit limit), the master node determines that the validity verification condition is not met. This means that the machine identifier value of the current node is too large to be fully and unambiguously represented in the fixed-length (N-bit) working machine identifier field reserved by the system. If it is used forcibly, it will cause high-bit truncation or information loss, which may cause identifier conflicts (different machine identifiers may be the same after truncation) or inability to accurately trace the identifier generation node. After determining that the validity verification condition is not met, the master node needs to perform a restart operation on the existing node before the expansion (that is, the specific node that issued the identifier generation request). The restart operation forces the node process to terminate and restart, hoping that the node can re-pull the latest and correct configuration information from the configuration center when it starts; reload its local configuration file (perhaps the administrator has corrected the incorrect machine identifier), or trigger the node's internal initialization or error recovery logic to enable it to obtain a valid machine identifier that meets the system bit limit.

[0046] When a machine ID binary length exceeds the limit, it automatically triggers a node restart to reset parameters, enabling self-healing capabilities in distributed systems. In fintech scenarios, this mechanism can restart nodes to reload valid machine IDs that meet the bit limit, ensuring that all nodes in the cluster adhere to a unified policy.

[0047] S130. Based on the time difference, call a serial number generator to generate a fixed-length stock serial number field, and convert the machine ID of the stock node into a fixed-length stock working machine ID field.

[0048] The master node calls a serial number generator based on the time difference obtained in the previous step. A serial number generator is a component responsible for generating continuously increasing numbers within a time window (for example, the same millisecond). Its core function is to address the issue of multiple identification requests within the same millisecond under high concurrency, ensuring that identifications within the same millisecond are unique. The generator guarantees that the generated serial numbers are unique within a given time window (typically cycling between 0 and a maximum value).

[0049] The serial number generator outputs a fixed-length inventory serial number field (also occupying a fixed number of bits, such as 11). At the same time, the master node converts the machine ID of the inventory node into a fixed-length inventory working machine ID field. The purpose of the conversion is to adapt the original machine ID (which may be of variable length or have a large range of values) to the fixed number of bits reserved in the identifier. This is usually achieved through mapping, hashing, or directly using the original value.

[0050] Optionally, based on the time difference, a sequence number generator is called to generate a fixed-length inventory sequence number field, which may include:

[0051] If the time difference is equal to 0, the initialized numerical variable maintained by the sequence number generator is incremented by 1 through an atomic operation, and a check is performed to see whether the binary representation length corresponding to the incremented numerical variable exceeds the fixed-length sequence number field;

[0052] If it does not exceed the limit, the binary representation corresponding to the auto-incremented numerical variable is directly used as the stock sequence number field generated this time; if it exceeds the limit, the system time is continuously checked and the numerical variable maintained by the sequence number generator is reset to 0 when entering the next unit time, and the binary representation corresponding to the reset numerical variable is used as the stock sequence number field generated this time;

[0053] If the time difference is greater than 0, the numerical variable maintained by the serial number generator is reset to 0, and the binary representation corresponding to the reset numerical variable is used as the stock serial number field generated this time.

[0054] The present invention describes in detail how to generate a fixed-length existing sequence number field, specifically addressing two key scenarios: when the time difference is 0 (within the current time window) and when the time difference is greater than 0 (when entering a new time window). During the distributed identification generation process, a unique and incremental sequence number is generated for multiple identification requests that may occur within the same time window (e.g., 1 millisecond), ensuring that the sequence number can adapt to the fixed-length field and handling the sequence number overflow problem.

[0055] Specifically, a time difference of 0 means that the current request and the previous request are in the same minimum time unit (for example, the same millisecond). At this time, the serial number needs to be incremented to ensure that the identifier within the same millisecond is not repeated. Atomic increment means that the serial number generator performs an atomic operation on an initialized numerical variable (usually a counter, the initial value may be 0 or 1) maintained internally to increment its value by 1. After the increment is completed, the serial number generator checks the binary representation length of the incremented numerical variable (that is, the new serial number value). The verification standard is to see whether the binary length exceeds the bit limit of the fixed-length serial number field (for example, if the system is designed to have a 10-bit serial number, the maximum that can be represented is 1024). Assuming that the serial number field reserves S bits, the maximum value of the serial number is 2 S -1.

[0056] The most common case is that the number is not exceeded. The serial number generator directly converts the numeric variable after the auto-increment into a binary representation as the stock serial number field generated this time. The binary string will be padded or truncated to a fixed length of S bits. If it exceeds, it means that the serial number has been used up in the current time window (the maximum value that S bits can represent has been reached). S-1 and then incremented again), the serial number generator cannot generate a new serial number in the current window at this time, so it continues to detect the system time and waits for the next unit of time (for example, if the current time is the Tth millisecond, wait for the system time to enter the T+1th millisecond). Once it detects that the time has entered a new minimum unit (T+1 millisecond), the serial number generator immediately resets the numerical variable it maintains to 0 (or the initial value, such as 1). The serial number generator converts the reset numerical variable (0 or 1) into a binary representation as the stock serial number field generated this time. At this time, the timestamp field has become T+1, and the serial number starts again from 0 or 1, ensuring the uniqueness and order of the identification.

[0057] If the time difference is greater than 0, it means that the timestamp of the current request has entered one or more new time windows compared to the timestamp recorded when the sequence number generator last generated a sequence number (for example, the last time was T milliseconds, this time it is T+1 or T+N milliseconds). Since the time window has switched, the old sequence number counter is no longer meaningful. The sequence number generator directly resets the numerical variable it maintains to 0 (or the system-defined initial value, such as 1) and converts the reset numerical variable (0 or 1) into a binary representation as the inventory sequence number field generated this time.

[0058] Time windows are precisely divided by time difference. When the time difference is 0, atomic operations are used to increment the sequence number to ensure increment within the same window. When the time difference jumps, the sequence number is reset to 0 to achieve cross-window isolation and ensure strict sequential identity generation. Sequence number increment is implemented based on atomic variables, supporting high concurrency without locking. The single-node, single-millisecond generation capacity reaches the theoretical upper limit of fixed-length fields, significantly improving throughput. When the sequence number increment exceeds the fixed-length field length limit, it automatically waits until the next unit time to reset to 0, avoiding generation failures caused by value overflow and enhancing system stability.

[0059] S140. Concatenate the preset sign bit, the inventory timestamp field, the inventory sequence number field, the inventory working machine identification field, and the inventory expansion flag bit determined according to the parity of the initial value of the global variable, and use the concatenated data as the distributed identification of the inventory node in the distributed system.

[0060] The master node collects all generated fixed-length fields: the preset sign bit is usually fixed to 0 (indicating a positive number), and 1 bit is reserved; the stock timestamp field refers to the fixed-length timestamp generated in step S120; the stock sequence number field refers to the fixed-length sequence number generated in step S130. The stock working machine identification field refers to the fixed-length machine identification obtained by conversion in step S130. The stock expansion flag is a special flag (usually 1 bit), and its value is determined by the parity of the initial value of the global variable. For example, if the initial value is an even number, the flag is set to 0; if it is an odd number, the flag is set to 1. The flag is specifically used to mark that this identification is generated by the stock node before the expansion, which is a key mechanism for distinguishing the identification before the expansion from the identification generated by the new node after the future expansion.

[0061] The master node concatenates these fields in a predefined, fixed bit order, for example: sign bit + timestamp + serial number + working machine ID + expansion flag bit. The complete binary bit string formed by the concatenation is the final distributed identifier, which will be assigned to the target inventory node that issued the request.

[0062] Furthermore, the method may further include:

[0063] In response to a distributed identifier generation request for a newly added node in the distributed system after capacity expansion, detecting a new global variable value of the distributed system after capacity expansion;

[0064] When the validity verification condition is satisfied according to the new global variable value and the machine identification of the newly added node, a new timestamp field of fixed length is obtained according to the time difference between the current time and the preset standard time;

[0065] Based on the time difference, the serial number generator is called to generate a fixed-length new serial number field, and the machine ID of the new node is converted into a fixed-length new working machine ID field;

[0066] The preset sign bit, the newly added timestamp field, the newly added serial number field, the newly added work machine identification field, and the newly added expansion flag bit determined according to the parity of the new global variable value are concatenated, and the new data obtained by concatenation is used as the distributed identification of the new node in the distributed system.

[0067] The master node detects the new global variable values ​​of the distributed system after the expansion. After the expansion operation, the system's configuration baseline has been updated. The master node no longer uses the existing node identifiers to generate the initial values ​​of the global variables it relies on, but actively obtains or detects the updated new global variable values ​​in the configuration center. This new global variable value is the new benchmark for subsequent steps (especially flag determination), indicating that the generation has entered the "post-expansion" stage. The verification conditions use the new global variable value and the machine identifier of the newly added node. The logical framework of the validity verification is similar to that of the existing nodes, but its input parameters have been switched. What is verified is the identifier of the newly added node. These identifiers are allocated or registered during the expansion and are different from the identifier pool of the existing nodes.

[0068] The newly added expansion flag bit determined according to the parity of the new global variable value is used as one of the serial fields. This is the most critical design to achieve physical isolation of the new and old identification spaces. The existing expansion flag bit of the existing node is determined by the parity of the initial value of the global variable. The key to system design is to ensure that the parity combination of the initial value of the global variable and the new global variable value can produce different flag results (usually one odd and one even or a fixed value is used to distinguish). The 1-bit newly added expansion flag bit is embedded in the final identification, forming a clear contrast with the existing expansion flag bit in the existing node identification. When the system parses any identification, it only needs to check this flag bit to instantly determine whether the identification belongs to the identification space before or after the expansion. This is the core mechanism to ensure global uniqueness (avoid conflicts between new and old node identifications) and distinguish node generations.

[0069] The final generated identifier clearly belongs to the new node that joins after the expansion request. Although its structure is similar to the existing node identifier (sign bit + timestamp + serial number + working machine identifier + expansion flag bit), it contains the expansion flag bit determined by the new global variable value and the data field generated specifically for the new node, thus having a unique identity within the system. Figure 2 As shown, a schematic diagram of the internal structure division of a 64-bit distributed identifier before and after expansion in an embodiment of the present invention is shown.

[0070] By detecting the value of the new global variable and dynamically adapting the length of the expanded machine identification field, and combining the parity of the new global variable to generate a new expansion flag, the identification generation strategy achieves natural isolation between new and existing nodes during the grayscale coexistence period through differences in flags and field layouts, avoiding cross-generational identification conflicts caused by hard-coded fields in traditional solutions. At the same time, new nodes continue to use the same time difference calibration algorithm and atomic operation mechanism of the serial number generator as existing nodes, ensuring unified identification generation rules and no performance differences when new and old nodes are deployed together, meeting the strong consistency requirements of transaction identification in the financial technology field.

[0071] Optionally, after using the concatenated data as the distributed identifier of the existing node in the distributed system, the following steps may also be included:

[0072] When the distributed system detects that it has restarted an existing node or receives a mandatory update instruction for an existing node from the configuration center, it reads the new global variable value of the expanded distributed system from the configuration center and re-determines the new existing expansion flag based on the parity of the new global variable value;

[0073] Reset the numerical variable maintained by the serial number generator to 0, and convert the machine ID of the existing node into a new fixed-length existing working machine ID field according to the rules corresponding to the new global variable value;

[0074] Get the time difference between the current time and the preset standard time, obtain the updated new inventory fixed-length time stamp field, and call the serial number generator to generate a new fixed-length inventory serial number field;

[0075] The preset sign bit, the new inventory timestamp field, the new inventory serial number field, the new inventory working machine identification field and the new inventory expansion flag bit are connected in series to generate a distributed identification for the expanded inventory node.

[0076] This embodiment mainly describes how the existing nodes update their distributed identifiers after the system is expanded. Specifically, the master node no longer uses the initial value of the global variable, but reads the new global variable value that takes effect after the expansion, and recalculates and determines a flag bit according to the parity of the new global variable value, i.e., the new existing expansion flag bit. It is guaranteed that the flag bit in the existing node identifier generated after the refresh is calculated based on the same basis as the flag bit of the newly added node identifier. However, the new existing expansion flag bit is different from the existing expansion flag bit value determined by the initial value of the global variable in the old identifier of the node (because the reference value has changed, and the parity result is guaranteed to distinguish between new and old during design). This makes the refreshed existing node identifier equivalent to the newly added node identifier in terms of the flag bit, and thus belongs to the same identification space after expansion. The counter of the serial number generator is reset to 0, which is the same as the operation when entering a new time window or generating an initial serial number for a newly added node. The purpose is to ensure that the serial number count starts from a new starting point.

[0077] The following newly generated or converted fields according to new rules are combined: the preset sign bit (usually unchanged, fixed to 0), the new stock timestamp field (the new timestamp at the refresh moment), the new stock serial number field (the new serial number generated by the serial number generator after reset), the new stock work machine identification field (the machine identification converted according to the new global variable value rules), and the new stock expansion flag (the flag determined by the parity of the new global variable value). The generated identifier is also the expanded distributed identifier for the stock node. This identifier includes the work machine identification converted according to the new rules after expansion and the flag calculated based on the new configuration after expansion, so that its structure conforms to the specifications of the expanded system. The value of its new stock expansion flag is equivalent to the newly added expansion flag of the newly added node identification, and belongs to the "post-expansion identification space."

[0078] By dynamically pushing new global variable values ​​through the configuration center and automatically adjusting the expansion flags and machine identification field lengths of existing nodes in combination with parity rules, cluster expansion can be completed smoothly without full downtime, supporting scenarios with extremely high availability requirements, such as banking core systems. The serial number generator is forced to reset to 0 to ensure that identification generation and new expansion nodes follow unified timing rules after restart, avoiding identification conflicts caused by historical counter values. The ability to dynamically adjust the length of the working machine identification field enables the capacity of a single cluster node to be expanded on demand. At the same time, through the orthogonal isolation of the new and old flags, the compatibility of the identification generation strategies of the new and old nodes during expansion is guaranteed, providing basic technical support for the elastic scaling of the financial cloud architecture.

[0079] Furthermore, it may also include: defining the distributed identification of the existing nodes in the distributed system to include: a fixed 1-bit sign bit, a 41-bit timestamp field, an 11-bit serial number field, a 10-bit working machine identification field and a 1-bit expansion flag bit.

[0080] The embodiment of the present invention defines a unique identification structure for existing nodes in a distributed system. By decomposing fields and designing fixed lengths, it adds expansion flags to the traditional snowflake algorithm to form a five-layer field system: 1-bit sign bit: retains the sign bit of the traditional snowflake algorithm (usually 0, indicating a positive number) to ensure compatibility with the old system. 41-bit timestamp field: records the time when the identifier is generated to ensure the timing of the identifier. 11-bit sequence number field: a single node can generate 2 11 = 2048 unique values, achieve lock-free concurrency through atomic operations, and improve performance in high-concurrency scenarios. 10-bit work machine identification field: identifies the node identity, supports 2 10 =1024 nodes, meeting the needs of small and medium-sized clusters. 1-bit expansion flag: A new field that uses 0 or 1 to mark whether a node belongs to the new strategy after expansion (for example, 0 for the old strategy and 1 for the new strategy), providing version identification for dynamic cluster expansion.

[0081] This identification structure solves the contradiction between elastic expansion, grayscale upgrade, and high concurrency performance in distributed systems through field reorganization and flag innovation, without sacrificing the advantages of the traditional snowflake algorithm. It is particularly suitable for scenarios in financial technology that have extremely high requirements for stability, scalability, and compliance (such as banking core systems and securities trading platforms).

[0082] In the embodiment of the present invention, the length of the machine identification field is dynamically managed by the configuration center, breaking through the traditional bit limit to achieve elastic expansion, so that the capacity of a single cluster node can be expanded on demand, and adapting to the large-scale cluster deployment requirements of banking core systems, payment and clearing platforms, etc. By introducing an expansion flag to distinguish between old and new strategies, it is ensured that the identifiers generated by new and old nodes during grayscale upgrades are completely isolated to avoid duplication risks. In terms of performance implementation, the embodiment of the present invention uses atomic operation technology to generate the serial number field, and cooperates with millisecond-level time window isolation to achieve single-node single-millisecond high concurrency lock-free generation. At the same time, the timestamp field is calibrated through the clock synchronization algorithm, combined with double hash verification of the configuration parameter integrity, to ensure that the identifier generation meets the financial regulatory requirements for data temporality and tamper-proofing, and provide a reliable unique identification solution for real-time transaction scenarios.

[0083] Example 2

[0084] Figure 3 A schematic diagram of the structure of a distributed identifier generation device provided in the second embodiment of the present invention.

[0085] like Figure 3 As shown, the device includes:

[0086] The identifier generation request response module 310 is configured to respond to a distributed identifier generation request for existing nodes in the distributed system before expansion, read the initial values ​​of global variables of the non-expanded distributed system from the configuration center, and read the machine identifiers of the existing nodes from the local configuration file;

[0087] The first field generation module 320 is configured to generate a fixed-length stock timestamp field based on the time difference between the current time and the preset standard time when the validity verification condition is satisfied according to the global variable initial value and the machine identification of the stock node;

[0088] The second field generation module 330 is used to call the sequence number generator to generate a fixed-length inventory sequence number field based on the time difference, and convert the machine ID of the inventory node into a fixed-length inventory working machine ID field;

[0089] The distributed identification generation module 340 is used to concatenate the preset sign bit, the inventory timestamp field, the inventory sequence number field, the inventory working machine identification field, and the inventory expansion flag bit determined according to the parity of the initial value of the global variable, and use the concatenated data as the distributed identification of the inventory node in the distributed system.

[0090] In the embodiment of the present invention, the length of the machine identification field is dynamically managed by the configuration center, breaking through the traditional bit limit to achieve elastic expansion, so that the capacity of a single cluster node can be expanded on demand, and adapting to the large-scale cluster deployment requirements of banking core systems, payment and clearing platforms, etc. By introducing an expansion flag to distinguish between old and new strategies, it is ensured that the identifiers generated by new and old nodes during grayscale upgrades are completely isolated to avoid duplication risks. In terms of performance implementation, the embodiment of the present invention uses atomic operation technology to generate the serial number field, and cooperates with millisecond-level time window isolation to achieve single-node single-millisecond high concurrency lock-free generation. At the same time, the timestamp field is calibrated through the clock synchronization algorithm, combined with double hash verification of the configuration parameter integrity, to ensure that the identifier generation meets the financial regulatory requirements for data temporality and tamper-proofing, and provide a reliable unique identification solution for real-time transaction scenarios.

[0091] Optionally, based on the above embodiments, the method may further include: a node expansion unit configured to detect a new global variable value of the distributed system after expansion in response to a distributed identifier generation request for a newly added node in the distributed system after expansion;

[0092] When the validity verification condition is satisfied according to the new global variable value and the machine identification of the newly added node, a new timestamp field of fixed length is obtained according to the time difference between the current time and the preset standard time;

[0093] Based on the time difference, the serial number generator is called to generate a fixed-length new serial number field, and the machine ID of the new node is converted into a fixed-length new working machine ID field;

[0094] The preset sign bit, the newly added timestamp field, the newly added serial number field, the newly added work machine identification field, and the newly added expansion flag bit determined according to the parity of the new global variable value are concatenated, and the new data obtained by concatenation is used as the distributed identification of the new node in the distributed system.

[0095] Optionally, based on the above embodiments, the first field generating module 320 may include:

[0096] A machine identification conversion unit, configured to convert the machine identification of the existing node into a binary representation;

[0097] The first validity verification unit is configured to determine that a validity verification condition is satisfied if the length of the binary representation of the machine identifier does not exceed the bit limit corresponding to the initial value of the global variable.

[0098] Optionally, based on the above embodiments, the method may further include: a second validity verification unit configured to, after converting the machine identifier of the existing node into a binary representation, determine that a validity verification condition is not satisfied if the length of the binary representation of the machine identifier does not exceed the bit limit corresponding to the initial value of the global variable;

[0099] Restart the existing nodes before the expansion.

[0100] Optionally, based on the above embodiments, the second field generating module 330 may include:

[0101] A sequence number auto-increment unit, configured to, if the time difference is equal to 0, auto-increment the initialized numerical variable maintained by the sequence number generator by 1 through an atomic operation, and to check whether the binary representation length corresponding to the auto-incremented numerical variable exceeds the fixed-length sequence number field;

[0102] The auto-increment check unit is used to directly use the binary representation of the numeric variable after the auto-increment as the field of the currently generated stock sequence number if the limit is not exceeded; if the limit is exceeded, the system time is continuously checked and the numeric variable maintained by the sequence number generator is reset to 0 when the next unit time is entered, and the binary representation of the reset numeric variable is used as the field of the currently generated stock sequence number;

[0103] The serial number resetting unit is used to reset the numerical variable maintained by the serial number generator to 0 if the time difference is greater than 0, and use the binary representation corresponding to the reset numerical variable as the stock serial number field generated this time.

[0104] Optionally, based on the above embodiments, the present invention may further include: an existing node expansion unit, configured to, after using the serially obtained data as a distributed identifier of the existing node in the distributed system, read a new global variable value of the distributed system after expansion from the configuration center when detecting that the distributed system restarts the existing node or receives a forced update instruction for the existing node pushed by the configuration center, and re-determine a new existing expansion flag bit based on the parity of the new global variable value;

[0105] Reset the numerical variable maintained by the serial number generator to 0, and convert the machine ID of the existing node into a new fixed-length existing working machine ID field according to the rules corresponding to the new global variable value;

[0106] Get the time difference between the current time and the preset standard time, obtain the updated new inventory fixed-length time stamp field, and call the serial number generator to generate a new fixed-length inventory serial number field;

[0107] The preset sign bit, the new inventory timestamp field, the new inventory serial number field, the new inventory working machine identification field and the new inventory expansion flag bit are connected in series to generate a distributed identification for the expanded inventory node.

[0108] Optionally, based on the above embodiments, it can also include a parameter predefinition unit for defining the distributed identification of existing nodes in the distributed system, including: a fixed 1-bit sign bit, a 41-bit timestamp field, an 11-bit serial number field, a 10-bit working machine identification field and a 1-bit expansion flag bit.

[0109] A distributed identifier generation device provided by an embodiment of the present invention can execute a distributed identifier generation method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method.

[0110] Example 3

[0111] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0112] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0113] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0114] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a distributed identifier generation method.

[0115] That is, in response to a request to generate a distributed identifier for the existing nodes in the distributed system before expansion, the initial values ​​of the global variables of the non-expanded distributed system are read from the configuration center, and the machine identifiers of the existing nodes are read from the local configuration file;

[0116] When the validity verification conditions are met according to the global variable initial value and the machine identification of the inventory node, a fixed-length inventory timestamp field is obtained according to the time difference between the current time and the preset standard time;

[0117] Based on the time difference, the serial number generator is called to generate a fixed-length inventory serial number field, and the machine ID of the inventory node is converted into a fixed-length inventory working machine ID field;

[0118] The preset sign bit, inventory timestamp field, inventory serial number field, inventory working machine identification field and inventory expansion flag bit determined according to the parity of the initial value of the global variable are concatenated, and the concatenated data is used as the distributed identification of the inventory node in the distributed system.

[0119] In some embodiments, a distributed identifier generation method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the distributed identifier generation method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform a distributed identifier generation method in any other suitable manner (e.g., via firmware).

[0120] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0121] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0122] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0124] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0125] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0126] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0127] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A distributed identifier generation method, characterized in that: Executed by a master node in a distributed system comprising multiple nodes, the method comprises: In response to a request to generate a distributed identifier for an existing node in the distributed system before expansion, the initial value of a global variable of the non-expanded distributed system is read from the configuration center, and the machine identifier of the existing node is read from the local configuration file; When the validity verification conditions are met according to the global variable initial value and the machine identification of the inventory node, a fixed-length inventory timestamp field is obtained according to the time difference between the current time and the preset standard time; Based on the time difference, the serial number generator is called to generate a fixed-length inventory serial number field, and the machine ID of the inventory node is converted into a fixed-length inventory working machine ID field; The preset sign bit, inventory timestamp field, inventory serial number field, inventory working machine identification field and inventory expansion flag bit determined according to the parity of the initial value of the global variable are concatenated, and the concatenated data is used as the distributed identification of the inventory node in the distributed system.

2. The method according to claim 1, characterized in that The method further comprises: In response to a distributed identifier generation request for a newly added node in the distributed system after capacity expansion, detecting a new global variable value of the distributed system after capacity expansion; When the validity verification condition is satisfied according to the new global variable value and the machine identification of the newly added node, a new timestamp field of fixed length is obtained according to the time difference between the current time and the preset standard time; Based on the time difference, the serial number generator is called to generate a fixed-length new serial number field, and the machine ID of the new node is converted into a fixed-length new working machine ID field; The preset sign bit, the newly added timestamp field, the newly added serial number field, the newly added work machine identification field, and the newly added expansion flag bit determined according to the parity of the new global variable value are concatenated, and the new data obtained by concatenation is used as the distributed identification of the new node in the distributed system.

3. The method according to claim 1, characterized in that Verify that the validity verification conditions are met based on the initial value of the global variable and the machine identification of the existing node, including: Converting the machine identifier of the existing node into a binary representation; If the length of the binary representation of the machine identifier does not exceed the bit limit corresponding to the initial value of the global variable, it is determined that the validity verification condition is met.

4. The method according to claim 3, characterized in that After converting the machine identifier of the existing node into a binary representation, the method further includes: If the length of the binary representation of the machine identifier does not exceed the bit limit corresponding to the initial value of the global variable, it is determined that the validity verification condition is not met; Restart the existing nodes before the expansion.

5. The method according to claim 1, wherein Based on the time difference, the serial number generator is called to generate a fixed-length inventory serial number field, including: If the time difference is equal to 0, the initialized numerical variable maintained by the sequence number generator is incremented by 1 through an atomic operation, and a check is performed to see whether the binary representation length corresponding to the incremented numerical variable exceeds the fixed-length sequence number field; If it does not exceed the limit, the binary representation corresponding to the auto-incremented numerical variable is directly used as the stock sequence number field generated this time; if it exceeds the limit, the system time is continuously checked and the numerical variable maintained by the sequence number generator is reset to 0 when entering the next unit time, and the binary representation corresponding to the reset numerical variable is used as the stock sequence number field generated this time; If the time difference is greater than 0, the numerical variable maintained by the serial number generator is reset to 0, and the binary representation corresponding to the reset numerical variable is used as the stock serial number field generated this time.

6. The method according to any one of claims 1 to 4, characterized in that After the concatenated data is used as the distributed identifier of the existing node in the distributed system, the following steps are also included: When the distributed system detects that it has restarted an existing node or receives a mandatory update instruction for an existing node from the configuration center, it reads the new global variable value of the expanded distributed system from the configuration center and re-determines the new existing expansion flag based on the parity of the new global variable value; Reset the numerical variable maintained by the serial number generator to 0, and convert the machine ID of the existing node into a new fixed-length existing working machine ID field according to the rules corresponding to the new global variable value; Get the time difference between the current time and the preset standard time, obtain the updated new inventory fixed-length time stamp field, and call the serial number generator to generate a new fixed-length inventory serial number field; The preset sign bit, the new inventory timestamp field, the new inventory serial number field, the new inventory working machine identification field and the new inventory expansion flag bit are connected in series to generate a distributed identification for the expanded inventory node.

7. The method according to claim 1, characterized in that The distributed identification of existing nodes in the distributed system includes: a fixed 1-bit sign bit, a 41-bit timestamp field, an 11-bit sequence number field, a 10-bit working machine identification field, and a 1-bit expansion flag bit.

8. A distributed identifier generation device, characterized in that: Deployed in a master node of a distributed system comprising multiple nodes, the device comprises: An identifier generation request response module is used to respond to a distributed identifier generation request for existing nodes in the distributed system before expansion, read the initial values ​​of global variables of the non-expanded distributed system from the configuration center, and read the machine identifiers of the existing nodes from the local configuration file; The first field generation module is configured to obtain a fixed-length stock timestamp field based on the time difference between the current time and the preset standard time when the validity verification condition is satisfied according to the global variable initial value and the machine identification of the stock node; The second field generation module is used to call the sequence number generator to generate a fixed-length inventory sequence number field according to the time difference, and convert the machine ID of the inventory node into a fixed-length inventory working machine ID field; The distributed identification generation module is used to concatenate the preset sign bit, the inventory timestamp field, the inventory serial number field, the inventory working machine identification field, and the inventory expansion flag bit determined according to the parity of the initial value of the global variable, and use the concatenated data as the distributed identification of the inventory node in the distributed system.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a distributed identifier generation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a distributed identifier generation method according to any one of claims 1 to 7 when executed.