Privilege transfer system and privilege transfer method for integrated monitoring system
By introducing a consistency data coordination server based on the RAFT algorithm into the integrated monitoring system, decoupling and trusted control of permission transfer are achieved, solving the problems of cumbersome permission transfer process and data consistency risks, and improving the efficiency and security of permission management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CASCO SIGNAL LTD
- Filing Date
- 2024-12-23
- Publication Date
- 2026-04-28
AI Technical Summary
The existing integrated monitoring system has a cumbersome and highly coupled process for transferring permissions, which poses a risk to data consistency and makes it difficult to manage permissions securely and efficiently between the center and the station.
A consensus data coordination server based on the RAFT algorithm is adopted. Through network communication between the requester and the receiver, the observer pattern and real-time library management of permission information are used to achieve decoupling and trusted control of permission transfer.
It improves the efficiency and security of the permission transfer process, reduces development and maintenance difficulty, ensures reliable management of device permissions, and avoids the harm caused by different users issuing different control commands to the same device.
Smart Images

Figure CN119835028B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rail transit, and more specifically to an access control system and method for an integrated monitoring system. Background Technology
[0002] With the advancement of urbanization and the need to expand domestic demand and develop a low-carbon economy, urban rail transit, with its characteristics of large capacity, high speed, safety, punctuality, environmental protection, and energy conservation, has become an important component for achieving sustainable urban transportation development. Integrated monitoring systems, with their unified hardware and software platform, can achieve maximum information exchange and resource sharing, and are being used more and more widely.
[0003] Because the operator system at all levels and of all types is vast, and the monitoring scope inevitably overlaps, different operators can perform control operations on a certain controlled object from multiple locations. To avoid accidents caused by different operators (station level, center level) issuing different control commands to the same equipment or related equipment within the same system, and to further clarify the responsibilities of the management and dispatching departments at all levels of rail transit operation, it is necessary to reasonably allocate read, write, and control permissions for each piece of equipment data, and to manage the permissions of each user accordingly.
[0004] Generally, in integrated monitoring systems, operational permissions for different specialized systems are mutually exclusive between the control center (center level) and the stations (station level), and are mostly transferred between the control center and stations at the station or specific specialty level. Some integrated monitoring systems further refine the permission transfer process to better control it; for example, the transferring party first requests permission from the receiving party and then waits for the receiving party's acceptance or rejection; in emergency mode, permissions can also be forcibly acquired. However, existing technical solutions for permission transfer mainly rely on direct request-response between the server's permission transfer service modules. This approach is cumbersome and highly coupled, potentially leading to risks related to strong data consistency.
[0005] The statements herein provide only background information in relation to this invention and do not necessarily constitute prior art. Summary of the Invention
[0006] The purpose of this invention is to propose a permission transfer system and method for an integrated monitoring system, which can decouple the complex interactive process involved in permission transfer commands between servers, and achieve reliable process control when transferring permissions for global devices between the center and stations, thus simplifying the permission transfer process while ensuring security.
[0007] To achieve the above objectives, this invention proposes a permission transfer system for an integrated monitoring system, used to transfer equipment permissions between a center and a station, comprising: a requester, a consistency data coordination server, and a receiver; the requester has a requester workstation and a requester server, the requester server containing a requester server permission service module and a requester real-time database; the receiver has a receiver workstation and a receiver server, the receiver server containing a receiver server permission service module and a receiver real-time database; communication between the requester workstation and the requester server, between the receiver workstation and the receiver server, between the requester server and the consistency data coordination server, and between the receiver server and the consistency data coordination server is achieved through network communication;
[0008] The consistency data coordination server contains permission information, and the requesting server permission service module and the receiving server permission service module are also used to write the update status of the permission information into the consistency data coordination server.
[0009] The requesting server permission service module and the receiving server permission service module are also used to receive the update status of the permission information pushed by the consistency data coordination server in an observer mode, so as to obtain the update status of the permission information written by other parties.
[0010] Preferably, the requester real-time database and the receiver real-time database record the permission owner and permission status of each device; the requester server permission service module and the receiver server permission service module are also used to update the permission owner and device permission status of the devices in the requester real-time database and the receiver real-time database, respectively.
[0011] Preferably, the requesting workstation is used to initiate a permission transfer request to the permission service module of the requesting server; the requesting workstation also obtains the result of the permission transfer request through the requesting real-time database.
[0012] The receiving workstation obtains the permission transfer request information through the receiving real-time database; the receiving workstation also sends the return message of the permission transfer request to the receiving server permission service module.
[0013] Preferably, the permission information includes the group number, node number, heartbeat information, permission transfer process, and device permission owner of the server and workstation;
[0014] The requesting server and the receiving server refresh the heartbeat information at a certain frequency and send it to the consistency data coordination server. The consistency data coordination server saves the heartbeat information of the requesting party and the receiving party in the form of a timestamp. The server permission service module of the requesting party and the receiving party also obtains the timestamp of the other party's heartbeat information from the consistency data coordination server to determine whether the other party's network connection is normal.
[0015] This invention also proposes a manual permission transfer method for an integrated monitoring system. Based on the aforementioned permission transfer system for an integrated monitoring system, when the network connections between the station, the center, and the consistency data coordination server are all normal, the manual permission transfer method for the integrated monitoring system includes:
[0016] S1. Based on the permission transfer request message from the requesting workstation, the requesting server permission service module writes the permission transfer request into the consistency data coordination server.
[0017] S2. The receiving server permission service module obtains the permission transfer request from the consistency data coordination server, and enables the receiving workstation to obtain the permission transfer request through the receiving real-time library. Then, the receiving workstation sends a return message to the receiving server permission service module, and the receiving server permission service module writes the return message into the consistency data coordination server.
[0018] S3. The requesting party server permission service module obtains the return message from the consistency data coordination server and updates the device information in the requesting party real-time database according to the return message. Thus, the requesting party workstation updates the permission transfer request status and permission owner according to the update information in the requesting party real-time database.
[0019] Wherein, the requesting party is a center or station, and the receiving party is a station or center.
[0020] Preferably, step S1 specifically includes:
[0021] S11. The requesting party server permission service module records the device permission owner in the requesting party's real-time database.
[0022] S12. The requester's real-time library provides a graphical interface to the requester's workstation, enabling the requester's workstation to obtain information about the device's permission owner; the user selects the device whose permissions need to be transferred on the requester's workstation and sends a permission transfer request message to the requester's server permission service module.
[0023] S13. The requesting server's permission service module parses and verifies the permission transfer request message. After the verification is successful, it writes the permission transfer request to the consistency data coordination server.
[0024] Preferably, in step S12, before the user selects the device for which permissions need to be transferred at the requesting workstation, the requesting workstation verifies the user's operating permissions to ensure that the user requesting permission transfer has the operating permissions.
[0025] Preferably, in step S13, after the verification is successful, the requesting server permission service module writes the permission information of the corresponding device in the consistency data coordination server into the permission transfer request and the corresponding time, and at the same time updates the permission status of the corresponding device in the requesting real-time database to the request status.
[0026] Preferably, step S2 specifically includes:
[0027] S21. The receiving server permission service module obtains the permission transfer request pushed by the consistency data coordination server in observer mode, and updates the corresponding device permission status to the request status in the receiving real-time database according to the permission transfer request.
[0028] S22. The receiving workstation obtains the permission transfer request message through the push of the receiving real-time library subscription point and displays it on the receiving workstation interface, while providing two options: accept and reject.
[0029] S23. When the receiving workstation receives a return message indicating a request to receive or a rejection of the request to receive the permission transfer, it sends the return message to the permission service module of the receiving server.
[0030] S24. The receiving server permission service module receives and parses the return message. Based on the return message, it writes the permission information of the corresponding device in the consistency data coordination server into the return message of the permission transfer request, updates the permission owner of the corresponding device in the consistency data coordination server, writes the writing time of the return message, and updates the device permission status in the receiving real-time database accordingly.
[0031] Preferably, step S3 specifically includes:
[0032] S31. The requesting party server permission service module, in observer mode, obtains the return message pushed by the consistency data coordination server, and updates the device permission status in the requesting party's real-time database accordingly based on the return message, and then clears the permission transfer request information in the consistency data coordination server; at the same time, it will also receive the device permission owner change push pushed by the consistency data coordination server, and update the device permission owner accordingly in the requesting party's real-time database.
[0033] S32. The requesting workstation updates the status of the permission transfer request through the push from the requesting real-time library subscription point, and updates the corresponding device permission owner in the requesting workstation.
[0034] Preferably, during the permission transfer process of one device, the permission transfer process of other devices can also be carried out simultaneously.
[0035] This invention also proposes a method for mandatory permission transfer in an integrated monitoring system, based on the permission transfer system for the integrated monitoring system, comprising:
[0036] S1. Select the device whose permissions need to be forcibly revoked on the interface of the central workstation, so that the central workstation sends a forced revocation permission message to the central server permission service module.
[0037] S2. The central server permission service module parses the forced revocation permission message sent by the central workstation, and then directly modifies the device permission owner to the center in the corresponding device permission information in the consistency data coordination server. At the same time, the corresponding device permission owner is updated to the center in the central real-time database.
[0038] S3. The station server permission service module, in observer mode, obtains the message of permission owner modification pushed by the consistency data coordination server, thereby updating the corresponding device permission owner in the station real-time database. Then, the station workstation updates the corresponding device permission owner through the push of the station real-time database subscription point.
[0039] This invention also proposes an automatic permission transfer method for an integrated monitoring system. Based on the permission transfer system for the integrated monitoring system, it is used to automatically transfer device permissions when there is a network anomaly, including:
[0040] When a network anomaly occurs between the station and the consistency data coordination server, device control permissions are automatically transferred to the center. Specifically: when the station server loses connection with the consistency data coordination server and attempts to reconnect fail, the station server permission service module updates the device permissions in the station's real-time database, updating the center to the current device control authority holder for the device at the station. The station workstation then updates the corresponding device's permission holder to the center via push notifications from the station's real-time database subscription points. When the central server determines through heartbeat information that the station server has lost connection with the consistency data coordination server, the central server permission service module updates the device permission holder in the central real-time database. If the current permission holder for the device is the station, it changes the permission holder to the center. The central workstation then updates the corresponding device's permission holder to the center via push notifications from the central real-time database subscription points. The central server permission service module also updates the corresponding device's permission holder in the consistency data coordination server.
[0041] When a network anomaly occurs between the central server and the consistency data coordination server, device control permissions are automatically transferred to the station. Specifically: when the station server determines through heartbeat information that the central server and the consistency data coordination server have lost connection, the station server permission service module updates the device permissions in the station's real-time database, updating the permission owner of the device currently controlled by the central server to the station. The station workstation then updates the corresponding device permission owner to the station via push notifications from the station's real-time database subscription points. The station server permission service module also updates the corresponding device permission owner to the station within the consistency data coordination server. When the central server loses network connection with the consistency data coordination server and attempts to reconnect fail, the central server permission service module updates the device permission owner in the central real-time database. If the current permission owner of the device is the central server, its permission owner is changed to the station; otherwise, it remains the same. The central workstation then updates the corresponding device permission owner via push notifications from the central real-time database subscription points.
[0042] When the service of the consistency data coordination server malfunctions, device control permissions will be automatically transferred. Specifically, when the station server and the central server encounter an error while writing information to the consistency data coordination server, the central permission service module and the station server permission service module update the device control permissions in the central real-time database and the station real-time database respectively according to the default permissions in the predefined initialization file. As a result, the central workstation and the station workstation update the corresponding device's permission owner through the push from the central real-time database and the station real-time database subscription points respectively.
[0043] Compared with the prior art, the technical solution of the present invention has the following advantages and beneficial effects:
[0044] This technical solution fully utilizes the characteristics of the consensus data coordination server based on the RAFT algorithm to decouple the complex interaction process involved in the permission transfer command between servers, and achieves reliable control over the global equipment of the center and station during the permission transfer process. It has the advantages of high operating efficiency, reduced development difficulty, easy maintenance, and convenient debugging.
[0045] This technical solution uses asynchronous operation to control the transfer of permissions for global devices. Operations between workstation nodes do not interfere with each other, and permissions can be transferred to different devices multiple times in a row without blocking and waiting for the results, thus improving efficiency.
[0046] This technical solution, based on the RAFT algorithm, ensures strong consistency of cluster data through a consistent data coordination server. This effectively avoids the impact of different control commands from different users on the same device on the control of the device or system, preventing harmful control processes. Attached Figure Description
[0047] Figure 1 This is a schematic diagram illustrating manual permission transfer for a comprehensive monitoring system in an embodiment of the present invention;
[0048] Figure 2 This is a schematic diagram illustrating the timeout of the received permission transfer in the integrated monitoring system according to an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram illustrating the forced transfer of permissions in a comprehensive monitoring system according to an embodiment of the present invention;
[0050] Figure 4 This is a schematic diagram illustrating the automatic transfer of permissions in the event of a network anomaly between the station and the consistency data coordination server, as described in an embodiment of the present invention.
[0051] Figure 5 This is a schematic diagram illustrating the automatic transfer of permissions in the event of a network anomaly between the central data center and the consistency data coordination server, as described in an embodiment of the present invention.
[0052] Figure 6 This is a schematic diagram illustrating the automatic transfer of permissions when the consistency data coordination server experiences a network anomaly in an embodiment of the present invention. Detailed Implementation
[0053] The following will be combined with the embodiments of the present invention. Figures 1-6 The technical solutions, structural features, objectives and effects achieved in the embodiments of the present invention will be described in detail.
[0054] It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions. They are only used to facilitate and clarify the purpose of illustrating the embodiments of the present invention, and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportional relationship, or adjustments to the size should still fall within the scope of the technical content disclosed in the present invention, provided that they do not affect the effects and objectives that the present invention can produce.
[0055] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only the expressly listed elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0056] This invention discloses a permission transfer system and method for an integrated monitoring system, used to transfer device permissions between a central cluster and a station cluster. The permission transfer system and method are based on an autonomous and controllable consistent data coordination service cluster using the RAFT algorithm (Raft Consensus Algorithm, a consensus algorithm for achieving data consistency in distributed systems). This ensures strong consistency of cluster data, guarantees the controllability and reliability of information in the permission transfer strategy and process, and also achieves decoupling between the main control system and the sub-control system.
[0057] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] like Figure 1 The diagram shown illustrates a working mode of the permission transfer system for a comprehensive monitoring system according to this embodiment. This permission transfer system includes: a requester, a consistency data coordination server, and a receiver. The requester has a requester workstation and a requester server. The requester server contains a requester server permission service module and a requester real-time database. The receiver has a receiver workstation and a receiver server. The receiver server contains a receiver server permission service module and a receiver real-time database.
[0059] This permission transfer system is used to transfer device permissions between the center and the station, the devices including a single remotely controllable device, a predefined group of remotely controllable devices, or a station-wide remotely controllable device.
[0060] This application primarily addresses scenarios involving the transfer of permissions between a central cluster and a station cluster. Control permissions typically reside on the cluster's master node. Therefore, the transfer of permissions occurs between the central cluster's master node (usually located in the control center) and the station cluster's master node. For simplicity, the term "center" in this application refers to the central cluster (or its master node), and "station" refers to the station cluster or its master node. Thus, the requesting party in this application is either the center or the station, and the receiving party corresponds to either the station or the center.
[0061] The consistency data coordination server stores permission information. The requesting server permission service module and the receiving server permission service module can write updates to this permission information into the consistency data coordination server. The requesting server permission service module and the receiving server permission service module also receive updates to the permission information pushed by the consistency data coordination server in an observer mode to obtain permission information updates written by other parties.
[0062] The permission information recorded in the consistency data coordination server includes: group number, node number, heartbeat information, permission transfer process, and device permission owner information for servers (including servers at the center and stations) and workstations (including workstations at the center and stations). Within the consistency data coordination server, a unique primary key is used, based on a two-level structure divided by station and specialty (i.e., firstly, different stations are distinguished by station as the main classification dimension, and then each station is further subdivided by specialty, which refers to professional systems, such as power supply systems, environmental control systems, etc.). The station group code and station specialty form a directory index key to record the permission information of each device. The specific storage format of this information is as follows:
[0063] / STATUS / DATETIME / OCC: Heartbeat, refreshes the current time every 1 second (OCC: Central Code);
[0064] / STATUS / DATETIME / STA: Heartbeat, refreshes the current time every 1 second (STA: Station code)
[0065] / PRIVILEGE / DEVICECODE: Represented using the actual group code;
[0066] / TRANSFER / DEVICECODE:{"phase":"","time":""}.
[0067] Using the aforementioned information storage format, the consistency data coordination server records the heartbeat information of the center and stations, the serial numbers of each device, and the corresponding permission transfer status of each device. Here, "phase" represents the permission transfer request status, and "time" represents the current timestamp. Each time the requesting server's permission service module or the receiving server's permission service module writes permission information updates to the consistency data coordination server, it updates the device's "phase" status, i.e., updates the device's permission transfer request status, and also updates "time," i.e., updates the current timestamp. In this embodiment, different numbers are assigned to "phase" to represent different permission transfer request statuses; specifically, 1 indicates a request for transfer, 2 indicates acceptance of transfer, and 3 indicates rejection of transfer.
[0068] The heartbeat information is used to determine whether the network connection between the station, the center, and the consistency data coordination server is normal. Specifically, the station and center server permission service modules refresh the heartbeat information once per second and send it to the consistency data coordination server. The consistency data coordination server saves the heartbeat information of the station and the center in the form of a timestamp. The station and center server permission service modules obtain the timestamp of the other party's heartbeat information from the consistency data coordination server to determine whether the other party's network connection is normal. If it is found that the timestamp of a server's heartbeat information has not been refreshed for more than three times, it is determined that the server is disconnected. Specifically, the station server permission service module obtains the timestamp of the center server permission service module's heartbeat information from the consistency data coordination server. If it is found that the timestamp of the heartbeat information has not been refreshed for more than three seconds, the station server permission service module determines that the network connection between the consistency data coordination server and the center server is abnormal. The center server permission service module obtains the timestamp of the station server permission service module's heartbeat information from the consistency data coordination server. If it is found that the timestamp of the heartbeat information has not been refreshed for more than three seconds, the center server permission service module determines that the network connection between the consistency data coordination server and the station server is abnormal.
[0069] The requesting workstation and the requesting server, as well as the receiving workstation and the receiving server, communicate via a self-controllable real-time message bus. This real-time message bus features object-oriented programming, uses reliable TCP / IP communication middleware, and is capable of connecting to streaming network modes. The requesting server and the consistency data coordination server, as well as the receiving server and the consistency data coordination server, also communicate via the network.
[0070] The requester's real-time database and the receiver's real-time database record information about the current control authority holders (hereinafter referred to as authority holders) for each device. The detailed information recorded in the requester's real-time database and the receiver's real-time database is shown in the table below:
[0071]
[0072]
[0073] According to the table above, both the requester's real-time database and the receiver's real-time database should record the device code, the group code to which the device belongs, whether the device can be forcibly transferred, whether the device can have its permissions transferred, whether the device's permissions can be received, the device's permission information status flag (Status, with 4 columns: forced transfer of permissions, transferred permissions, permission transfer successful, permission transfer failed), and the device's level (Center OCC or Station STA).
[0074] The requesting workstation initiates a permission transfer request to the requesting server's permission service module. Upon receiving the permission transfer request, the requesting server's permission service module writes the permission transfer request into the consistency data coordination server. After receiving the permission transfer request return message from the consistency data coordination server in observer mode, the module updates the relevant information in the requesting real-time database. The requesting workstation obtains the result of the permission transfer request through the subscription point push of the requesting real-time database.
[0075] The receiving server permission service module receives updates to permission information within the consistency data coordination server in observer mode. After obtaining permission transfer request information, it updates relevant information in the receiving real-time database. The receiving workstation obtains permission transfer request information through the subscription point push of the receiving real-time database and displays it to the user. The user inputs the return message of the permission transfer request through the receiving workstation, and the receiving workstation then sends the return message of the permission transfer request to the receiving server permission service module. Based on the return message of the permission transfer request, the receiving server permission service module updates the status of the permission transfer request in the consistency data coordination server and synchronously updates the status of the permission transfer request and the current permission holder in the receiving real-time database.
[0076] Based on the aforementioned permission transfer system for integrated monitoring systems, this embodiment discloses a manual permission transfer method for integrated monitoring systems, comprising the following steps:
[0077] S1. Based on the permission transfer request message from the requesting workstation, the requesting server permission service module writes the permission transfer request into the consistency data coordination server.
[0078] S2. The receiving server permission service module obtains the permission transfer request from the consistency data coordination server and enables the receiving workstation to obtain the permission transfer request through the receiving real-time library; the receiving workstation sends a return message to the receiving server permission service module, thereby the receiving server permission service module writes the return message into the consistency data coordination server;
[0079] S3. The requesting server permission service module obtains the returned message from the consistency data coordination server and updates the device permission information in the requesting real-time database according to the returned message. Thus, the requesting workstation updates the permission transfer request status and permission owner according to the updated information in the requesting real-time database.
[0080] Step S1 specifically includes the following steps:
[0081] S11. The requesting party's server permission service module records the device permission owner in the requesting party's real-time database.
[0082] Specifically, the requester server permission service module reads the current permission holder information of each device from the consistency data coordination server and stores it in the requester real-time database;
[0083] S12. The requesting workstation selects the device whose permissions need to be transferred and sends a permission transfer request message to the permission service module of the requesting server.
[0084] The requester's real-time library provides a graphical interface for querying the requester's workstation, enabling the requester's workstation to obtain the current permission owner information of the device; after the user selects the device whose permissions need to be transferred on the interface of the requester's workstation, the requester's workstation sends the corresponding permission transfer request message to the permission service module of the requester's server.
[0085] In this system, multiple devices requiring permission transfer can be selected at once on the requesting workstation. However, it's important to note that a permission transfer request message will only be successfully generated if all selected devices' current permission holders belong to the receiving party. For example, when the OCC (Organization Center) is the requesting party, on the OCC's permission transfer request interface, if one or more of the selected devices have OCC as their current permission holder, the request button will be unselectable (grayed out). If all selected devices have station-side permission holders, the request button will be enabled. Conversely, when the STA (Station Station) is the requesting party, the request button will only be enabled if all selected devices on the station workstation have OCC as their current permission holders; otherwise, it will be grayed out.
[0086] Furthermore, in step S12, before the user selects the device for which permissions need to be transferred on the requesting workstation, the requesting workstation also verifies the user's operating permissions to ensure that the user requesting permission transfer has the necessary operating permissions. Since different user roles in the system have different operating permissions, to ensure the professionalism and security of the operation, only users with certain permissions are allowed to execute permission transfer requests on the requesting workstation.
[0087] S13. The requesting server permission service module parses and verifies the permission transfer request information. After the verification is successful, it writes the request information to the consistency data coordination server.
[0088] Specifically, after receiving the permission transfer request message from the requesting workstation, the requesting server permission service module parses it and verifies whether all devices involved in the permission transfer request message meet the permission transfer judgment conditions. Its specific verification logic is as follows: it determines whether the network connection between the requesting party, the receiving party, and the consistency data coordination server is normal. In this embodiment, the requesting server permission service module determines in the requesting party's real-time database whether the device requesting the transfer of permission is in a state where permissions can be transferred, i.e., whether "TransferEnable" is in a valid state. Specifically, when the requesting server permission service module confirms in the consistency data coordination server that the receiving party's heartbeat timestamp is updated normally, and the requesting server permission service module's heartbeat information is updated and sent normally, it will set "TransferEnable" to a valid state "1".
[0089] If the verification passes, the requesting server's permission service module writes the permission transfer request and corresponding time into the permission information of the corresponding device in the consistency data coordination server, and simultaneously updates the permission status of the corresponding device in the requesting real-time database to the request status. In this embodiment, if the verification passes, the requesting server's permission service module sets the "phase" in the permission information of the corresponding device in the consistency data coordination server to 1 to indicate a request for transfer, and updates the "time" to the current timestamp; and updates the status flag of the corresponding device's permission information in the requesting real-time database to the request status.
[0090] If the verification fails, the requesting server's permission service module sends an error message to the requesting workstation.
[0091] Step S2 specifically includes the following steps:
[0092] S21. The receiving server permission service module, in observer mode, obtains the permission transfer request pushed by the consistency data coordination server, and updates the corresponding device permission status to the requested status in the receiving real-time database according to the permission transfer request.
[0093] The Observer pattern is a software design pattern where observers (also called subscribers) are interested in the state changes of an observed object. They register with the observed object and receive a notification when the observed object's state changes, then take appropriate action. In this step, the receiving server's permission service module is the observer, and the consistency data coordination server is the observed object.
[0094] S22. The receiving workstation obtains the permission transfer request message through the push of the receiving real-time library subscription point and displays it on the receiving workstation interface, while providing two options for the user to accept and reject.
[0095] The subscription point refers to an identifier registered by the receiving workstation on the receiving real-time database. Through this subscription point, the receiving workstation and the receiving real-time database are associated so that the receiving workstation can receive a notification when the status of the receiving real-time database changes.
[0096] S23. When the receiving workstation receives a return message for receiving permission transfer request or rejecting permission transfer request, the return message is sent to the receiving server permission service module through the receiving server network service module.
[0097] The receiver server network service module is a network module within the receiver server that provides network connectivity with other servers.
[0098] Furthermore, after receiving the return message, the receiving server network service module first writes it into a pipe message, and then sends it to the receiving server permission service module through the pipe message.
[0099] S24. The receiving server permission service module receives and parses the returned message. Based on the returned message, it writes the permission information of the corresponding device in the consistency data coordination server into the permission transfer request information and either accepts or rejects the returned message. At the same time, it writes the writing time of the returned message, updates the permission owner of the corresponding device in the consistency data coordination server, and updates the permission status of the corresponding device in the receiving real-time database to accept or reject.
[0100] In this embodiment, if the returned message is "accepted," the "phase" in the permission information of the corresponding device in the consistency data coordination server is set to 2, the "time" is updated to the current timestamp, the permission holder (i.e., the requester) of the corresponding device in the consistency data coordination server is updated, and the status flag of the permission information of the corresponding device in the receiver's real-time database is updated to "accepted." If the returned message is "rejected," the "phase" in the permission information of the corresponding device in the consistency data coordination server is set to 3, the "time" is updated to the current timestamp, the permission holder (i.e., still the receiver) of the corresponding device in the consistency data coordination server is retained, and the status flag of the permission information of the device in the receiver's real-time database is updated to "rejected."
[0101] Furthermore, in step S2, a waiting time limit is set for the receiving server's permission service module. If the receiving server's permission service module does not receive a return message from the receiving workstation regarding the permission transfer request after the waiting time limit has expired, it is considered a timeout and the permission transfer request is directly rejected. Step S24 then continues. Figure 2 As shown, the receiving server permission service module writes the permission information of the corresponding device in the consistency data coordination server and returns a message indicating acceptance or rejection for the permission transfer request. At the same time, it writes the writing time of the returned message and updates the permission status of the corresponding device in the receiving real-time database to the rejection status.
[0102] Step S3 specifically includes the following steps:
[0103] S31. The requesting server permission service module, in observer mode, obtains the return message of the permission transfer request pushed by the consistency data coordination server, and updates the corresponding device permission status in the requesting real-time database to the accept or reject status according to the return message, and then clears the permission transfer request information in the consistency data coordination server; at the same time, it will also receive the device permission owner change push pushed by the consistency data coordination server, and update the corresponding device permission owner in the requesting real-time database.
[0104] In this step, the requesting server's permission service module acts as the observer, and the consistency data coordination server is the observed object.
[0105] S32. The requesting workstation updates the status (accepted or rejected) of the permission transfer request through the push from the requesting real-time library subscription point. If it is accepted, the device permission owner is updated in the requesting workstation. If it is rejected, the previous device permission owner is retained in the requesting workstation.
[0106] The above manual permission transfer method requires that the network connections between the station, the center, and the consistency data coordination server are all normal. That is, both the station and the center can send heartbeat information to the consistency data coordination server normally.
[0107] For the aforementioned permission transfer system used in the integrated monitoring system, during initial startup, the requesting server permission service module and the receiving server permission service module load the initialization file according to the default permission allocation method and update the initial permission information to the consistency data coordination server. After the initialization work is completed, no further initialization tasks are performed. The requesting server permission service module and the receiving server permission service module then update the permission transfer information on the consistency data coordination server according to the aforementioned permission transfer process, and obtain the updated information from the consistency data coordination server in observer mode.
[0108] In the manual permission transfer method described above for the integrated monitoring system, the permission transfer process uses an asynchronous method. That is, during the permission transfer process of one device, the permission transfer process of other devices can be carried out simultaneously without waiting for the result of the previous device transfer request. Therefore, the operations between workstation nodes do not interfere with each other, and permission transfers can be carried out on different devices multiple times in a row without blocking and waiting for the permission transfer result to return, thus improving work efficiency.
[0109] Based on the aforementioned permission transfer system for integrated monitoring systems, this embodiment also discloses a forced permission transfer method for integrated monitoring systems, used for the central system to forcibly reclaim equipment permissions from stations, such as... Figure 3 As shown, the method includes the following steps:
[0110] S1. Select the device whose permissions need to be forcibly revoked on the interface of the central workstation, so that the central workstation sends a forced revocation permission message to the central server permission service module.
[0111] In this embodiment, a forced revocation permission message can only be successfully generated when all the current permission owners of the selected devices belong to the station. If the selected devices include the device centered on the current permission owner, the forced revocation button on the interface will be unselectable, for example, grayed out.
[0112] S2. The central server permission service module parses the forced revocation permission message sent by the central workstation, and then directly modifies the permission owner to the center in the permission information of the corresponding device in the consistency data coordination server. At the same time, it updates the permission owner of the corresponding device to the center in the central real-time database.
[0113] S3. The station server permission service module uses the observer pattern to obtain the message of permission owner modification pushed by the consistency data coordination server, thereby updating the permission owner of the corresponding device in the station real-time database. Then, the station workstation updates the permission owner of the corresponding device through the push of the station real-time database subscription point.
[0114] Based on the aforementioned permission transfer system for integrated monitoring systems, this embodiment also discloses an automatic permission transfer method for integrated monitoring systems, used to automatically transfer device permissions when network anomalies occur. The method determines whether a network anomaly exists through heartbeat information and includes the following steps:
[0115] When there is a network anomaly between the station and the consistency data coordination server, such as Figure 4 As shown, device control permissions are automatically transferred. If the current device permission owner is the station, the device permission will be automatically transferred to the center. If the current device permission owner is the center, the device permission will be retained. Specifically: when the station server loses connection with the consistency data coordination server and fails to reconnect, the station server permission service module updates the device permissions in the station's real-time database, updating the permission owner of the device currently controlling the device at the station to the center. Thus, the station workstation updates the permission owner of the corresponding device to the center through the push from the station's real-time database subscription point. When the central server determines through heartbeat information that the station server has lost connection with the consistency data coordination server, the central server permission service module updates the device permission owner in the central real-time database. If the current permission owner of the device is the station, its permission owner is changed to the center. Thus, the central workstation updates the permission owner of the corresponding device to the center through the push from the central real-time database subscription point. The central server permission service module also updates the device permission owner of the corresponding device in the consistency data coordination server.
[0116] When a network anomaly occurs between the central server and the consistency data coordination server, such as Figure 5As shown, device control permissions are automatically transferred. If the current device permission owner is the center, the device permission will be automatically transferred to the station. If the current device permission owner is the station, the device permission will be retained. Specifically: When the station server determines through heartbeat information that the center server has lost connection with the consistency data coordination server, the station server permission service module updates the device permissions in the station's real-time database, updating the permission owner of the device currently controlled by the center to the station. Thus, the station workstation updates the permission owner of the corresponding device to the station through the push from the station's real-time database subscription point. The station server permission service module also updates the device permission owner of the corresponding device to the station in the consistency data coordination server. When the center server loses network connection with the consistency data coordination server and fails to reconnect, the center server permission service module updates the device permission owner in the center's real-time database. If the current permission owner of the device is the center, its permission owner is changed to the station. If the current permission owner is the station, it is retained. Thus, the center workstation updates the permission owner of the corresponding device through the push from the center's real-time database subscription point.
[0117] When the service of the consistency data coordination server fails, such as Figure 6 As shown, device control permissions are automatically transferred according to a predefined initialization file. Specifically, when an error occurs while the station and central servers are writing information to the consistency data coordination server, the permission service modules of the central and station servers update the device control permissions in the real-time databases of the central and station servers respectively according to the default permissions in the predefined initialization file. Thus, each workstation updates the corresponding device's permission owner through the push from the real-time database subscription point, enabling the central and station servers to control the devices according to the predefined initialization file. The predefined initialization file is a file pre-installed in the central server and station server, which records the default permission allocation method.
[0118] It should be noted that when only a short-term (instantaneous) server environment or network communication interference occurs, the control of the equipment will not be automatically transferred. The station server determines whether the interference is short-term.
[0119] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A permission transfer system for an integrated monitoring system, used to transfer equipment permissions between a central control center and a station, characterized in that, include: The requester, the consistency data coordination server, and the receiver; The requesting party has a requesting party workstation and a requesting party server. The requesting party server has a requesting party server permission service module and a requesting party real-time database. The recipient has a recipient workstation and a recipient server. The recipient server includes a recipient server permission service module and a recipient real-time database. The requester workstation and the requester server, the recipient workstation and the recipient server, the requester server and the consistency data coordination server, and the recipient server and the consistency data coordination server communicate via network. The consistency data coordination server stores permission information. The requester server permission service module and the recipient server permission service module are also used to write updates to the permission information into the consistency data coordination server. Furthermore, the requester server permission service module and the recipient server permission service module are used to receive updates to the permission information pushed by the consistency data coordination server in observer mode, thereby obtaining updates to the permission information written by other parties. The requester workstation is used to initiate permission transfer requests to the requester server permission service module. The requesting workstation also obtains the result of the permission transfer request through the requesting real-time database; the receiving workstation obtains the permission transfer request information through the receiving real-time database. The receiving workstation also sends the return message of the permission transfer request to the permission service module of the receiving server.
2. The access control system for a comprehensive monitoring system as described in claim 1, characterized in that, The requester's real-time database and the receiver's real-time database record the permission holders and permission status of each device. The requester server permission service module and the receiver server permission service module are also used to update the permission owner and device permission status of the device in the requester real-time database and the receiver real-time database, respectively.
3. The access control system for a comprehensive monitoring system as described in claim 1, characterized in that, The permission information includes the group number, node number, heartbeat information, permission transfer process, and device permission owner of the server and workstation; the requesting server and the receiving server refresh the heartbeat information at a certain frequency and send it to the consistency data coordination server, and the consistency data coordination server saves the heartbeat information of the requesting party and the receiving party in the form of a timestamp. The server permission service modules for both the requester and the receiver also obtain the timestamp of the other party's heartbeat information from the consistency data coordination server to determine whether the other party's network connection is normal.
4. A manual permission transfer method for an integrated monitoring system, based on the permission transfer system for an integrated monitoring system according to any one of claims 1-3, characterized in that, When the network connections between the station, the center, and the consistency data coordination server are all normal, the manual permission transfer method for the integrated monitoring system includes: S1, based on the permission transfer request message from the requesting workstation, the requesting server permission service module writes the permission transfer request into the consistency data coordination server; S2, the receiving server permission service module obtains the permission transfer request from the consistency data coordination server, and enables the receiving workstation to obtain the permission transfer request through the receiving real-time database, then the receiving workstation sends a return message to the receiving server permission service module, and the receiving server permission service module writes the return message into the consistency data coordination server; S3, the requesting server permission service module obtains the return message from the consistency data coordination server, and updates the device information in the requesting real-time database according to the return message, so that the requesting workstation updates the permission transfer request status and permission owner according to the updated information in the requesting real-time database; wherein, the requesting party is the center or the station, and the receiving party is the station or the center.
5. The manual permission transfer method for an integrated monitoring system as described in claim 4, characterized in that, Step S1 specifically includes: S11, the requesting server permission service module records the device permission owner in the requesting real-time database; S12, the requesting real-time database provides a graphical interface to the requesting workstation, enabling the requesting workstation to obtain device permission owner information; the user selects the device whose permissions need to be transferred on the requesting workstation and sends a permission transfer request message to the requesting server permission service module; S13, the requesting server permission service module parses and verifies the permission transfer request message, and after successful verification, writes the permission transfer request to the consistency data coordination server.
6. The manual permission transfer method for an integrated monitoring system as described in claim 5, characterized in that, In step S12, before the user selects the device for which permissions need to be transferred at the requesting workstation, the requesting workstation verifies the user's operating permissions to ensure that the user requesting permission transfer has the necessary operating permissions.
7. The manual permission transfer method for an integrated monitoring system as described in claim 5, characterized in that, In step S13, after the verification is successful, the requesting server permission service module writes the permission information of the corresponding device in the consistency data coordination server into the permission transfer request and the corresponding time, and at the same time updates the permission status of the corresponding device in the requesting real-time database to the request status.
8. The manual permission transfer method for an integrated monitoring system as described in claim 5, characterized in that, Step S2 specifically includes: S21, the receiving server permission service module, in observer mode, obtains the permission transfer request pushed by the consistency data coordination server, and updates the corresponding device permission status to the request status in the receiving real-time database according to the permission transfer request; S22, the receiving workstation obtains the permission transfer request message through the push of the receiving real-time database subscription point and displays it on the receiving workstation interface, providing both accept and reject options; S23, when the receiving workstation receives a return message indicating whether to accept or reject the permission transfer request, it sends the return message to the receiving server permission service module; S24, the receiving server permission service module receives and parses the return message, writes the permission information of the corresponding device in the consistency data coordination server into the return message of the permission transfer request, updates the permission owner of the corresponding device in the consistency data coordination server, writes the writing time of the return message, and updates the device permission status in the receiving real-time database accordingly.
9. The manual permission transfer method for an integrated monitoring system as described in claim 8, characterized in that, Step S3 specifically includes: S31, the requesting server's permission service module, in observer mode, obtains the return message pushed by the consistency data coordination server, and updates the device permission status in the requesting party's real-time database accordingly based on the return message, and then clears the permission transfer request information in the consistency data coordination server; at the same time, it will also receive the device permission owner change push pushed by the consistency data coordination server, and update the device permission owner accordingly in the requesting party's real-time database; S32, the requesting party workstation updates the status of the permission transfer request through the push from the requesting party's real-time database subscription point, and updates the device permission owner accordingly in the requesting party workstation.
10. The manual permission transfer method for an integrated monitoring system as described in claim 4, characterized in that, During the permission transfer process of one device, the permission transfer process of other devices is carried out simultaneously.
11. A method for mandatory permission transfer in an integrated monitoring system, based on the permission transfer system for an integrated monitoring system as described in any one of claims 1-3, characterized in that, include: S1. Select the device whose permissions need to be forcibly revoked on the interface of the central workstation, so that the central workstation sends a forced revocation permission message to the central server permission service module; S2. The central server permission service module parses the forced revocation permission message sent by the central workstation, and then directly modifies the device permission owner to the center in the corresponding device permission information in the consistency data coordination server. At the same time, it updates the device permission owner to the center in the central real-time database. S3. The station server permission service module, in observer mode, obtains the permission owner modification message pushed by the consistency data coordination server, and updates the corresponding device permission owner to the center in the station real-time database. Then, the station workstation updates the device permission owner to the center through the push from the station real-time database subscription point.
12. An automatic permission transfer method for an integrated monitoring system, based on the permission transfer system for an integrated monitoring system according to any one of claims 1-3, for automatically transferring device permissions in the event of network anomalies, characterized in that, include: When a network anomaly occurs between the station and the consistency data coordination server, device control permissions are automatically transferred to the central authority. Specifically: when the station server loses connection with the consistency data coordination server and attempts to reconnect fail, the station server permission service module updates the device permissions in the station's real-time database, updating the central authority to the current device control owner at the station. This allows station workstations to update the corresponding device control owner to the central authority via push notifications from the station's real-time database subscription points. When the central server determines through heartbeat information that the station server has lost connection with the consistency data coordination server, the central server permission service... The module updates the device permission owner in the central real-time database. If the current permission owner of a device is the station, its permission owner is changed to the center. The central workstation then updates the corresponding device's permission owner to the center via push notifications from the central real-time database subscription point. The central server permission service module also updates the corresponding device permission owner in the consistency data coordination server. When a network anomaly occurs between the center and the consistency data coordination server, device control permissions are automatically transferred to the station. Specifically, when the station server determines through heartbeat information that the central server and the consistency data coordination server have lost connection, the station server permission service module... The block updates the device permissions in the station's real-time database, updating the permission owner of the device currently controlled by the central authority to the station. Thus, the station workstation updates the corresponding device permission owner to the station via push notifications from the station's real-time database subscription points. The station server's permission service module also updates the corresponding device permission owner to the station in the consistency data coordination server. When the central server loses network connection with the consistency data coordination server and attempts to reconnect fail, the central server's permission service module updates the device permission owner in the central real-time database. If the current permission owner of the device is the central authority, its permission owner is changed to the station; otherwise, it is changed to the station. At the station, the permissions remain unchanged, and the central workstation updates the corresponding device permission holders through push notifications from the central real-time database subscription points. When the service of the consistency data coordination server malfunctions, device control permissions are automatically transferred. Specifically, when the station server and the central server encounter errors while writing information to the consistency data coordination server, the central permission service module and the station server permission service module update the device control permissions in the central real-time database and the station real-time database respectively according to the default permissions in the predefined initialization file. Thus, the central workstation and the station workstation update the corresponding device permission holders through push notifications from the central real-time database and the station real-time database subscription points respectively.
Citation Information
Patent Citations
Method for handing over control authority in distributed monitoring system
CN101661281A