System and method for generating identification
By deploying the identification generation interface module and the global identification management module in a remote multi-center, using virtual nodes to generate identification and transferring virtual nodes when the center is down, the problems of low identification generation performance and weak disaster recovery capabilities in a remote multi-center deployment are solved. , realizes efficient and orderly identification generation and disaster recovery capabilities.
Patent Information
- Application Number
- CN201911227750.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-04
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2039-12-04
AI Technical Summary
Among Internet companies deployed in multiple centers in remote locations, the existing technology results in low identification generation performance and weak disaster recovery capabilities. Requests from non-centered centers become slower due to cross-regional networks, and the identification generation service is immediately unavailable when the service center is down .
Deploy the identification generation interface module and the global identification management module on each center. The target virtual node is determined through the global identification management module. Communication connections are established between each center. The child virtual nodes are trained to generate the target identifier, and the center will be down. The virtual node is transferred to the alternative center.
Improve the efficiency and disaster recovery capabilities of identification generation, ensure the orderliness and consistency of identification generation, and avoid the problem of service unavailability caused by service center downtime.
Smart Images

Figure CN112905384B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a system and method for generating a mark. Background Art
[0002] With the diversification of business and the rapid increase in the number of users, Internet companies meet the demand by adding machines in a single distributed system cluster, but this will reach a bottleneck, and the computer room and network capacity resources in a single city are limited, so multi-center deployment in different locations has become a necessary path for development. However, under the multi-center in different locations, due to the physical law of the speed of light, network latency becomes an unsolvable problem, so it is important to keep the identifiers generated by each center non-conflicting and orderly.
[0003] Currently, in the method of generating identifiers based on multiple centers in different locations, one center will be selected as the service center for generating identifiers. All centers will generate identifiers through this service center. If the service center fails, a new center will be selected as the service center for generating identifiers.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: First, the performance is low. Since each center needs to request an identifier from the selected service center, this will cause requests from non-centers to be slowed down due to crossing remote networks; Second, the disaster recovery capability is weak. Since all identifiers are generated in one center, when this center goes down or loses connection with other centers due to network reasons, the identifier generation service will immediately become unavailable. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a system and method for generating an identifier, which can improve the efficiency of identifier generation and enhance the disaster recovery capability of the identifier generation system.
[0006] To achieve the above objective, according to a first aspect of an embodiment of the present invention, a system for generating an identification is provided.
[0007] A system for generating an identifier according to an embodiment of the present invention comprises: a plurality of centers, each of which is equipped with an identifier generation interface module and a global identifier management module; the identifier generation interface module is used to obtain a target key value corresponding to an identifier generation request, send the target key value to the global identifier management module, and then receive a target virtual node determined according to the key value sent by the global identifier management module, and generate a target identifier using the target virtual node; the global identifier management module is used to receive the target key value sent by the identifier generation interface module, determine the target virtual node according to the target key value, and send the target virtual node to the identifier generation interface module.
[0008] Optionally, the global identification management module is further used to: poll the sub-virtual nodes corresponding to the target key value, and determine the target virtual node from the polled sub-virtual nodes.
[0009] Optionally, the system includes: a control center; the control center is used to register the target key value, configure the total virtual node corresponding to the target key value, and then allocate the total virtual node corresponding to the target key value to each center according to the center attribute information of each center, so that each center obtains the sub-virtual node corresponding to the target key value.
[0010] Optionally, the control center is further used to: after receiving the center downtime instruction, directly map the sub-virtual node corresponding to the target key value assigned to the downed center to the alternative center corresponding to the downed center.
[0011] Optionally, a communication connection is established between the global identification management modules deployed on every two centers; the global identification management module is also used to: after receiving a center downtime instruction, transfer the sub-virtual node corresponding to the target key value assigned to the downed center to the alternative center corresponding to the downed center through the established communication connection between the global identification management modules.
[0012] Optionally, the control center is further used to: configure the number of total virtual nodes corresponding to the target key value, and configure the initial value and step size of each virtual node in the total virtual nodes.
[0013] Optionally, a central management module is deployed on each of the centers, and a communication connection is established between the central management modules deployed on every two centers; the central management module is used to obtain the central business information of each center, and to broadcast heartbeats periodically through the established communication connection between the central management modules, to determine the central health information of each center, and to push the central business information and central health information of each center to the management and control center.
[0014] Optionally, the center management module is also used to maintain the center list of the system; and the control center is also used to, after receiving a center online request, send the online request to the center management module; the center management module is also used to receive the online request and add the center to be online to the center list of the system; and the control center is also used to, after receiving a center offline request, send the offline request to the center management module; the center management module is also used to receive the offline request and delete the center to be offline from the center list of the system.
[0015] Optionally, the identifier generation interface module is also used to: receive the target virtual node, determine the initial value of the target virtual node, the step size of the target virtual node and the target order corresponding to the target identifier, and generate the target identifier based on the initial value, the step size and the target order.
[0016] To achieve the above objective, according to a second aspect of an embodiment of the present invention, a method for generating an identification is provided.
[0017] A method for generating an identifier according to an embodiment of the present invention is applied to a system for generating an identifier, the system comprising: multiple centers, each center deploying an identifier generation interface module and a global identifier management module; the method comprising: the identifier generation interface module receiving an identifier generation request, obtaining a target key value corresponding to the request, and sending the target key value to the global identifier management module; the global identifier management module receiving the target key value sent by the identifier generation interface module, determining a target virtual node according to the target key value, and sending the target virtual node to the identifier generation interface module; the identifier generation interface module receiving the target virtual node sent by the global identifier management module, and generating a target identifier using the target virtual node.
[0018] Optionally, the global identification management module determines the target virtual node according to the target key value, including: the global identification management module polls the child virtual nodes corresponding to the target key value, and determines the target virtual node from the polled child virtual nodes.
[0019] Optionally, the system includes: a control center; before the global identification management module polls the sub-virtual nodes corresponding to the target key value, the method also includes: the control center registers the target key value, configures the total virtual node corresponding to the target key value, and then allocates the total virtual node corresponding to the target key value to each center according to the center attribute information of each center, so that each center obtains the sub-virtual node corresponding to the target key value.
[0020] Optionally, the method further includes: after receiving the center downtime instruction, the control center directly maps the sub-virtual node corresponding to the target key value allocated to the downed center to the alternative center corresponding to the downed center.
[0021] Optionally, a communication connection is established between the global identification management modules deployed on every two centers; the method also includes: after receiving the center downtime instruction, the global identification management module transfers the sub-virtual node corresponding to the target key value assigned to the downed center to the alternative center corresponding to the downed center through the established communication connection between the global identification management modules.
[0022] Optionally, the control center configures the total virtual nodes corresponding to the target key value, including: the control center configures the number of total virtual nodes corresponding to the target key value, and configures the initial value and step size of each virtual node in the total virtual nodes.
[0023] Optionally, a central management module is deployed on each center, and a communication connection is established between the central management modules deployed on every two centers; before the control center allocates the total virtual node corresponding to the target key value to each center according to the central attribute information of each center, the method also includes: the central management module obtains the central business information of each center, and broadcasts the heartbeat periodically through the established communication connection between the central management modules, determines the central health information of each center, and pushes the central business information and central health information of each center to the control center.
[0024] Optionally, the method also includes: the center management module maintains the center list of the system; and after receiving the center online request, the control center sends the online request to the center management module; the center management module receives the online request and adds the center to be online to the center list of the system; and after receiving the center offline request, the control center sends the offline request to the center management module; the center management module receives the offline request and deletes the center to be offline from the center list of the system.
[0025] Optionally, the identifier generation interface module uses the target virtual node to generate a target identifier, including: the identifier generation interface module receives the target virtual node, determines the initial value of the target virtual node, the step size of the target virtual node and the target sequence corresponding to the target identifier, and generates the target identifier based on the initial value, the step size and the target sequence.
[0026] An embodiment of the above invention has the following advantages or beneficial effects: each center in the embodiment of the present invention can utilize the identification generation interface module and the global identification management module deployed on the center to generate a target identification, which can solve the technical problem in the prior art that the identification generation service can only be requested from the selected service center, thereby improving the efficiency of identification generation and enhancing the disaster recovery capability of the identification generation system.
[0027] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0029] Figure 1 is a schematic diagram of modules of a system for generating identification according to an embodiment of the present invention;
[0030] Figure 2 is a schematic diagram of main steps of a method for generating a logo according to an embodiment of the present invention;
[0031] Figure 3 is a schematic diagram of the overall structure of a system for generating identification according to an embodiment of the present invention;
[0032] Figure 4 is a schematic diagram of a method for allocating virtual nodes by a control center according to an embodiment of the present invention;
[0033] Figure 5 is a schematic diagram of steps for adding a new center according to an embodiment of the present invention;
[0034] Figure 6 is a schematic diagram of the steps of removing the center according to an embodiment of the present invention;
[0035] Figure 7 It is a schematic diagram of transferring virtual nodes when a center fails according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0037] Considering that multi-center deployment in different locations is the inevitable path for the development of Internet companies, but in multi-center deployment in different locations, due to the physical law of the speed of light, network latency becomes an unsolvable problem. Therefore, in multi-center deployment in different locations, the previous simple identification generation method is no longer applicable. How to keep the generated identifications non-conflicting and orderly is of great significance. This is because the business is global, and each center in the multi-center deployment in different locations is receiving business. For example, for a certain business, the Beijing center, Shanghai center, and Chengdu center can all handle the business, but the business itself does not distinguish between centers. Therefore, the business itself is global in scope, and the generated identification also requires global consistency. In other words, the business layer itself is unaware of the system deployment in multiple centers. The business layer thinks that it is only one center, so the generated identifications are required to be non-conflicting and consistent and orderly.
[0038] Currently, in the method of generating identifiers based on multiple centers in different locations, one center will be selected as the service center for generating identifiers. All centers will generate identifiers through this service center. If the service center fails, a new center will be selected as the service center for generating identifiers. However, since each center needs to request identifiers from the selected service center, requests from non-centers will be slowed down due to the cross-regional network, resulting in lower performance. At the same time, since all identifiers are generated in one center, when this center fails or loses connection with other centers due to network reasons, the identifier generation service will immediately become unavailable, which has the defect of weak disaster recovery capability.
[0039] In order to solve the problems of low performance and weak disaster recovery capability in current methods of generating identifiers, the present invention provides a system for generating identifiers and a method for generating identifiers applied to the system, which can ensure that the identifiers generated by each center do not conflict with each other and remain monotonous and orderly, and have the characteristics of high efficiency in generating identifiers and strong disaster recovery capability. Figure 1 is a schematic diagram of modules of a system for generating identification according to an embodiment of the present invention, such as Figure 1 As shown, the system for generating identification in the embodiment of the present invention may include: multiple centers, and an identification generation interface module and a global identification management module are deployed in each center.
[0040] Next, in conjunction with the method for generating a mark according to an embodiment of the present invention, Figure 1 The functions of each module in the system for generating identification are shown. Figure 2 FIG. 1 is a schematic diagram of the main steps of a method for generating a logo according to an embodiment of the present invention. Figure 2 As shown, the main steps of the method for generating an identification in the embodiment of the present invention may include steps S201 to S203.
[0041] Step S201: the identifier generation interface module receives the identifier generation request, obtains the target key value corresponding to the request, and sends the target key value to the global identifier management module.
[0042] In the method for generating an identifier in the embodiment of the present invention, the identifier generation interface module deployed on the center can receive an identifier generation request, and then obtain the target key value corresponding to the request, and send the obtained target key value to the global identifier module deployed on the center. Among them, the key value can be an identifier used by the system to distinguish different services. For example, the system includes services W1, W2, and W3. Then, for different services, it is necessary to ensure the orderliness of the identifiers under the services. Therefore, in the embodiment of the present invention, key values can be used to represent different services. For example, after the identifier generation interface module A1 deployed on the center A receives the identifier generation request, it can obtain the service corresponding to the request, and then obtain the target key value K1 of the service, that is, obtain the target key value K1 corresponding to the request, and then send the target key value K1 to the global identifier management module A2 deployed on the center A.
[0043] Step S202: the global identifier management module receives the target key value sent by the identifier generation interface module, determines the target virtual node according to the target key value, and sends the target virtual node to the identifier generation interface module.
[0044] After receiving the target key value sent by the identifier generation interface module, the global identifier management module can determine the target virtual node according to the target key value, and send the target virtual node to the identifier generation interface module. Among them, the virtual node in the embodiment of the present invention is used to generate an identifier, and the target virtual node is used to generate a target identifier corresponding to the request, so after the global identifier management module determines the target virtual node, it sends the target virtual node to the identifier generation interface module. Assume that the global identifier management module A2 deployed on the center A determines the target virtual node S1 according to the target key value K1 sent by the identifier generation interface module A1, and then sends D1 to the identifier generation interface module A1.
[0045] Step S203: the identifier generation interface module receives the target virtual node sent by the global identifier management module, and generates a target identifier using the target virtual node.
[0046] The identifier generation interface module can directly use the target virtual node sent by the global identifier management module to generate a target identifier corresponding to the request.
[0047] Each center in the embodiment of the present invention can utilize the identification generation interface module and the global identification management module deployed on the center to generate a target identification, which can solve the technical problem in the prior art that identification generation services can only be requested from the selected service center, thereby improving the efficiency of identification generation and enhancing the disaster recovery capability of the identification generation system.
[0048] For ease of understanding, the following Figure 3The overall structural diagram of the system for generating identification according to the embodiment of the present invention is described in detail. Figure 3 Schematic diagram of the overall structure of the system for generating identification according to an embodiment of the present invention. Figure 3 In the example, the system for generating identification includes three centers, and the identification generation interface module, the global identification management module and the center management module are deployed in each center. Figure 3 It can also be seen that the system for generating identification in the embodiment of the present invention may further include: a control center. The control center may be a center including only a control module, or a center including a control module, an identification generation interface module, a global identification management module, and a center management module.
[0049] It can be seen from the above steps S201 to S203 that the global identification management module determines the target virtual node according to the target key value, which is an important part of the method for generating the identification. As a parameterizable embodiment, the global identification management module determines the target virtual node, which may include: the global identification management module rotates the sub-virtual nodes corresponding to the target key value, and determines the target virtual node from the rotated sub-virtual nodes. In the embodiment of the present invention, the number of sub-virtual nodes corresponding to the target key value is at least one, so in order to ensure the orderliness of the identification, the sub-virtual nodes are looped to obtain the target virtual node. For example, there are sub-virtual nodes S1, S3 and S6, then the target virtual node can be determined in turn in the order from S1 to S3 and then to S6.
[0050] Since in the embodiment of the present invention, multiple centers can generate identifiers based on the key value of the same business, in order to ensure that the identifiers generated by different centers can be orderly and non-conflicting, the concept of virtual nodes is introduced, and then the virtual nodes are used to generate the identifier of the business. In order to distinguish different businesses, according to the key values of different businesses, a total virtual node corresponding to the key value is generated. Considering that different centers can generate the identifier of the business, in order to ensure that the identifiers do not conflict, in the embodiment of the present invention, the total virtual node corresponding to the key value is allocated to different centers, so that different centers can obtain the sub-virtual node corresponding to the key value, and then different centers can use the obtained sub-virtual node to generate identifiers.
[0051] Therefore, in the method for generating a mark in the embodiment of the present invention, Figure 3 The control center shown can register the target key value, configure the total virtual node corresponding to the target key value, and then allocate the total virtual node corresponding to the target key value to each center according to the center attribute information of each center, so that each center obtains the child virtual node corresponding to the target key value. Among them, the total virtual node refers to all virtual nodes corresponding to the key value, and the child virtual node of a center refers to the virtual node corresponding to the key value managed by the center, that is, the virtual node corresponding to the key value allocated to the center by the control center.
[0052] In this way, the global identification management module determines the target virtual node in detail as follows: the global identification management module polls the sub-virtual nodes corresponding to the target key value, and determines the target virtual node from the polled sub-virtual nodes. In other words, the global identification management module polls the sub-virtual nodes corresponding to the target key value managed by the global identification management module, and determines the target virtual node from these sub-virtual nodes.
[0053] Assume that the system for generating identification in an embodiment of the present invention includes centers A, B, C, and a management and control center D. For business W1, the management and control center D can generate corresponding total virtual nodes S1 to S10 according to the key value of the business W1, and then allocate these 10 virtual nodes to centers A, B, and C. The allocation rule is that the sub-virtual nodes obtained by center A are S1, S3 and S4, the sub-virtual nodes obtained by center B are S5 to S8, and the sub-virtual nodes obtained by center C are S2, S9 and S10. In this way, when center A receives the identification generation request corresponding to the business, it will poll the sub-virtual nodes S1, S3 and S4 managed by A, and then train the sub-virtual nodes S1, S3 and S4 in rotation to obtain the target virtual node.
[0054] As another reference embodiment of the present invention, in the method for generating an identifier in the embodiment of the present invention, the identifier generation interface module uses the target virtual node to generate a target identifier, which may include: the identifier generation interface module receives the target virtual node, determines the initial value of the target virtual node, the step size of the target virtual node and the target order corresponding to the target identifier, and generates the target identifier based on the initial value, the step size and the target order.
[0055] Therefore, the total virtual nodes corresponding to the target key value configured by the control center include: the total number of virtual nodes corresponding to the target key value configured by the control center, and the initial value and step size of each virtual node in the total virtual nodes. The control center allocates N virtual nodes to the business through the key value registered by the business, and allocates an initial value 1 to N to these N virtual nodes in turn, with the step size of each increase being N. In this way, the identifier generated by each virtual node can be expressed as: identifier = initial value + i*N, where i = 0, 1, 2, 3...N is the order. It should be noted that in the embodiment of the present invention, in order to ensure the order of the identifiers, the step size N is equal to the number of virtual nodes. After the control center configures the total virtual nodes corresponding to the key value, the total virtual nodes are allocated to different centers.
[0056] Figure 4 Schematic diagram of a method for allocating virtual nodes by a control center according to an embodiment of the present invention. Figure 4 It can be seen that from Figure 4It can be seen that the total virtual nodes allocated by the control center are 1 to N, and the identifiers generated by the configured virtual node 1 are: 1, 1+1N, 1+2N...; the identifiers generated by virtual node 2 are: 2, 2+1N, 2+2N...; the identifiers generated by virtual node 3 are: 3, 3+1N, 3+2N..., and so on. The control center configures the number of total virtual nodes corresponding to the target key value, configures the initial value and step size of each virtual node in the total virtual node, and then allocates the total virtual node to each center, so that the global identification management module deployed on each center can manage the sub-virtual nodes allocated to the center, and also obtains the initial value and step size of each virtual node in the sub-virtual node. Therefore, after the global identification management module sends the target virtual node to the identification generation interface module, the identification generation interface module can determine the initial value of the target virtual node and the step size of the target virtual node. The target order corresponding to the target identification is determined by the identification generation interface module. The identification generation interface module can generate the target identification using the obtained initial value, step size and target order. For example, the identifier generation interface module may determine that the initial value of the target virtual node is 3 and the step length of the target virtual node is 10, and the target sequence corresponding to the target identifier is 2, then the generated target identifier may be: 3+2*10=23.
[0057] From the above, it can be seen that in the method for generating an identifier in the embodiment of the present invention, the control center can allocate the total virtual node corresponding to the target key value to each center according to the center attribute information of each center. Therefore, the control center needs to obtain the center attribute information of each center. Figure 3 As shown, in the embodiment of the present invention, a center management module is also deployed on each center, through which the center attribute information of the center can be obtained. Figure 3 It can also be seen that a communication connection is established between the central management modules deployed on every two centers. Therefore, as another reference embodiment, before the control center allocates the total virtual node corresponding to the target key value to each center according to the central attribute information of each center, the method for generating an identifier may also include: the central management module obtains the central business information of each center, and broadcasts the heartbeat regularly through the communication connection between the established central management modules, determines the central health information of each center, and pushes the central business information and central health information of each center to the control center.
[0058] Among them, the center business information indicates the business volume information that the center can carry. The control center can determine the number of virtual nodes allocated to each center based on the center business information of each center. For example, if center A is busy, it means that center A has a large demand for identification, so the control center allocates more virtual nodes to center A. If center B is not busy, it means that center B has a small demand for identification, so the control center allocates fewer virtual nodes to center B. The center health information indicates the survival status of the center. The center management module of a center can broadcast heartbeats to other centers regularly through the communication connection between the established center management modules, and judge the survival status of the center based on the heartbeat situation. The center management module will push the center business information to the control center, so that the control center can determine the number of virtual nodes that need to be allocated to each center. The center management module will also push the center health information to the control center, so that the control center can determine which centers are online and which centers are offline.
[0059] In addition, in the embodiment of the present invention, the center management module deployed on each center can also maintain the center list of the system. The method for generating the identification can also include: after receiving the center online request, the control center sends the online request to the center management module; the center management module receives the online request and adds the center to be online to the center list of the system. Figure 5 FIG. 1 is a schematic diagram of steps for adding a new center according to an embodiment of the present invention. Figure 5 As shown, after the control center receives the center online request, that is, the request to add a new center, the online request is sent to the center management module deployed on each center, that is, the control center notifies the center management module deployed on each center that a new center needs to be added. Then, after receiving the online request, the center management module adds the center to be online to the center list of the system, and needs to add heartbeat monitoring for the new center.
[0060] In addition, the method for generating an identification in an embodiment of the present invention may also include: after receiving the center offline request, the control center sends the offline request to the center management module; the center management module receives the offline request and deletes the center to be offline from the center list of the system. Figure 6 Schematic diagram of the steps of removing the center according to an embodiment of the present invention. Figure 6 As shown, after the control center receives the center offline request, that is, the request to delete the center, the offline request is sent to the center management module deployed on each center, that is, the control center notifies the center management module deployed on each center that the center to be offline needs to be deleted. Then, after receiving the offline request, the center management module deletes the center to be offline from the center list of the system and deletes the heartbeat monitoring of the center to be offline.
[0061] In an embodiment of the present invention, the method for generating an identifier may further include: after receiving a center downtime instruction, the control center directly maps the sub-virtual node corresponding to the target key value assigned to the downtime center to the alternative center corresponding to the downtime center.
[0062] In the system for generating identification of the embodiment of the present invention, the control center can configure the total virtual node corresponding to the target key value according to the target key value, and then distribute the total virtual node to each center according to the central business information and central health information of each center, so that each center can obtain the sub-virtual node corresponding to the target key value, and then determine the target virtual node from the sub-virtual nodes, and finally generate the target identification using the target virtual node. It can be seen that the system of the embodiment of the present invention allocates virtual nodes to different centers through the control center, so in the case of a center outage, the control center can map the sub-virtual nodes on the center that has gone down to the alternative center corresponding to the downed center. Among them, the alternative center can be determined based on the center's business information.
[0063] from Figure 3 It can also be seen that a communication connection is established between the global identification management modules deployed on every two centers. Therefore, the method for generating an identification may also include: after receiving a center downtime instruction, the global identification management module transfers the sub-virtual node corresponding to the target key value assigned to the downed center to the alternative center corresponding to the downed center through the established communication connection between the global identification management modules. In the embodiment of the present invention, since the global identification management modules deployed on each center are interconnected, after a center receives a center downtime instruction, the global management module of the center can transfer the sub-virtual node corresponding to the target key value assigned to the downed center to the alternative center corresponding to the downed center through the established communication connection between the global identification management modules.
[0064] Figure 7 It is a schematic diagram of transferring virtual nodes when a center fails according to an embodiment of the present invention. Figure 7 In the example, there are centers A, B, and C. The virtual nodes assigned to center A are 1, 6, and 11, the virtual nodes assigned to center B are 2, 3, 5, and 10, and the virtual nodes assigned to center C are 4, 7, 8, and 9. When center C is down, the control center can directly map virtual nodes 4 and 7 assigned to center C to center A, and map virtual nodes 8 and 9 assigned to center C to center B. Alternatively, center A detects that center C is down, and then can transfer virtual nodes 4 and 7 assigned to center C to center A, and virtual nodes 8 and 9 assigned to center C to center B through the communication connection between centers A, B, and C.
[0065] The technical solution for generating an identifier in an embodiment of the present invention can utilize the identifier generation interface module and the global identifier management module deployed on the center to generate a target identifier, which can solve the technical problem in the prior art that the identifier generation service can only be requested from a selected service center, thereby improving the efficiency of identifier generation and enhancing the disaster recovery capability of the identifier generation system.
[0066] Combined with the above description, Figure 3 The overall structural diagram of the system for generating identification according to the embodiment of the present invention is shown, and the functions of the various parts of the system for generating identification according to the embodiment of the present invention are summarized as follows.
[0067] A system for generating an identifier according to an embodiment of the present invention comprises: a plurality of centers, each of which is equipped with an identifier generation interface module and a global identifier management module; the identifier generation interface module can be used to obtain a target key value corresponding to an identifier generation request, send the target key value to the global identifier management module, and then receive a target virtual node determined according to the key value sent by the global identifier management module, and generate a target identifier using the target virtual node; the global identifier management module can be used to receive a target key value sent by the identifier generation interface module, determine a target virtual node according to the target key value, and send the target virtual node to the identifier generation interface module.
[0068] In the embodiment of the present invention, the global identification management module may also be used to: train the sub-virtual nodes corresponding to the target key value in rotation, and determine the target virtual node from the trained sub-virtual nodes.
[0069] In an embodiment of the present invention, the control center can be used to register the target key value, configure the total virtual node corresponding to the target key value, and then distribute the total virtual node corresponding to the target key value to each center according to the center attribute information of each center, so that each center obtains the sub-virtual node corresponding to the target key value.
[0070] In the embodiment of the present invention, the control center can also be used to: after receiving the center downtime instruction, directly map the sub-virtual node corresponding to the target key value assigned to the downtime center to the alternative center corresponding to the downtime center.
[0071] In an embodiment of the present invention, a communication connection is established between the global identification management modules deployed on every two centers; the global identification management module is also used to: after receiving a center downtime instruction, transfer the sub-virtual node corresponding to the target key value assigned to the downed center to the alternative center corresponding to the downed center through the established communication connection between the global identification management modules.
[0072] In the embodiment of the present invention, the control center can also be used to: configure the number of total virtual nodes corresponding to the target key value, and configure the initial value and step size of each virtual node in the total virtual nodes.
[0073] In an embodiment of the present invention, a central management module is deployed on each center, and a communication connection is established between the central management modules deployed on every two centers; the central management module can be used to obtain the central business information of each center, and broadcast the heartbeat regularly through the established communication connection between the central management modules, determine the central health information of each center, and push the central business information and central health information of each center to the management and control center.
[0074] In an embodiment of the present invention, the center management module can also be used to: maintain the center list of the system; and the control center can also be used to: after receiving a center online request, send the online request to the center management module; the center management module can also be used to: receive an online request, and add the center to be online to the center list of the system; and the control center can also be used to: after receiving a center offline request, send the offline request to the center management module; the center management module can also be used to: receive an offline request, and delete the center to be offline from the center list of the system.
[0075] In an embodiment of the present invention, the identifier generation interface module can also be used to: receive a target virtual node, determine the initial value of the target virtual node, the step size of the target virtual node and the target order corresponding to the target identifier, and generate a target identifier based on the initial value, step size and target order.
[0076] In the system for generating identifiers in the embodiment of the present invention, each center can utilize the identifier generation interface module and the global identifier management module deployed on the center to generate a target identifier, which can solve the technical problem in the prior art that identifier generation services can only be requested from the selected service center, thereby improving the efficiency of identifier generation and enhancing the disaster recovery capability of the identifier generation system.
[0077] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A system for generating an identification, characterized in that: The system comprises: a plurality of centers, each of which is equipped with an identification generation interface module and a global identification management module; The identifier generation interface module is used to obtain a target key value corresponding to the identifier generation request, send the target key value to the global identifier management module, then receive a target virtual node determined according to the target key value sent by the global identifier management module, and generate a target identifier using the target virtual node; The global identification management module is used to receive the target key value sent by the identification generation interface module, determine the target virtual node according to the target key value, and send the target virtual node to the identification generation interface module.
2. The system according to claim 1, characterized in that The global identification management module is further used to: poll the sub-virtual nodes corresponding to the target key value, and determine the target virtual node from the polled sub-virtual nodes.
3. The system according to claim 2, characterized in that The system comprises: a control center; The control center is used to register the target key value, configure the total virtual node corresponding to the target key value, and then distribute the total virtual node corresponding to the target key value to each center according to the center attribute information of each center, so that each center obtains the sub-virtual node corresponding to the target key value.
4. The system according to claim 3, characterized in that The control center is also used to: after receiving the center downtime instruction, directly map the sub-virtual node corresponding to the target key value assigned to the downtime center to the alternative center corresponding to the downtime center.
5. The system according to claim 3, characterized in that A communication connection is established between the global identification management modules deployed in every two centers; The global identification management module is also used to: after receiving the center downtime instruction, transfer the sub-virtual node corresponding to the target key value assigned to the downtime center to the alternative center corresponding to the downtime center through the established communication connection between the global identification management modules.
6. The system according to claim 3, characterized in that The control center is also used to: configure the number of total virtual nodes corresponding to the target key value, and configure the initial value and step size of each virtual node in the total virtual nodes.
7. The system according to claim 3, characterized in that Deploy a central management module on each center, and establish a communication connection between the central management modules deployed on every two centers; The central management module is used to obtain the central business information of each center, and broadcast the heartbeat regularly through the communication connection established between the central management modules, determine the central health information of each center, and push the central business information and central health information of each center to the management and control center.
8. The system according to claim 7, characterized in that The center management module is also used to: maintain a center list of the system; and The control center is further used to: after receiving the center online request, send the online request to the center management module; The center management module is further used to: receive the online request, and add the center to be online to the center list of the system; and The control center is further used for: after receiving the center offline request, sending the offline request to the center management module; The center management module is also used to: receive the offline request and delete the center to be offline from the center list of the system.
9. The system according to claim 1, characterized in that The identifier generation interface module is also used to: receive the target virtual node, determine the initial value of the target virtual node, the step size of the target virtual node and the target sequence corresponding to the target identifier, and generate the target identifier according to the initial value, the step size and the target sequence.
10. A method for generating an identification, applied to a system for generating an identification, characterized in that: The system comprises: a plurality of centers, each of which is equipped with an identification generation interface module and a global identification management module; The method comprises: The identifier generation interface module receives an identifier generation request, obtains a target key value corresponding to the request, and sends the target key value to the global identifier management module; The global identification management module receives the target key value sent by the identification generation interface module, determines the target virtual node according to the target key value, and sends the target virtual node to the identification generation interface module; The identifier generation interface module receives the target virtual node sent by the global identifier management module, and generates a target identifier using the target virtual node.
Citation Information
Patent Citations
Group service scheduling method and device and base station
CN107071747A
Task scheduling processing method, device, server, client and electronic device
CN109086126A