A method and system for network-based software arbitration of sharing and identification
By assigning globally unique identifiers and setting up working network segments for application systems and nodes, and utilizing the gRPC interface for network arbitration sharing and identification, the problems of high hardware arbitration cost and poor software arbitration compatibility are solved, achieving a low-cost and highly compatible arbitration sharing solution.
Patent Information
- Application Number
- CN202411254565.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-09-09
AI Technical Summary
In existing technologies, hardware arbitration is costly, while software arbitration lacks a defined self-design method and does not consider shared arbitration scenarios, resulting in high costs and poor compatibility.
By assigning globally unique identifiers to each application system and node, setting different working network segments and password information, and using gRPC network interfaces for arbitration sharing and identification, the shared arbitration system processes access requests, thereby achieving network isolation and identification.
It reduces arbitration costs, increases arbitration utilization, is suitable for shared scenarios, has good compatibility, and is easy to embed into applications.
Smart Images

Figure CN119402535B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a network-based software arbitration sharing and identification method and system. BACKGROUND
[0002] In the data multi-live application scenario, arbitration service is generally used to cooperatively process the brain split problem and avoid data damage. The arbitration service of software and hardware integration requires the hardware of servers to be connected, and also requires the relevant arbitration software to be run. The arbitration service realized by software only requires a reliable network interface to be configured, and the relevant arbitration software to be run.
[0003] The current common other technical deficiencies are as follows:
[0004] 1. The arbitration mode based on hardware has high cost, and the server needs to support the corresponding interface;
[0005] 2. The software arbitration is realized by using some open source software, and the method of self-designed arbitration is not defined;
[0006] 3. The sharing arbitration scenario is not considered. SUMMARY
[0007] The present application aims at the deficiencies of the prior art, and provides a network-based software arbitration sharing and identification method and system.
[0008] To achieve the above-mentioned purpose, in a first aspect, the present application provides a network-based software arbitration sharing and identification method, comprising:
[0009] A shared arbitration system is used to respectively allocate a globally unique identifier for each application system and each node thereof, so as to distinguish different application systems through the globally unique identifier of the application system, and distinguish different nodes through the globally unique identifier of the node, wherein the shared arbitration system comprises a plurality of arbitration modules, each arbitration module being used to process an access request of an application system;
[0010] The shared arbitration system is used to set different working network segments for the globally unique identifier of each application system, so as to perform network isolation;
[0011] The shared arbitration system is used to set password information for the globally unique identifier of each application system, and the globally unique identifier, working network segment, address and password information of the shared arbitration system are registered to the corresponding application system, the application system is used to configure an address for a node in the working network segment through network planning, and then the address of each node is registered to the shared arbitration system for storage;
[0012] The node sends an access request to the shared arbitration system based on a network interface, and carries a globally unique identifier of an application system, an address of the node and the password information when sending the access request for the first time, and carries a globally unique identifier of the node, the address and the password information when sending the access request subsequently.
[0013] The shared arbitration system acquires the address, the globally unique identifier and the password information of the node in the access request after receiving the access request, and if the address of the node is in the working network segment of the application system and the password information is consistent with that set in the shared arbitration system, acquires the globally unique identifier of the application system based on the globally unique identifier of the node, and then controls the access to the corresponding arbitration module according to the globally unique identifier of the application system, so as to make the corresponding arbitration module process the access request of the node.
[0014] Further, when generating the globally unique identifier for each application system, a general globally unique identifier is generated for the application system, the general globally unique identifier includes a system part and a node part, the system part is unmodifiable and is used to distinguish different application systems, and then the node part is replaced by the same character; when generating the globally unique identifier for each node, the node part is re-assigned characters on the basis of the globally unique identifier of the application system to distinguish different nodes in the application system.
[0015] Further, the node part is replaced by the character "0".
[0016] Further, the node part is n bits, 1≦n≦12, and the node part is re-assigned a hexadecimal string.
[0017] Further, the network interface uses gRPC as a calling interface.
[0018] In a second aspect, the application provides a network-based software arbitration sharing and identification system, which includes a shared arbitration system and a plurality of application systems, the shared arbitration system includes a plurality of arbitration modules, each arbitration module is used to process an access request of an application system, and each application system includes a plurality of nodes.
[0019] The shared arbitration system is used to allocate a globally unique identifier for each application system and each node thereof respectively, so as to distinguish different application systems through the globally unique identifier of the application system and distinguish different nodes through the globally unique identifier of the node.
[0020] The shared arbitration system is further configured to set different work network segments for the global unique identifier of each application system for network isolation, set password information for the global unique identifier of each application system, and register the global unique identifier of the application system, the work network segment, the address of the shared arbitration system, and the password information to the corresponding application system, wherein the application system configures an address in the work network segment through network planning for a node, and then registers the address of each node to the shared arbitration system for storage.
[0021] The node sends an access request to the shared arbitration system based on a network interface, wherein the access request carries the global unique identifier of the application system, the address of the node, and the password information when the access request is sent for the first time, and the access request carries the global unique identifier of the node, the address of the node, and the password information when the access request is sent subsequently.
[0022] The shared arbitration system obtains the address of the node, the global unique identifier of the node, and the password information in the access request after receiving the access request, and if the address of the node is in the work network segment of the application system and the password information is consistent with the password information set in the shared arbitration system, obtains the global unique identifier of the application system based on the global unique identifier of the node, and then controls access to the corresponding arbitration module according to the global unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node.
[0023] Further, when generating the global unique identifier for each application system, a general global unique identifier is generated for the application system, the general global unique identifier includes a system part and a node part, the system part is not modifiable and is used to distinguish different application systems, and then the node part is replaced by the same character; when generating the global unique identifier for each node, the node part is re-assigned characters based on the global unique identifier of the application system to distinguish different nodes in the application system.
[0024] Further, the node part is replaced by the character "0".
[0025] Further, the node part is n bits, 1≦n≦12, and the node part is re-assigned a 16-bit character string.
[0026] Further, the network interface uses gRPC as a calling interface.
[0027] Beneficial effects: 1. The application is designed for a shared scenario, improves arbitration utilization, and reduces cost.
[0028] 2. The application can be easily embedded in an application, and is more suitable for special scenarios.
[0029] 3. The application is implemented based on gRPC calling, meets different development languages, and has good compatibility. Attached Figure Description
[0030] Figure 1 This is a partial flowchart of a network-based software arbitration sharing and identification method;
[0031] Figure 2 This is a schematic diagram of the structure of the globally unique identifier of a node in an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram of a network-based software arbitration sharing and identification system. Detailed Implementation
[0033] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. These embodiments are implemented based on the technical solutions of the present invention, and it should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.
[0034] This invention provides a network-based method for sharing and identifying software arbitration, including:
[0035] A shared arbitration system is used to assign globally unique identifiers to each application system and its nodes. This distinguishes different application systems by their globally unique identifiers, and different nodes by their globally unique identifiers. The shared arbitration system includes several arbitration modules, each handling access requests from one application system. These globally unique identifiers are UUIDs (Universally Unique Identifiers). When generating globally unique identifiers for each application system, a generic globally unique identifier is first generated for that application system. See also... Figure 2 The universally unique identifier (UBI) consists of a system part and a node part. The system part is immutable and is used to distinguish different application systems. The node part is then replaced with the same character, preferably the character "0". This replacement forms the UBI of the application system. At this point, it's necessary to check if the currently generated UBI has already been used. If it has, the above steps are repeated to regenerate the UBI. When generating a UBI for each node, based on the application system's UBI, the node part is reassigned a string, and the original "0" string in the node part is replaced, thus forming the node's UBI to distinguish different nodes within that application system. The node part is n bits, preferably within the range of 1 ≤ n ≤ 12. The reassigned node part is preferably a hexadecimal string for easy lookup and comparison.
[0036] The global unique identifier of each application system is set with different working network segments by the shared arbitration system for network isolation. By setting the global unique identifier of the application system with different working network segments, the global unique identifier of the application system can be bound to a certain network address, such as binding the global unique identifier of the application system to the network segment 192.168.10.1-192.168.10.254, which is equivalent to binding the application system to the network segment 192.168.10.1-192.168.10.254.
[0037] The global unique identifier of each application system is set with different working network segments by the shared arbitration system for network isolation. By setting the global unique identifier of the application system with different working network segments, the global unique identifier of the application system can be bound to a certain network address, such as binding the global unique identifier of the application system to the network segment 192.168.10.1-192.168.10.254, which is equivalent to binding the application system to the network segment 192.168.10.1-192.168.10.254.
[0038] As shown in Figure 1 The node sends an access request to the shared arbitration system based on a network interface. In the first access request, the global unique identifier of the application system, the address of the node, and the password information are carried. In subsequent access requests, the global unique identifier of the node, the address, and the password information are carried. It should be noted that the global unique identifier of the node is not registered to the corresponding node in advance, so the address of the node is carried in the first access request. When the shared arbitration system responds to the first access request of the node, the global unique identifier of the node is returned to the node, so that the node obtains its own global unique identifier and carries it in subsequent access requests. The above network interface preferably uses gRPC as the calling interface. The system can easily compile the Protocol Buffers interface file into different computer interface libraries using the protoc tool, and the application system only needs to call the library. The arbitration service developer can also easily develop an interactive tool through the library. The request data structure in the protocol file needs to consider the password, UUID, etc.
[0039] After the shared arbitration system receives the access request, the address, the globally unique identifier and the password information of the node in the access request are acquired. Firstly, it is judged whether the address of the node is in the working network segment of the application system. Then, it is judged whether the password information is consistent with the shared arbitration system. If the address of the node is in the working network segment of the application system, and the password information is consistent with the shared arbitration system, the access is allowed. The shared arbitration system acquires the globally unique identifier of the corresponding application system based on the globally unique identifier of the node (the node part is cleared), and then controls the access to the corresponding arbitration module according to the globally unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node. After the arbitration module receives the access request of the node, the system part of the globally unique identifier of the node can be further verified, and some other node information verification can also be introduced. After the verification, the processing is performed.
[0040] In addition, when the node appears to be running abnormally, the globally unique identifier of the node is preferably destroyed. If the node is destroyed due to abnormal running, a destruction request needs to be sent by another normal node. After the shared arbitration system receives the request, the globally unique identifier of the node is removed from the system. However, some prerequisites are needed for removal, specifically, the shared arbitration system is in an arbitration state or the node is not an arbitration successful node. If the node is an arbitration successful node, it means that the data on the node may be the latest, and removal may cause data damage, so the shared arbitration system needs to refuse the destruction operation. In this case, the shared arbitration system can keep the current state, and the system administrator can repair it. When the application system does not need the shared arbitration system, such as a factory reset operation, the globally unique identifier of the application system is preferably destroyed. The destruction operation can also be initiated by a normally working node.
[0041] Referring to Figure 3 Based on the above embodiments, those skilled in the art can easily understand that the present application also provides a network-based software arbitration sharing and identification system, which includes a shared arbitration system and an application system. The shared arbitration system includes a plurality of arbitration modules, the number of arbitration modules is the same as the number of application systems, which is k, each arbitration module is used to process the access request of an application system, each application system includes a plurality of nodes, the total number of nodes is m, and m is a natural number greater than 0.
[0042] The shared arbitration system allocates a globally unique identifier for each application system and each node of the application system respectively, so as to distinguish different application systems by the globally unique identifier of the application system and distinguish different nodes by the globally unique identifier of the node. The globally unique identifier is referred to as UUID (Universally Unique Identifier). When generating the globally unique identifier for each application system, a general globally unique identifier is generated for the application system first. Referring to Figure 2 The general globally unique identifier comprises a system part and a node part. The system part is not modifiable and is used to distinguish different application systems. Then the node part is replaced by the same character, preferably the character "0". After the replacement, the globally unique identifier of the application system is formed. At this time, it is also necessary to determine whether the globally unique identifier of the application system generated at present has been used. If it has been used, the above steps are repeated to generate the globally unique identifier of the application system again. When generating the globally unique identifier for each node, the node part is re-allocated with a character string on the basis of the globally unique identifier of the application system, and the "0" character string in the original node part is replaced, so as to form the globally unique identifier of the node, which is used to distinguish different nodes in the application system. The node part has n bits, and the preferred value range is 1≦n≦12. The re-allocated node part is preferably a hexadecimal character string, which is convenient for query and comparison.
[0043] The shared arbitration system also sets different working network segments for the globally unique identifier of each application system to perform network isolation. By setting different working network segments for the globally unique identifier of the application system, the globally unique identifier of the application system can be bound to a certain network address, such as binding the globally unique identifier of the application system to the network segment 192.168.10.1-192.168.10.254, which is equivalent to binding the application system to the network segment 192.168.10.1-192.168.10.254.
[0044] The shared arbitration system also sets password information for the globally unique identifier of each application system. The password can be set by an administrator or randomly generated, and the globally unique identifier of the application system, the working network segment and the password information are registered to the corresponding application system. The application system configures an address for each node in the working network segment through network planning, and then registers the address of each node to the shared arbitration system for storage. In addition, the globally unique identifier of the application system, the globally unique identifier of the node, the working network segment, the node address and the password information are all stored in the shared arbitration system, so as to be retrieved and identified in the future. In addition, when generating the globally unique identifier of the node, the password information should also be obtained at the same time as the globally unique identifier of the application system is obtained, so as to be stored correspondingly in the future.
[0045] The node sends an access request to the shared arbitration system based on a network interface, carries a globally unique identifier of an application system, an address and password information of the node when sending the access request for the first time, and carries a globally unique identifier, an address and password information of the node when sending the access request subsequently. It should be noted that since the globally unique identifier of the node has not been registered to the corresponding node in advance, the shared arbitration system returns the globally unique identifier of the node to the node when responding to the access request of the node for the first time, so that the node obtains its own globally unique identifier and carries it when sending the access request subsequently. The network interface preferably uses gRPC as a calling interface, and the system can easily compile a Protocol Buffers interface file into different computer interface libraries through a protoc tool, and the application system only needs to call the library. The arbitration service developer can also easily develop an interactive tool through the library. The request data structure in the protocol file needs to consider the password, UUID and the like.
[0046] After receiving the access request, the shared arbitration system obtains the address, globally unique identifier and password information of the node in the access request, first judges whether the address of the node is in the working network segment of the application system to which the node belongs, and then judges whether the password information is consistent with the password information set in the shared arbitration system. If the address of the node is in the working network segment of the application system to which the node belongs, and the password information is consistent with the password information set in the shared arbitration system, access is allowed, the shared arbitration system obtains the globally unique identifier of the corresponding application system based on the globally unique identifier of the node (the node part is cleared), and then controls the access to the corresponding arbitration module according to the globally unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node. After receiving the access request of the node, the arbitration module can further verify the system part of the globally unique identifier of the node, or introduce some verification of other node information, and then process after verification.
[0047] In addition, when a node has a running exception, the globally unique identifier of the node is preferably destroyed, if the destruction is due to the node running exception, a destruction request is sent by another normal node, and the shared arbitration system removes the globally unique identifier of the node from the system after receiving the request. However, some prerequisites are required for removal, specifically, the shared arbitration system is in an arbitration state or the node is not an arbitration successful node, if the node is an arbitration successful node, it means that the data on the node can be the latest, and removal can cause data damage, so the shared arbitration system needs to refuse the destruction operation. In this case, the shared arbitration system can keep the current state, and specific repair is performed by the system administrator. When the application system does not need the shared arbitration system, such as a factory reset operation, the globally unique identifier of the application system is preferably destroyed, and the destruction operation is also initiated by a normally working node.
[0048] The above only describes the preferred embodiments of the present application, and it should be noted that other non-specifically described parts belong to the prior art or common knowledge for ordinary skilled in the art. Without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A method for network-based software arbitration of sharing and identification, characterized in that, The application comprises the following steps: A global unique identifier is allocated to each application system and each node thereof by a shared arbitration system, so as to distinguish different application systems by the global unique identifier of the application system and distinguish different nodes by the global unique identifier of the node, wherein the shared arbitration system comprises a plurality of arbitration modules, each of which is used to process an access request of an application system; A different working network segment is set for the global unique identifier of each application system by the shared arbitration system, so as to perform network isolation; Password information is set for the global unique identifier of each application system by the shared arbitration system, and the global unique identifier, working network segment, address of the shared arbitration system and password information of the application system are registered to the corresponding application system, wherein the application system configures an address for the node in the working network segment by network planning, and then registers the address of each node to the shared arbitration system for storage; The node sends an access request to the shared arbitration system based on a network interface, carries the global unique identifier of the application system, address of the node and the password information when sending the access request for the first time, and carries the global unique identifier, address of the node and the password information when sending the access request subsequently; The shared arbitration system acquires the address, global unique identifier and password information of the node in the access request after receiving the access request, acquires the global unique identifier of the application system based on the global unique identifier of the node if the address of the node is in the working network segment of the application system and the password information is consistent with that set in the shared arbitration system, and then controls access to the corresponding arbitration module according to the global unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node.
2. The method for network-based software arbitration sharing and identification according to claim 1, characterized in that, When generating a global unique identifier for each application system, a general global unique identifier is generated for the application system, which comprises a system part and a node part, the system part is not modifiable and is used to distinguish different application systems, and then the node part is replaced by the same character; When generating a global unique identifier for each node, the node part is re-allocated characters on the basis of the global unique identifier of the application system, so as to distinguish different nodes in the application system.
3. The method of claim 2, wherein, The node part is replaced by the character "0".
4. The method of claim 2, wherein, The node part is n bits, 1 ≦ n ≦ 12, and the re-allocated node part is a hexadecimal string.
5. The method of claim 1, wherein, The network interface uses gRPC as a calling interface.
6. A system for network-based software arbitration of sharing and identification, characterized by The application comprises a shared arbitration system and a plurality of application systems, wherein the shared arbitration system comprises a plurality of arbitration modules, each of which is used to process an access request of an application system, and each application system comprises a plurality of nodes; The shared arbitration system is used to allocate a global unique identifier to each application system and each node thereof, so as to distinguish different application systems by the global unique identifier of the application system and distinguish different nodes by the global unique identifier of the node; The shared arbitration system further sets different work network segments for the global unique identifier of each application system for network isolation, sets password information for the global unique identifier of each application system, and registers the global unique identifier of the application system, the work network segment, the address of the shared arbitration system, and the password information to the corresponding application system, the application system configures addresses of nodes in the work network segment through network planning, and then registers addresses of the nodes to the shared arbitration system for storage; The node sends an access request to the shared arbitration system based on a network interface, carries the global unique identifier of the application system, the address of the node, and the password information when sending the access request for the first time, and carries the global unique identifier, the address of the node, and the password information when sending the access request subsequently; The shared arbitration system obtains the address, the global unique identifier, and the password information of the node in the access request after receiving the access request, obtains the global unique identifier of the application system if the address of the node is in the work network segment of the application system and the password information is consistent with the password information set in the shared arbitration system, and then controls access to the corresponding arbitration module according to the global unique identifier of the application system to enable the corresponding arbitration module to process the access request of the node.
7. A network-based software arbitration sharing and identification system according to claim 6, wherein, When generating the global unique identifier for each application system, a general global unique identifier is generated for the application system, the general global unique identifier includes a system part and a node part, the system part is not modifiable and is used to distinguish different application systems, and the node part is replaced by the same character; When generating the global unique identifier for each node, characters are re-allocated to the node part on the basis of the global unique identifier of the application system to distinguish different nodes in the application system.
8. A network-based software arbitration sharing and identification system according to claim 7, wherein, The node part is replaced by the character "0".
9. The system for network-based software arbitration sharing and identification of claim 7, wherein, The node part is n bits, 1≦n≦12, and the re-allocated node part is a 16-bit character string.
10. The system for network-based software arbitration sharing and identification of claim 7, wherein, The network interface is a gRPC interface.
Citation Information
Patent Citations
Network address distribution method, server and node
CN102904977A
Arbitration processing method, electronic device and computer readable storage medium
CN110348988A