Distributed ID generation method based on k8s environment and k8s distributed system
By obtaining the machine identification set in the K8s environment and generating a unique target identification, and combining the timestamp to generate a distributed ID, the problem of ID conflict and inconsistency in the K8s environment is solved, the uniqueness and consistency of the ID are achieved, and the system efficiency is improved. stability.
Patent Information
- Application Number
- CN202410583923.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2024-09-17
AI Technical Summary
In the K8s environment, existing ID generation methods may lead to ID conflicts and inconsistencies, especially ID inconsistencies caused by node identity changes when migration or restart occurs during the life cycle of the Pod.
By obtaining the machine ID set when the Pod is started, a unique target ID is generated, stored in the set, and combined with the current timestamp to generate a distributed ID to ensure the uniqueness and consistency of the ID.
It effectively avoids the ID conflict problem of distributed IDs, ensures the uniqueness and consistency of IDs during Pod expansion and reduction, and improves data consistency and business logic stability.
Smart Images

Figure CN118656170A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of distributed technology, and in particular to a distributed ID generation method based on a k8s environment and a k8s distributed system. Background Art
[0002] One of the common problems in distributed systems is ID conflicts. Even if methods such as timestamps, counters, or snowflake algorithms are used to generate IDs, ID conflicts may still occur due to concurrent operations or other reasons. This may lead to duplicate IDs in the system, causing data consistency and business logic errors. In a K8s environment, since deployed Pods can run on different nodes and replicas may be expanded and reduced during the life cycle of the Pod, the existing ID generation method may result in inconsistent generated IDs. For example, if a machine ID based on the node ID is used to generate an ID, the node ID may change when the Pod is migrated or restarted, resulting in inconsistent generated IDs. Summary of the invention
[0003] The embodiments of the present application provide a distributed ID generation method and a k8s distributed system based on a k8s environment, which can allocate a unique machine identifier when the POD is expanded, thereby avoiding the problem of ID conflict in the generated distributed ID.
[0004] The first aspect of the embodiment of the present application provides a distributed ID generation method based on a k8s environment, which is applied to a k8s distributed system, including:
[0005] When the target POD instance is started, a machine identification set is obtained from the database, where any two machine identifications in the machine identification set are different;
[0006] Generate a target identifier of the target POD instance according to the machine identifier set, wherein the target identifier is different from any machine identifier in the machine identifier set;
[0007] Storing the target identifier in the machine identifier set;
[0008] When the target POD instance needs to generate an identification code, obtain the current timestamp;
[0009] A distributed ID is generated according to the current timestamp and the target identifier.
[0010] Optionally, generating the target identifier of the target POD instance according to the machine identifier set includes:
[0011] Acquire a machine identification deletion set related to the machine identification set, wherein the machine identification deletion set stores machine identifications that are most recently deleted from the machine identification set;
[0012] Obtain any machine identifier from the machine identifier deletion set as the target identifier of the target POD instance.
[0013] Optionally, after obtaining any one machine identifier from the machine identifier deletion set as the target identifier of the target POD instance, the method further includes:
[0014] The machine identifier is deleted and the machine identifier in the deletion set that is consistent with the target identifier is deleted.
[0015] Optionally, generating the target identifier of the target POD instance according to the machine identifier set includes:
[0016] Get the value range of the machine ID;
[0017] Generate a target range according to the value range and the machine identification set, wherein the target range and the machine identification set constitute the value range;
[0018] A value is randomly obtained from the target range as the target identifier of the target POD instance.
[0019] Optionally, after generating a distributed ID according to the current timestamp and the target identifier, the method further includes:
[0020] The last active time of each machine identification in the machine identification set is updated.
[0021] Optionally, after updating the active time of each machine identification in the machine identification set, the method further includes:
[0022] Determining whether there is an invalid identification in the set of machine identifications according to the last active time of each machine identification;
[0023] If so, the invalidation mark is deleted.
[0024] Optionally, after storing the target identifier in the machine identifier set, the method further includes:
[0025] When the target POD instance is closed, the target identifier in the machine identifier set is deleted.
[0026] A second aspect of an embodiment of the present application provides a k8s distributed system, including:
[0027] A first acquisition unit is used to acquire a machine identification set from a database when a target POD instance is started, wherein any two machine identifications in the machine identification set are different;
[0028] A first generating unit, configured to generate a target identifier of the target POD instance according to the machine identifier set, wherein the target identifier is different from any machine identifier in the machine identifier set;
[0029] A storage unit, used for storing the target identifier into the machine identifier set;
[0030] A second acquisition unit, configured to acquire a current timestamp when the target POD instance needs to generate an identification code;
[0031] The second generating unit is used to generate a distributed ID according to the current timestamp and the target identifier.
[0032] Optionally, the first generating unit is specifically used for:
[0033] Acquire a machine identification deletion set related to the machine identification set, wherein the machine identification deletion set stores machine identifications that are most recently deleted from the machine identification set;
[0034] Obtain any machine identifier from the machine identifier deletion set as the target identifier of the target POD instance.
[0035] Optionally, the k8s distributed system further includes a first deletion unit, and the first deletion unit is used to:
[0036] The machine identifier is deleted and the machine identifier in the deletion set that is consistent with the target identifier is deleted.
[0037] Optionally, the first generating unit is specifically used for:
[0038] Get the value range of the machine ID;
[0039] Generate a target range according to the value range and the machine identification set, wherein the target range and the machine identification set constitute the value range;
[0040] A value is randomly obtained from the target range as the target identifier of the target POD instance.
[0041] Optionally, the k8s distributed system further includes an updating unit, and the updating unit is used to:
[0042] The last active time of each machine identification in the machine identification set is updated.
[0043] Optionally, the k8s distributed system further includes a judgment unit, and the judgment unit is used to:
[0044] Determining whether there is an invalid identification in the set of machine identifications according to the last active time of each machine identification;
[0045] If so, the invalidation mark is deleted.
[0046] Optionally, the k8s distributed system further includes a second deletion unit, wherein the second deletion unit is used to:
[0047] When the target POD instance is closed, the target identifier in the machine identifier set is deleted.
[0048] A third aspect of an embodiment of the present application provides a k8s distributed system, including multiple nodes, each of which includes:
[0049] Processor, memory, input-output unit, and bus;
[0050] The processor is connected to the memory, the input and output unit, and the bus;
[0051] A program is stored in the memory, and the processor calls the program to execute the method in the first aspect and any possible implementation manner of the first aspect.
[0052] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the computer executes the method in the first aspect and any possible implementation of the first aspect.
[0053] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0054] In the method provided in the embodiment of the present application, an occupied machine identifier is stored in a machine identifier set. When a target POD instance needs to be started and a machine identifier needs to be allocated, the machine identifier set is accessed to generate an unoccupied target identifier, thereby ensuring the uniqueness of the target identifier. A distributed ID is generated using a unique target identifier, which helps to avoid ID conflicts in the generated distributed IDs. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flow chart of an embodiment of a distributed ID generation method based on a k8s environment in an embodiment of the present application;
[0056] Figure 2 A flowchart of an embodiment of generating a target identifier of a target POD instance in an embodiment of the present application;
[0057] Figure 3 A flowchart of another embodiment of generating a target identifier of a target POD instance in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of a flow chart of an embodiment of determining whether there is an invalidation mark in an embodiment of the present application;
[0059] Figure 5 This is a structural diagram of an embodiment of the k8s distributed system in the embodiment of the present application;
[0060] Figure 6 This is a structural diagram of an embodiment of a node in a k8s distributed system in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The embodiments of the present application provide a distributed ID generation method and a k8s distributed system based on a k8s environment, which can allocate a unique machine identifier when the POD is expanded, thereby avoiding the problem of ID conflict in the generated distributed ID.
[0062] The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0063] See also Figure 1 In the embodiment of the present application, an embodiment of a distributed ID generation method based on a k8s environment includes:
[0064] 101. When the target POD instance is started, a machine ID set is obtained from the database, and any two machine IDs in the machine ID set are different;
[0065] Kubernetes (often referred to as k8s) is an open source, extensible container orchestration platform designed to simplify the deployment, expansion and management of containerized applications. It provides a highly flexible and powerful toolset for automating the deployment, scheduling and management of containers in distributed systems. The core concept of k8s is a container-based microservice architecture, which provides developers and operation and maintenance teams with a unified orchestration and management interface by abstracting the details of the underlying infrastructure (such as computing, storage and networking). k8s supports multiple deployment modes, including public cloud, private cloud and hybrid cloud environments, and provides rich features such as automatic expansion, service discovery, load balancing, rolling updates and fault recovery. With k8s, users can easily build and run reliable, efficient, elastic and scalable distributed systems, thereby accelerating the application delivery cycle and achieving higher efficiency and reliability.
[0066] In an embodiment of the present application, when the target POD instance is started, for example, when the POD instance is expanded, the k8s distributed system needs to assign a machine ID to the target POD instance. In the k8s distributed system, each POD instance has an exclusive machine ID, and the machine IDs are different from each other. The first step in assigning a machine ID to the target POD instance is to establish a connection with the database, and then access the database to obtain a machine ID set. In an embodiment of the present application, when the k8s distributed system is started, a connection with the database will be established, and then a machine ID set will be established in the database. Each time a POD instance is deployed, a machine ID is assigned to the deployed POD instance, and the machine ID is stored in the machine ID set. The machine ID is unique. As long as the POD instance remains active in the k8s distributed system, the machine ID corresponding to the POD instance remains bound to the POD instance. In the embodiment of the present application, the connection between the k8s distributed system and the database can be a long connection, that is, once the k8s distributed system is started and connected to the database, it will remain connected until the k8s distributed system is shut down and the connection with the database is disconnected; it can also be a short connection, when the k8s distributed system needs to access the database, a temporary connection is established (for example, when the target POD instance is started and the machine identification set in the database needs to be accessed), and the connection is disconnected after the access is completed. In practical applications, the choice of long connection or short connection depends on specific needs and scenarios. Long connection is suitable for scenarios that require frequent communication and maintain a connection state, which can reduce the overhead of connection establishment and closing and improve communication efficiency; and short connection is suitable for temporary communication and fast request response scenarios, which can avoid occupying server resources for a long time. In the embodiment of the present application, the connection method between the k8s distributed system and the database is not limited.
[0067] 102. Generate a target identifier of the target POD instance according to the machine identifier set, where the target identifier is different from any machine identifier in the machine identifier set;
[0068] After obtaining the machine ID set in the k8s distributed system, the target ID of the target POD instance can be generated by using the information of the machine ID set in a variety of ways. While the target POD instance remains active, the target ID is always bound to the target POD instance. Regardless of which method is used, the generated target ID is different from any machine ID in the machine ID set.
[0069] 103. Store the target ID into the machine ID set;
[0070] After generating the target identifier, the k8s distributed system can store the target identifier in the machine identifier set. When the k8s distributed system stores the target identifier in the machine identifier, it means that the target identifier is occupied. When the k8s distributed system deploys subsequent POD instances, it can determine that the target identifier is occupied by querying the machine identifier set. It is necessary to generate a machine identifier for the subsequent POD instance that is different from each machine identifier in the machine identifier set, thus ensuring the uniqueness of the target identifier.
[0071] 104. When the target POD instance needs to generate an identification code, obtain the current timestamp;
[0072] When the target POD instance needs to generate an identification code, the k8s distributed system first obtains the current timestamp.
[0073] 105. Generate a distributed ID according to the current timestamp and the target identifier.
[0074] After the k8s distributed system obtains the current timestamp, it can generate a distributed ID using the current timestamp and the target identifier, for example, by combining the current timestamp and the target identifier according to the snowflake algorithm. In a possible embodiment, the k8s distributed system combines the current timestamp, the target identifier and the serial number to obtain a distributed ID.
[0075] Furthermore, when the target POD instance is closed, the k8s distributed system can delete the target identifier from the machine identifier set, so that the target identifier can be reused while maintaining its uniqueness, which facilitates the expansion and reduction of the POD instance.
[0076] In this embodiment, when the target POD instance is started, the k8s distributed system first obtains the machine identification set from the database, and then uses the machine identification set to generate a target identification corresponding to the target POD instance, and stores the target identification in the machine identification set. This ensures the uniqueness of the target identification. When the target POD instance needs to generate an identification code later, the distributed ID generated by the k8s distributed system is generated using the current timestamp and the target identification, so that the problem of ID conflict in the distributed ID can be avoided.
[0077] In the embodiment of the present application, generating the target identifier of the target POD instance may include multiple methods, which will be described below respectively.
[0078] See also Figure 2 According to some embodiments of the present application, in the first method of generating a target identifier of a target POD instance, step 102 of generating a target identifier of a target POD instance according to a machine identifier set may include the following steps 201 to 203:
[0079] 201. Obtain a machine identification deletion set related to the machine identification set, wherein the machine identification deletion set stores machine identifications that are most recently deleted from the machine identification set;
[0080] In actual applications, if a POD instance is shut down normally or abnormally, the k8s distributed system can recycle the machine ID, specifically deleting the machine ID in the machine ID set corresponding to the POD instance that is shut down normally or abnormally, and storing the deleted machine ID in the machine ID deletion set. When the k8s distributed system generates the target ID of the target POD instance, it can obtain the machine ID deletion set.
[0081] 202. Obtain any machine ID from the machine ID deletion set as the target ID of the target POD instance;
[0082] After obtaining the machine ID deletion set, the k8s distributed system can obtain any machine ID from the machine ID deletion set and use the machine ID as the target ID of the target POD instance.
[0083] 203. Delete the machine ID and delete the machine ID in the collection that is consistent with the target ID.
[0084] After assigning the target identifier to the target POD instance, the k8s distributed system can delete the machine identifier corresponding to the target identifier in the machine identifier deletion set, so that the machine identifier set and the machine identifier in the machine identifier deletion set remain unique, which is convenient for assigning machine identifiers to newly added POD instances next time.
[0085] In this embodiment, when assigning an identifier to a target POD instance, a machine identifier can be directly obtained from the machine identifier deletion set as the target identifier of the target POD instance. There is no need to traverse the machine identifier set. The speed of generating the target identifier is very fast, which is conducive to improving efficiency.
[0086] See also Figure 3 According to some embodiments of the present application, in the second method of generating a target identifier of a target POD instance, step 102 of generating a target identifier of a target POD instance according to a machine identifier set may include the following steps 301 to 303:
[0087] 301. Obtain the value range of the machine identifier;
[0088] 302. Generate a target range according to the value range and the machine identification set, wherein the target range and the machine identification set constitute the value range;
[0089] 303. Randomly obtain a value from the target range as the target identifier of the target POD instance.
[0090] In the second method of generating the target identifier of the target POD instance, the k8s distributed system can first obtain the value range of the machine identifier, then delete the part that overlaps with the machine identifier set from the value range to obtain the target range, and then randomly obtain a value from the target range as the target identifier of the target POD instance. The advantage of this method is that it does not require additional storage space to store the recently deleted machine identifier, which can save storage resources.
[0091] See also Figure 4 According to some embodiments of the present application, the distributed ID generation method based on the k8s environment in the embodiment of the present application may further include the following steps 401 to 403:
[0092] 401. Update the last active time of each machine ID in the machine ID set;
[0093] After the POD instance is closed normally, the k8s distributed system can determine that the POD instance is closed and recycle the machine ID corresponding to the POD instance. However, in some abnormal cases, the POD instance is not closed normally, such as node crashes, hacker attacks, etc. In abnormal cases, the POD instance has been closed but the k8s distributed system cannot know it. At this time, the k8s distributed system cannot perform normal machine ID recovery operations, so additional means are required to perform machine ID recovery operations.
[0094] The k8s distributed system can pre-set the time interval for updating the last active time, and update the last active time of each machine identifier in the machine identifier set every time interval, or update the last active time of each machine identifier in the machine identifier set immediately after receiving the update instruction.
[0095] 402. Determine whether there is an invalid identifier in the machine identifier set according to the last active time of each machine identifier; if so, execute step 403;
[0096] After each update of the last active time of each machine ID in the machine ID set, the k8s distributed system can determine whether there is an invalid ID, specifically by obtaining the current timestamp, and then calculating the time difference between the current timestamp and the last active time of each machine ID. For these time differences, if the time difference is greater than the threshold, it is determined that there is an invalid ID, and then step 403 is executed.
[0097] 403. Delete the invalid flag.
[0098] If there is an invalid identifier, the k8s distributed system can delete it from the machine identifier set.
[0099] In this embodiment, the last active time of the machine identifier is updated, and then it is determined whether there is an invalid identifier based on the last active time, so that the machine identifier corresponding to the POD instance closed under abnormal circumstances can be recovered.
[0100] See also Figure 5 In the embodiment of the present application, an embodiment of the k8s distributed system includes:
[0101] The first acquisition unit 501 is used to acquire a machine identification set from a database when the target POD instance is started, where any two machine identifications in the machine identification set are different;
[0102] A first generating unit 502 is used to generate a target identifier of a target POD instance according to the machine identifier set, wherein the target identifier is different from any machine identifier in the machine identifier set;
[0103] The storage unit 503 is used to store the target identifier into the machine identifier set;
[0104] The second acquisition unit 504 is used to acquire the current timestamp when the target POD instance needs to generate an identification code;
[0105] The second generating unit 505 is used to generate a distributed ID according to the current timestamp and the target identifier.
[0106] In this embodiment, when the target POD instance is started, the first acquisition unit 501 first obtains the machine identification set from the database, and then the first generation unit 502 uses the machine identification set to generate a target identification corresponding to the target POD instance, and the storage unit 503 stores the target identification in the machine identification set, thereby ensuring the uniqueness of the target identification. When the target POD instance needs to generate an identification code subsequently, the distributed ID generated by the second generation unit 505 is generated using the current timestamp and the target identification, so that the problem of ID conflict in the distributed ID can be avoided.
[0107] Optionally, the first generating unit 502 may be specifically configured to:
[0108] Acquire a machine identification deletion set related to the machine identification set, wherein the machine identification deletion set stores the machine identifications most recently deleted from the machine identification set;
[0109] Get any machine ID from the machine ID deletion set as the target ID of the target POD instance.
[0110] Optionally, the k8s distributed system may further include a first deletion unit, and the first deletion unit is used to:
[0111] Delete machine ID Delete the machine ID in the collection that matches the target ID.
[0112] Optionally, the first generating unit 502 may be specifically configured to:
[0113] Get the value range of the machine ID;
[0114] Generate a target range according to the value range and the machine identification set, and the target range and the machine identification set constitute the value range;
[0115] Get a random value from the target range as the target identifier of the target POD instance.
[0116] Optionally, the k8s distributed system may further include an update unit, which is used to:
[0117] Updates the last active time of each machine ID in the machine ID collection.
[0118] Optionally, the k8s distributed system may further include a judgment unit, which is used to:
[0119] Determine whether there is an invalid identification in the machine identification set according to the last active time of each machine identification;
[0120] If so, delete the invalid flag.
[0121] Optionally, the k8s distributed system may further include a second deletion unit, and the second deletion unit is used to:
[0122] When the target pod instance is shut down, the target ID in the machine ID collection is deleted.
[0123] In this embodiment, the functions of each unit are the same as those in the previous embodiment. Figures 1 to 4 The steps in the illustrated embodiments correspond to each other and will not be described again here.
[0124] See also Figure 6 In the embodiment of the present application, the k8s distributed system is composed of multiple nodes. An embodiment of a node in the k8s distributed system in the embodiment of the present application includes:
[0125] Processor 601, memory 602, input and output unit 603 and bus 604;
[0126] The processor 601 is connected to the memory 602, the input and output unit 603 and the bus 604;
[0127] The memory 602 stores a program, and the processor 601 calls the program to execute Figures 1 to 4 Steps in the illustrated embodiment.
[0128] In this embodiment, the function of the processor 601 is the same as that of the aforementioned Figures 1 to 4 The steps in the illustrated embodiments correspond to each other and will not be described again here.
[0129] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0130] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0133] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A distributed ID generation method based on k8s environment, applied to k8s distributed system, characterized in that: include: When the target POD instance is started, a machine identification set is obtained from the database, where any two machine identifications in the machine identification set are different; Generate a target identifier of the target POD instance according to the machine identifier set, wherein the target identifier is different from any machine identifier in the machine identifier set; Storing the target identifier in the machine identifier set; When the target POD instance needs to generate an identification code, obtain the current timestamp; A distributed ID is generated according to the current timestamp and the target identifier.
2. The method according to claim 1, characterized in that Generating the target identifier of the target POD instance according to the machine identifier set includes: Acquire a machine identification deletion set related to the machine identification set, wherein the machine identification deletion set stores machine identifications that are most recently deleted from the machine identification set; Obtain any machine identifier from the machine identifier deletion set as the target identifier of the target POD instance.
3. The method according to claim 2, characterized in that After obtaining any one machine identifier from the machine identifier deletion set as the target identifier of the target POD instance, the method further includes: The machine identifier is deleted and the machine identifier in the deletion set that is consistent with the target identifier is deleted.
4. The method according to claim 1, characterized in that Generating the target identifier of the target POD instance according to the machine identifier set includes: Get the value range of the machine ID; Generate a target range according to the value range and the machine identification set, wherein the target range and the machine identification set constitute the value range; A value is randomly obtained from the target range as the target identifier of the target POD instance.
5. The method according to any one of claims 1 to 4, characterized in that After generating the distributed ID according to the current timestamp and the target identifier, the method further includes: The last active time of each machine identification in the machine identification set is updated.
6. The method according to claim 5, characterized in that After updating the active time of each machine identification in the machine identification set, the method further includes: Determining whether there is an invalid identification in the set of machine identifications according to the last active time of each machine identification; If so, the invalidation mark is deleted.
7. The method according to any one of claims 1 to 4, characterized in that After storing the target identifier in the machine identifier set, the method further includes: When the target POD instance is closed, the target identifier in the machine identifier set is deleted.
8. A k8s distributed system, characterized in that: include: A first acquisition unit is used to acquire a machine identification set from a database when a target POD instance is started, wherein any two machine identifications in the machine identification set are different; A first generating unit, configured to generate a target identifier of the target POD instance according to the machine identifier set, wherein the target identifier is different from any machine identifier in the machine identifier set; A storage unit, used for storing the target identifier into the machine identifier set; A second acquisition unit, configured to acquire a current timestamp when the target POD instance needs to generate an identification code; The second generating unit is used to generate a distributed ID according to the current timestamp and the target identifier.
9. A k8s distributed system, characterized in that: Includes multiple nodes, each node includes: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; A program is stored in the memory, and the processor calls the program to execute the method according to any one of claims 1 to 7. 10 . A computer-readable storage medium having a program stored thereon, wherein when the program is executed on a computer, the computer is caused to execute the method according to claim 1 .
