Software arbitration sharing and identification method and system based on network
By assigning global unique identifiers to application systems and nodes and realizing access control of arbitration modules through network interfaces, the problems of high hardware arbitration cost, undefined and independent design of software arbitration and no consideration of shared arbitration in the prior art are solved, and efficient , low-cost software arbitration sharing and identification.
Patent Information
- Application Number
- CN202411254565.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-09-09
AI Technical Summary
In the prior art, hardware-based arbitration methods are costly, software arbitration does not define autonomous design arbitration methods, and shared arbitration scenarios are not considered, resulting in low arbitration utilization rate and high cost.
Through the shared arbitration system, each application system and each node is assigned a globally unique identifier, and the access control of the arbitration module is realized through the network interface, network isolation and password authentication are supported, and gRPC is used as the calling interface.
It improves arbitration utilization rate, reduces costs, supports shared scenarios, is suitable for embedded within the application, and has good compatibility.
Smart Images

Figure CN119402535A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for software arbitration sharing and identification based on a network. Background Art
[0002] In data multi-active application scenarios, arbitration services are generally required to collaboratively handle brain split problems to avoid data corruption. The arbitration service that integrates software and hardware requires that the servers be connected to each other and that the relevant arbitration software be run. The arbitration service implemented by software only requires the configuration of a reliable network interface and the running of the relevant arbitration software.
[0003] Other common technical deficiencies are as follows: 1. The hardware-based arbitration method is costly and the server needs to support the corresponding interface; 2. Software arbitration is mostly implemented using some open source software, and no method for independently designed arbitration is defined; 3. Shared arbitration scenarios are not considered. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for software arbitration sharing and identification based on a network in view of the deficiencies in the prior art.
[0005] To achieve the above object, in a first aspect, the present invention provides a method for software arbitration sharing and identification based on a network, comprising: Using a shared arbitration system to assign a globally unique identifier to each application system and each node thereof, so as to distinguish different application systems by the globally unique identifier of the application system and to distinguish different nodes by the globally unique identifier of the node, the shared arbitration system comprising a plurality of arbitration modules, each arbitration module being used to process an access request of an application system; Set different working network segments for each application system's globally unique identifier through a shared arbitration system to isolate the network; Password information is set for the globally unique identifier of each application system through the shared arbitration system, and the globally unique identifier of the application system, the working network segment, the address of the shared arbitration system and the password information are registered with the corresponding application system. The application system configures addresses for nodes in the working network segment through network planning, and then registers the addresses of each node with the shared arbitration system for storage; The node sends an access request to the shared arbitration system based on the network interface. When sending the access request for the first time, the node carries the globally unique identifier of the application system, the address of the node and the password information. When sending the access request subsequently, the node carries the globally unique identifier, address and the password information. After receiving the access request, the shared arbitration system obtains the address, global unique identifier and password information of the node in the access request. If the address of the node is within the working network segment of the application system to which it belongs, and the password information is consistent with that set in the shared arbitration system, the global unique identifier of the application system is obtained based on the global unique identifier of the node, and then access to the corresponding arbitration module is controlled according to the global unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node.
[0006] Furthermore, when a globally unique identifier is generated for each application system, a universal globally unique identifier is first generated for the application system, the universal globally unique identifier includes a system part and a node part, the system part cannot be modified and is used to distinguish different application systems, and then the node part is replaced with the same character; when a globally unique identifier is generated for each node, on the basis of the globally unique identifier of the application system, characters are reallocated to the node part to distinguish different nodes within the application system.
[0007] Furthermore, the node portion is replaced by the character "0".
[0008] Furthermore, the node part is n bits, 1≦n≦12, and the node part is reallocated as a hexadecimal string.
[0009] Furthermore, the network interface uses gRPC as a calling interface.
[0010] In a second aspect, the present invention provides a network-based software arbitration sharing and identification system, comprising a shared arbitration system and a plurality of application systems, wherein the shared arbitration system comprises a plurality of arbitration modules, each arbitration module 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 assign a globally unique identifier to each application system and each node thereof, so as to distinguish different application systems by the globally unique identifier of the application system, and to distinguish different nodes by the globally unique identifier of the node; The shared arbitration system is also used to set a different working network segment for the globally unique identifier of each application system to perform network isolation; and to set password information for the globally unique identifier of each application system, and to register the globally unique identifier of the application system, the working network segment, the address and password information of the shared arbitration system with the corresponding application system. The application system configures addresses for nodes in the working network segment through network planning, and then registers the addresses of each node with the shared arbitration system for storage; The node sends an access request to the shared arbitration system based on the network interface. When sending the access request for the first time, the node carries the globally unique identifier of the application system, the address of the node and the password information. When sending the access request subsequently, the node carries the globally unique identifier, address and the password information. After receiving the access request, the shared arbitration system obtains the address, global unique identifier and password information of the node in the access request. If the address of the node is within the working network segment of the application system to which it belongs, and the password information is consistent with that set in the shared arbitration system, the global unique identifier of the application system is obtained based on the global unique identifier of the node, and then access to the corresponding arbitration module is controlled according to the global unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node.
[0011] Furthermore, when a globally unique identifier is generated for each application system, a universal globally unique identifier is first generated for the application system, the universal globally unique identifier includes a system part and a node part, the system part cannot be modified and is used to distinguish different application systems, and then the node part is replaced with the same character; when a globally unique identifier is generated for each node, on the basis of the globally unique identifier of the application system, characters are reallocated to the node part to distinguish different nodes within the application system.
[0012] Furthermore, the node portion is replaced by the character "0".
[0013] Furthermore, the node part is n bits, 1≦n≦12, and the node part is reallocated as a hexadecimal string.
[0014] Furthermore, the network interface uses gRPC as a calling interface.
[0015] Beneficial effects: 1. The present invention is designed for shared scenarios, which improves arbitration utilization and reduces costs; 2. The present invention can be easily embedded in applications and is more suitable for special scenarios; 3. The present invention implements calls based on gRPC, meets the needs of different development languages, and has good compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a partial flow diagram of a method for sharing and identifying software arbitration based on a network; Figure 2 is a schematic diagram of the structure of a globally unique identifier of a node in an embodiment of the present invention; Figure 3 A schematic diagram of a network-based software arbitration sharing and identification system. DETAILED DESCRIPTION
[0017] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. The embodiments are implemented based on the technical solution of the present invention. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0018] The embodiment of the present invention provides a method for sharing and identifying software arbitration based on a network, comprising: A shared arbitration system is used to assign a globally unique identifier to each application system and each of its nodes, so that different application systems can be distinguished by the globally unique identifier of the application system, and different nodes can be distinguished by the globally unique identifier of the node. The shared arbitration system includes several arbitration modules, each of which is used to process the access request of an application system. The above-mentioned globally unique identifier is UUID (Universally Unique Identifier). When generating a globally unique identifier for each application system, a universal globally unique identifier is first generated for the application system. See Figure 2 The universal globally unique identifier includes a system part and a node part. The system part cannot be modified and is used to distinguish different application systems. Then the node part is replaced with the same character, preferably with 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 currently generated has been used. If it has been used, repeat the above steps to regenerate the globally unique identifier of the application system. When generating a globally unique identifier for each node, on the basis of the globally unique identifier of the application system, the node part is reallocated with a character string, and the "0" character string of the original node part is replaced, that is, the globally unique identifier of the node is formed to distinguish different nodes in the application system. The above-mentioned node part is n bits, and the preferred value range is 1≦n≦12. The above-mentioned node part is preferably reallocated with a hexadecimal character string for easy query and comparison.
[0019] Through the shared arbitration system, different working network segments are set for the globally unique identifier of each application system to isolate the network. 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 segment. For example, if the globally unique identifier of the application system is bound to the 192.168.10.1-192.168.10.254 network segment, it is equivalent to binding the application system to the 192.168.10.1-192.168.10.254 network segment.
[0020] The shared arbitration system sets password information for the globally unique identifier of each application system. The password can be designed to be set by the administrator or randomly generated, and the globally unique identifier of the application system, the working network segment, the address of the shared arbitration system and the password information are registered to the corresponding application system. The application system configures the address of the 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 password information are all stored in the shared arbitration system for subsequent retrieval and identification needs. In addition, when generating a globally unique identifier of a node, when obtaining the globally unique identifier of the application system, the password information should also be obtained at the same time for subsequent corresponding storage.
[0021] like Figure 1 As shown, the node sends an access request to the shared arbitration system based on the network interface. When sending the access request for the first time, it carries the globally unique identifier of the application system, the address and password information of the node. When sending the access request subsequently, it carries the globally unique identifier, address and password information of the node. It should be noted that since the globally unique identifier of the node has not been registered to the corresponding node before, the address of the node carried when sending the access request for the first time, the shared arbitration system will carry the globally unique identifier of the node and return it 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 above network interface preferably uses gRPC as the calling interface, and the system can easily compile the Protocol Buffers interface file into different computer interface libraries through the protoc tool, and the application system only needs to call the library. It is also easy for arbitration service developers to develop interactive tools through this library. The request data structure in the protocol file needs to consider passwords, UUIDs, etc.
[0022] After receiving the access request, the shared arbitration system obtains the address, global unique identifier and password information of the node in the access request. First, it determines whether the address of the node is within the working network segment of the application system to which it belongs, and then determines whether the password information is consistent with the settings of the shared arbitration system. If the address of the node is within the working network segment of the application system to which it belongs, and the password information is consistent with the settings in the shared arbitration system, access is allowed. The shared arbitration system will obtain the global unique identifier of the corresponding application system based on the global unique identifier of the node (just clear the node part), and then control access to the corresponding arbitration module according to the global unique identifier of the application system, so that the corresponding arbitration module processes the node's access request. After receiving the node's access request, the arbitration module can further verify the system part of the node's global unique identifier, and can also introduce some other node information verification, and then process it after the verification is passed.
[0023] In addition, when a node has an abnormal operation, it is also preferred to destroy the node's globally unique identifier. If the node is destroyed due to abnormal operation, another normal node needs to send a destruction request. After receiving the request, the shared arbitration system removes the node's globally unique identifier from the system. However, there are some prerequisites for removal, specifically that the shared arbitration system is in an arbitration state or the node is not a node that has successfully arbitrated. If this node is a node that has successfully arbitrated, it means that the data on this node may be the latest, and removing it may cause data damage, so the shared arbitration system needs to refuse the destruction operation. In this case, the shared arbitration system can maintain its current state, which is specifically repaired by the system administrator. When the application system does not need the shared arbitration system, such as due to operations such as restoring factory settings, it is also preferred to destroy the application system's globally unique identifier. The destruction operation can also be initiated by a node that is working normally.
[0024] See also Figure 3 Based on the above embodiments, those skilled in the art can easily understand that the present invention also provides a network-based software arbitration sharing and identification system, including a shared arbitration system and an application system. The shared arbitration system includes a plurality of arbitration modules, the number of which is the same as the number of application systems, which are k respectively, and each arbitration module is used to process an access request of an application system. Each application system includes a plurality of nodes, the total number of which is m, and m is a natural number greater than 0.
[0025] The shared arbitration system is used to assign a globally unique identifier to each application system and each of its nodes, so as to distinguish different application systems through the globally unique identifier of the application system, and to distinguish different nodes through the globally unique identifier of the node. The above globally unique identifier is UUID (Universally Unique Identifier). When generating a globally unique identifier for each application system, a universal globally unique identifier is first generated for the application system. Figure 2The universal globally unique identifier includes a system part and a node part. The system part cannot be modified and is used to distinguish different application systems. Then the node part is replaced with the same character, preferably with 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 currently generated has been used. If it has been used, repeat the above steps to regenerate the globally unique identifier of the application system. When generating a globally unique identifier for each node, on the basis of the globally unique identifier of the application system, the node part is reallocated with a character string, and the "0" character string of the original node part is replaced, that is, the globally unique identifier of the node is formed to distinguish different nodes in the application system. The above-mentioned node part is n bits, and the preferred value range is 1≦n≦12. The above-mentioned node part is preferably reallocated with a hexadecimal character string for easy query and comparison.
[0026] The shared arbitration system is also used to set different working network segments for the globally unique identifier of each application system to isolate the network. 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 segment. For example, if the globally unique identifier of the application system is bound to the 192.168.10.1-192.168.10.254 network segment, it is equivalent to binding the application system to the 192.168.10.1-192.168.10.254 network segment.
[0027] The shared arbitration system is also used to set password information for the globally unique identifier of each application system. The password can be designed to be set by the administrator or randomly generated, and the globally unique identifier, working network segment and password information of the application system are registered to the corresponding application system. The application system configures addresses for nodes in the working network segment through network planning, and then registers the addresses 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 password information are all stored in the shared arbitration system for subsequent retrieval and identification needs. In addition, when generating a globally unique identifier of a node, when obtaining the globally unique identifier of the application system, the password information should also be obtained at the same time for subsequent corresponding storage.
[0028] The node sends an access request to the shared arbitration system based on the network interface. When sending the access request for the first time, it carries the globally unique identifier of the application system, the address and password information of the node. When sending the access request subsequently, it carries the globally unique identifier, address and password information of the node. It should be noted that since the globally unique identifier of the node has not been registered to the corresponding node before, the address of the node carried when sending the access request for the first time, the shared arbitration system will carry the globally unique identifier of the node and return it 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 above network interface preferably uses gRPC as the calling interface, and the system can easily compile the Protocol Buffers interface file into different computer interface libraries through the protoc tool, and the application system only needs to call the library. It is also easy for arbitration service developers to develop interactive tools through this library. The request data structure in the protocol file needs to consider passwords, UUIDs, etc.
[0029] After receiving the access request, the shared arbitration system obtains the address, global unique identifier and password information of the node in the access request. First, it determines whether the address of the node is within the working network segment of the application system to which it belongs, and then determines whether the password information is consistent with the settings of the shared arbitration system. If the address of the node is within the working network segment of the application system to which it belongs, and the password information is consistent with the settings in the shared arbitration system, access is allowed. The shared arbitration system will obtain the global unique identifier of the corresponding application system based on the global unique identifier of the node (just clear the node part), and then control access to the corresponding arbitration module according to the global unique identifier of the application system, so that the corresponding arbitration module processes the node's access request. After receiving the node's access request, the arbitration module can further verify the system part of the node's global unique identifier, and can also introduce some other node information verification, and then process it after the verification is passed.
[0030] In addition, when a node has an abnormal operation, it is also preferred to destroy the node's globally unique identifier. If the node is destroyed due to abnormal operation, another normal node needs to send a destruction request. After receiving the request, the shared arbitration system removes the node's globally unique identifier from the system. However, there are some prerequisites for removal, specifically that the shared arbitration system is in an arbitration state or the node is not a node that has successfully arbitrated. If this node is a node that has successfully arbitrated, it means that the data on this node may be the latest, and removing it may cause data damage, so the shared arbitration system needs to refuse the destruction operation. In this case, the shared arbitration system can maintain its current state, which is specifically repaired by the system administrator. When the application system does not need the shared arbitration system, such as due to operations such as restoring factory settings, it is also preferred to destroy the application system's globally unique identifier. The destruction operation can also be initiated by a node that is working normally.
[0031] The above is only a preferred embodiment of the present invention. It should be noted that for ordinary technicians in this technical field, other parts not specifically described belong to the prior art or common knowledge. Several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.
Claims
1. A method for sharing and identifying software arbitration based on a network, characterized in that: include: Using a shared arbitration system to assign a globally unique identifier to each application system and each node thereof, so as to distinguish different application systems by the globally unique identifier of the application system and to distinguish different nodes by the globally unique identifier of the node, the shared arbitration system comprising a plurality of arbitration modules, each arbitration module being used to process an access request of an application system; Set different working network segments for each application system's globally unique identifier through a shared arbitration system to isolate the network; Password information is set for the globally unique identifier of each application system through the shared arbitration system, and the globally unique identifier of the application system, the working network segment, the address of the shared arbitration system and the password information are registered with the corresponding application system. The application system configures addresses for nodes in the working network segment through network planning, and then registers the addresses of each node with the shared arbitration system for storage; The node sends an access request to the shared arbitration system based on the network interface. When sending the access request for the first time, the node carries the globally unique identifier of the application system, the address of the node and the password information. When sending the access request subsequently, the node carries the globally unique identifier, address and the password information. After receiving the access request, the shared arbitration system obtains the address, global unique identifier and password information of the node in the access request. If the address of the node is within the working network segment of the application system to which it belongs, and the password information is consistent with that set in the shared arbitration system, the global unique identifier of the application system is obtained based on the global unique identifier of the node, and then access to the corresponding arbitration module is controlled according to the global unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node.
2. A method for sharing and identifying software arbitration based on a network according to claim 1, characterized in that: When generating a globally unique identifier for each application system, first generate a universal globally unique identifier for the application system, the universal globally unique identifier includes a system part and a node part, the system part cannot be modified and is used to distinguish different application systems, and then replace the node part with the same character; When a globally unique identifier is generated for each node, characters are reallocated to the node portion based on the globally unique identifier of the application system to distinguish different nodes in the application system.
3. A method for sharing and identifying software arbitration based on a network according to claim 2, characterized in that: The node part is replaced by the character "0".
4. A method for sharing and identifying software arbitration based on a network according to claim 2, characterized in that: The node part is n bits, 1≦n≦12, and the node part is reallocated as a hexadecimal string.
5. A method for sharing and identifying software arbitration based on a network according to claim 1, characterized in that: The network interface uses gRPC as the calling interface.
6. A network-based software arbitration sharing and identification system, characterized in that: It includes a shared arbitration system and several application systems, wherein the shared arbitration system includes several arbitration modules, each arbitration module is used to process an access request of an application system, and each application system includes several nodes; The shared arbitration system is used to assign a globally unique identifier to each application system and each node thereof, so as to distinguish different application systems by the globally unique identifier of the application system, and to distinguish different nodes by the globally unique identifier of the node; The shared arbitration system is also used to set a different working network segment for the globally unique identifier of each application system to perform network isolation, and set password information for the globally unique identifier of each application system, and register the globally unique identifier of the application system, the working network segment, the address and password information of the shared arbitration system to the corresponding application system. The application system configures addresses for nodes in the working network segment through network planning, and then registers the addresses of each node to the shared arbitration system for storage; The node sends an access request to the shared arbitration system based on the network interface. When sending the access request for the first time, the node carries the globally unique identifier of the application system, the address of the node and the password information. When sending the access request subsequently, the node carries the globally unique identifier, address and the password information. After receiving the access request, the shared arbitration system obtains the address, global unique identifier and password information of the node in the access request. If the address of the node is within the working network segment of the application system to which it belongs, and the password information is consistent with that set in the shared arbitration system, the global unique identifier of the application system is obtained based on the global unique identifier of the node, and then access to the corresponding arbitration module is controlled according to the global unique identifier of the application system, so that the corresponding arbitration module processes the access request of the node.
7. A network-based software arbitration sharing and identification system according to claim 6, characterized in that: When generating a globally unique identifier for each application system, first generate a universal globally unique identifier for the application system, the universal globally unique identifier includes a system part and a node part, the system part cannot be modified and is used to distinguish different application systems, and then replace the node part with the same character; When a globally unique identifier is generated for each node, characters are reallocated to the node portion based on the globally 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, characterized in that: The node part is replaced by the character "0".
9. A network-based software arbitration sharing and identification system according to claim 7, characterized in that: The node part is n bits, 1≦n≦12, and the node part is reallocated as a hexadecimal string.
10. A network-based software arbitration sharing and identification system according to claim 7, characterized in that: 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
Method and apparatus for arbitration
CN110648204A
Multicast system and multicast method based on identification analysis routing
CN112187644A
System for Determining Presence of and Authorizing a Quorum to Transact Business over a Network
US20120117157A1