Search

CN-122002222-A - Method, device, medium, apparatus and program product for determining communication master node

CN122002222ACN 122002222 ACN122002222 ACN 122002222ACN-122002222-A

Abstract

The application belongs to the technical field of control, and particularly relates to a method, a device, a medium, equipment and a program product for determining a communication master node. The method comprises the steps of obtaining current self-node information and preset conditions of a target node, obtaining current other node information sent by other nodes from a communication terminal, determining whether the target node meets the preset conditions according to the current self-node information and the current other node information, and determining the target node to be a communication master node when the target node meets the preset conditions. Each node distributed computation decides own master-slave state, creatively provides a closed-loop control management technology, avoids the problem that the account authority is possibly stolen and the account information is maintained in the prior art to bring additional expense, and only allows one software node to issue execution commands in the using process.

Inventors

  • HUANG KEQING
  • XU YIJING
  • SHI YU
  • ZHAO ANFENG
  • BAO XUHONG
  • TANG JUNTONG

Assignees

  • 株洲中车时代电气股份有限公司

Dates

Publication Date
20260508
Application Date
20241105

Claims (10)

  1. 1. A method for determining a communication master node, comprising: Acquiring current self-node information of a target node and preset conditions; acquiring current node information of other nodes sent by other nodes from a communication terminal; Determining whether the target node meets a preset condition according to the current self-node information and the current node information; And when the target node meets the preset condition, determining that the target node is a communication master node.
  2. 2. The method of claim 1, wherein the current self-node information comprises a current self-node start-up duration, wherein the current self-node information comprises a current node state of the node, and wherein the determining whether the target node satisfies a preset condition based on the current self-node information and the current self-node information comprises: determining the number of communication master nodes with the current node state as the communication master node according to the current node state of each node; determining whether the target node meets the preset condition according to the number of the communication master nodes and the starting duration of the self nodes; And when the self-node starting time is longer than or equal to a preset time and the number of the communication master nodes is 0, determining that the target node meets the preset condition.
  3. 3. The method of claim 1, wherein the current self-node information includes self-node ID information, wherein the current node information includes control transfer information, wherein the determining whether the target node satisfies a preset condition based on the current self-node information and the current node information further includes: determining target ID information according to the control right transfer information; Determining whether the target node meets a preset condition according to the target ID information and the self-node ID information; And when the target ID information is the same as the self-node ID information, determining that the target node meets the preset condition.
  4. 4. A method according to claim 2 or 3, characterized in that the method further comprises: When the number of the nodes is 1, acquiring the self-node state of the target node; and when the self node state is the communication master node, sending out a communication master node conflict warning.
  5. 5. The method according to claim 4, wherein the method further comprises: when the self-node state is a communication slave node, determining that the target node is the communication slave node; and locking the control interface of the target node.
  6. 6. A method according to claim 3, characterized in that the method further comprises: When the target ID information and the self-node ID information are different, acquiring the self-node state of the target node; and when the self node state is the communication master node, sending out a communication master node conflict warning.
  7. 7. A communication master node determining apparatus, comprising: The first acquisition module is used for acquiring current self-node information of the target node and preset conditions; The second acquisition module is used for acquiring current node information of other nodes sent by the other nodes from the communication terminal; the first judging module is used for determining whether the target node meets preset conditions according to the current self-node information and the current node information; and the first determining module is used for determining that the target node is a communication master node when the target node meets the preset condition.
  8. 8. A computer electronic production device comprising a memory, a processor and a computer program stored on the memory, the processor executing the computer program to carry out the steps of the method of any one of claims 1 to 6.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, realizes the steps of the method according to any one of claims 1 to 6.

Description

Method, device, medium, apparatus and program product for determining communication master node Technical Field The invention belongs to the technical field of control, and particularly relates to a method, a device, a medium, equipment and a program product for determining a communication master node. Background Multicast technology refers to a network communication in which a single sender corresponds to multiple receivers. By transmitting a single information stream to multiple receivers, network traffic with multiple receivers listening or viewing the same resource at the same time can be reduced. In the existing multicast technology, a control end, a communication end and an execution end form a local area network. The control terminal is used for sending the self node information and the control information to the multicast domain and receiving the node information, the communication terminal is used for carrying out data transmission and distribution according to the address information of the multicast data message, and the execution terminal is used for executing the control command according to the multicast data. When the same control software with a plurality of workstations in a local area network runs, that is, a plurality of control terminals exist, control commands issued by a plurality of control terminals may collide (the situation that the previous command is issued at the same time or the other node is not executed yet and a new command is triggered at the same time) and the execution terminal can be caused to execute disorder. Disclosure of Invention In view of the above technical problems, the present application provides a method, an apparatus, a medium, a device, and a program product for determining a communication master node. The method comprises the steps of obtaining current self-node information and preset conditions of a target node, obtaining current other node information sent by other nodes from a communication terminal, determining whether the target node meets the preset conditions according to the current self-node information and the current other node information, and determining the target node to be a communication master node when the target node meets the preset conditions. Each node distributed computation decides own master-slave state, creatively provides a closed-loop control management technology, avoids the problem that the account authority is possibly stolen and the account information is maintained in the prior art to bring additional expense, and only allows one software node to issue execution commands in the using process. In order to solve the technical problems, the technical scheme provided by the invention comprises five aspects. In a first aspect, the application provides a method for determining a communication master node, which comprises the steps of obtaining current self-node information and preset conditions of a target node, obtaining current node information of other nodes sent by the other nodes from a communication terminal, determining whether the target node meets the preset conditions according to the current self-node information and the current node information, and determining the target node as the communication master node when the target node meets the preset conditions. In some embodiments, the current self-node information comprises a current self-node starting time length, the current self-node information comprises a current node state of a self-node, the determining whether the target node meets preset conditions according to the current self-node information and the current self-node information comprises determining the number of communication master nodes with the current node state being a communication master node according to the current node states of all the self-nodes, determining whether the target node meets the preset conditions according to the number of the communication master nodes and the self-node starting time length, wherein the time length is greater than or equal to the preset time length when the self-node is started, and determining that the target node meets the preset conditions when the number of the communication master nodes is 0. In some embodiments, the current self-node information comprises self-node ID information, the current self-node information comprises control right transfer information, the method for determining whether the target node meets preset conditions according to the current self-node information and the current self-node information further comprises determining target ID information according to the control right transfer information, and determining whether the target node meets preset conditions according to the target ID information and the self-node ID information, wherein when the target ID information is identical to the self-node ID information, the target node is determined to meet the preset conditions. In some embodiments, the method further comprises obtaining a