Method and device for determining communication master node, medium, equipment and program product

By acquiring information about the target node and other nodes, and using distributed computing to determine the communication master node, the problem of control command conflicts within the local area network is solved, achieving stable and secure single-source control.

CN122002222APending Publication Date: 2026-05-08ZHUZHOU CSR TIMES ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHUZHOU CSR TIMES ELECTRIC CO LTD
Filing Date
2024-11-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

When multiple workstations on a local area network run the same control software, control commands issued by multiple control terminals may conflict, leading to execution disorder on the execution terminal.

Method used

By acquiring the target node's self-node information and other node information, the system determines whether the target node meets the conditions to become a communication master node based on preset conditions. Distributed computing is used to determine the master-slave status of each node, and closed-loop control management technology is used to avoid account permission theft and the additional overhead of account information maintenance.

Benefits of technology

This allows only one software node to execute commands within the local area network, avoiding control command conflicts and ensuring the stability and security of execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122002222A_ABST
    Figure CN122002222A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of control, and particularly relates to a method and device for determining a communication master node, a medium, equipment and a program product. The method comprises the following steps: acquiring current self-node information of a target node and a preset condition; acquiring current other node information sent by other nodes from the communication end; determining whether the target node meets a preset condition according to the current self-node information and the current other-node information; and when the target node satisfies the preset condition, determining that the target node is a communication master node. Each node determines own master-slave state through distributed calculation, a closed-loop control management technology is innovatively provided, the situation that a traditional mode is likely to be stolen through account authority and extra expenses are brought by account information maintenance is avoided, and only one software node is allowed to issue an execution command in the using process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of control technology, specifically relating to a method, apparatus, medium, device, and program product for determining a communication master node. Background Technology

[0002] Multicast technology refers to a network communication method where a single sender corresponds to multiple receivers. By transmitting a single information stream to multiple receivers, network communication traffic can be reduced when multiple receivers are simultaneously listening to or viewing the same resource.

[0003] Existing multicast technology consists of a control terminal, a communication terminal, and an execution terminal forming a local area network. The control terminal sends its own node information and control information to the multicast domain, while also receiving information from other nodes; the communication terminal transmits and distributes data according to the multicast data packet address information; and the execution terminal executes control commands based on the multicast data.

[0004] When multiple workstations on a local area network are running the same control software, i.e., when there are multiple control terminals, the control commands issued by the multiple control terminals may conflict (such as being issued simultaneously or another node triggering a new command before the previous command is executed, which will cause execution disorder at the execution terminal). Summary of the Invention

[0005] To address the aforementioned technical problems, this invention proposes a method, apparatus, medium, device, and program product for determining a communication master node. This application obtains the target node's current self-node information and preset conditions; obtains current other-node information sent by other nodes from the communication terminal; determines whether the target node meets the preset conditions based on the current self-node information and the current other-node information; and determines the target node as the communication master node when the target node meets the preset conditions. Each node determines its master-slave state through distributed computing, innovatively proposing a closed-loop control management technology. This avoids the potential for account permission theft and the additional overhead of account information maintenance associated with traditional methods, ensuring that only one software node is allowed to issue execution commands during the usage process.

[0006] To solve the above-mentioned technical problems, the technical solution provided by the present invention includes five aspects.

[0007] In a first aspect, this application provides a method for determining a communication master node, comprising: obtaining the target node's own current self-node information and preset conditions; obtaining the current other-node information sent by other nodes from the communication terminal; determining whether the target node meets the preset conditions based on the current self-node information and the current other-node information; and determining the target node as a communication master node when the target node meets the preset conditions.

[0008] In some embodiments, the current self-node information includes: the current self-node startup duration; the current other-node information includes: the current node status of other nodes; determining whether the target node meets the preset condition based on the current self-node information and the current other-node information includes: determining the number of communication master nodes whose current node status is a communication master node based on the current node status of each other node; determining whether the target node meets the preset condition based on the number of communication master nodes and the self-node startup duration; wherein, when the self-node startup duration is greater than or equal to the preset duration and the number of communication master nodes is 0, it is determined that the target node meets the preset condition.

[0009] In some embodiments, the current self-node information includes: self-node ID information; the current other-node information includes: control transfer information; determining whether the target node meets the preset conditions based on the current self-node information and the current other-node information further includes: determining target ID information based on the control transfer information; determining whether the target node meets the preset conditions based on the target ID information and the self-node ID information; wherein, when the target ID information is the same as the self-node ID information, it is determined that the target node meets the preset conditions.

[0010] In some embodiments, the method further includes: when the number of other nodes is 1, obtaining the self-node status of the target node; when the self-node status is a communication master node, issuing a communication master node conflict warning.

[0011] In some embodiments, the method further includes: when the self-node is in the state of a communication slave node, determining that the target node is a communication slave node; and locking the control interface of the target node.

[0012] In some embodiments, the method further includes: when the target ID information and the self-node ID information are different, obtaining the self-node status of the target node; when the self-node status is a communication master node, issuing a communication master node conflict warning.

[0013] Secondly, this application proposes a device for determining a communication master node, comprising: a first acquisition module for acquiring the current self-node information of the target node and preset conditions; a second acquisition module for acquiring the current other-node information sent by other nodes from the communication terminal; a first judgment module for determining whether the target node meets the preset conditions based on the current self-node information and the current other-node information; and a first determination module for determining the target node as a communication master node when the target node meets the preset conditions.

[0014] Thirdly, this application proposes a computer electronic production apparatus, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the methods described in the first aspect.

[0015] Fourthly, this application proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0016] Fifthly, this application proposes a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0017] The beneficial effects of this invention are as follows: This application obtains the target node's current self-node information and preset conditions; obtains the current other-node information sent by other nodes from the communication terminal; determines whether the target node meets the preset conditions based on the current self-node information and the current other-node information; and determines the target node as the communication master node when the target node meets the preset conditions. Each node determines its master-slave state through distributed computing, innovatively proposing a closed-loop control management technology. This avoids the potential for account permission theft and the additional overhead of account information maintenance in traditional methods, ensuring that only one software node is allowed to issue execution commands during the usage process. Attached Figure Description

[0018] The scope of this disclosure can be better understood by reading the following detailed description of exemplary embodiments in conjunction with the accompanying drawings. The accompanying drawings are:

[0019] Figure 1 The main flowchart of a method for determining a communication master node provided in an embodiment of this application;

[0020] Figure 2 A logical block diagram of a method for determining a communication master node provided in an embodiment of this application;

[0021] Figure 3 This is a main structural block diagram of a communication master node determination device provided in an embodiment of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0024] If the application documents contain similar descriptions such as "first, second, third", the following explanation shall be added: In the following description, the terms "first, second, third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0026] Example 1:

[0027] In the existing technology, when multiple workstations in a local area network are running the same standalone software (CS software mode), the control commands issued by multiple node software may conflict (such as being issued at the same time or another node triggering a new command before the previous command is executed), which will lead to execution disorder.

[0028] To address the problems existing in the current technology, such as Figure 1 As shown, this application provides a method for determining a communication master node. This method is applied to electronic production equipment, which can be a server, mobile terminal, computer, cloud platform, etc. The data processing functionality provided in this application embodiment can be implemented by the processor of the electronic production equipment calling program code, wherein the program code can be stored in a computer storage medium. The method for determining the communication master node includes:

[0029] Step S1: Obtain the target node's current self-node information and preset conditions.

[0030] Step S2: Obtain the current other node information sent by other nodes from the communication end.

[0031] A local area network (LAN) includes an execution device, a communication terminal, and multiple nodes. The master node can control the execution device through the communication terminal, and each node has the potential to become the master node. These nodes continuously send node information to the communication terminal. Therefore, from the perspective of a single node, the node information sent by that node is called self-node information, while the node information sent by other nodes is called other-node information. Each node also receives other-node information from other nodes, using this information and its own node information to determine whether it can become the master node. The information exchange between multiple nodes forms a multicast domain. The node information sent by each node includes: node ID information, node status information, control transfer information, node startup duration, and control commands. The node status information includes two states: master node and slave node. Only the master node can issue control commands. However, the above information alone is insufficient to determine the node status of each node. Therefore, this application also presets conditions, allowing each node to compete for master status based on these conditions.

[0032] In this application, any node is used as the target node. For a target node to determine whether it can become the communication master node, it needs to obtain the current other node information of other nodes and its own current self node information. The current other node information needs to be obtained from the communication end, i.e., the multicast domain.

[0033] Step S3: Determine whether the target node meets the preset conditions based on the current self node information and the current other node information.

[0034] In some embodiments, step S3, "determining whether the target node meets the preset conditions based on the current self-node information and the current other-node information," includes:

[0035] Step S31: Determine the number of communication master nodes whose current node status is a communication master node based on the current node status of each other node.

[0036] Step S32: Determine whether the target node meets the preset conditions based on the number of communication master nodes and the startup time of the slave nodes.

[0037] Since only one node can control an execution device in this application, it is necessary to count the number of nodes in the other nodes whose status is that of a communication master node. Because short node startup times may lead to unstable connections or other issues, this application considers the node startup time during the master-competition process. Competition will only occur when both the startup time and the master-competition conditions are met. Therefore, in this application, the target node is determined as the communication master node when the number of communication master nodes in the other nodes is 0 and the startup time of the self-node is greater than or equal to 10 seconds. The self-node startup time refers to the time elapsed after the self-node has finished starting.

[0038] In some embodiments, besides multiple nodes competing for master status, a node can also be designated as the communication master node by other nodes. Therefore, step S3, "determining whether the target node meets the preset conditions based on the current self-node information and the current other-node information," further includes:

[0039] Step S33: Determine the target ID information based on the control transfer information.

[0040] Step S34: Determine whether the target node meets the preset conditions based on the target ID information and the self-node ID information.

[0041] Although node information normally includes control transfer information, this information is invalid when no control transfer occurs. It becomes valid only when a control transfer is required, and includes the target ID information designated as the communication master node. If the target ID matches the self-ID of the self-node, then the self-node is determined to be the communication master node.

[0042] Step S4: When the target node meets the preset conditions, the target node is determined to be the communication master node.

[0043] Therefore, in this application, when the slave node meets the startup duration condition and the number of communication master nodes among all other nodes is 0, the target node successfully competes for master status and becomes the communication master node. The target node can also be designated as the communication master node by other communication master nodes. After the target node becomes the communication master node, it will change the status information of the slave node from communication slave node to communication master node.

[0044] However, during the bidding process, multiple communication master nodes may exist simultaneously. Therefore, in some embodiments, the method further includes:

[0045] Step S51: When the number of other nodes is 1, obtain the self node status of the target node.

[0046] Step S52: When the self-node is in the state of a communication master node, issue a communication master node conflict warning.

[0047] In some embodiments, the method further includes:

[0048] Step S53: When the target ID information and the self-node ID information are different, obtain the self-node status of the target node.

[0049] Step S54: When the self-node is in the state of a communication master node, issue a communication master node conflict warning.

[0050] If the number of communication master nodes obtained directly is greater than or equal to 2, it indicates that a communication master node conflict has occurred, and a communication master node conflict warning needs to be issued. If the target node detects that the number of its own nodes is 1 or that the target ID information in the control transfer information is different from the node ID information, it will not directly determine that the own node is a communication slave node. It also needs to obtain the status of the own node. If the status of the own node is a communication master node, a communication master node conflict warning is issued. Although when the number of connected nodes is greater than or equal to 3, at least one node will be able to discover the existence of multiple communication master nodes, when the number of nodes is equal to 2, it is impossible to determine whether a communication master node conflict exists without confirming the status of the own node.

[0051] When a conflict occurs between communication master nodes, manual intervention is required to transfer control permissions, specifically transferring the permissions of certain communication master nodes to a single communication master node, thus ensuring that the communication master node is unique.

[0052] After determining that the target node is a communication slave node, the method further includes:

[0053] Step S61: When the self node is in the state of a communication slave node, determine that the target node is a communication slave node.

[0054] Step S62: Lock the control interface of the target node.

[0055] Since slave nodes do not have control over the execution device, their control interfaces need to be locked, while the control interface of master nodes is operable. Furthermore, for several conflicting master nodes, the control interfaces of those conflicting master nodes are also locked.

[0056] To better understand the logic for determining the communication master node and communication slave node in this application, such as Figure 2 As shown in the diagram, this application proposes a logical block diagram for determining the communication master node and communication slave nodes.

[0057] This invention addresses the single-source control technology in multi-node communication, primarily through two innovative aspects: 1) It employs multicast communication to exchange state information between nodes, with each node using distributed computing to determine its master-slave status. This innovatively proposes a closed-loop control management technology, avoiding the potential theft of account permissions and the additional overhead associated with account information maintenance in traditional methods; 2) The control transfer management design flexibly allocates the master-slave status of each node in the multicast domain as needed, meeting the requirements of specific application scenarios.

[0058] Example 2:

[0059] Based on the foregoing embodiments, this application provides a device for determining a communication master node. The modules and units included in the device can be implemented by a processor in a computer device; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0060] like Figure 2 As shown, a device for determining a communication master node includes: a first acquisition module, a second acquisition module, a first judgment module, and a first determination module.

[0061] The first acquisition module is used to acquire the target node's current self-node information and preset conditions. The second acquisition module is used to acquire the current other-node information sent by other nodes from the communication terminal. The first judgment module is used to determine whether the target node meets the preset conditions based on the current self-node information and the current other-node information. The first determination module is used to determine the target node as the communication master node when the target node meets the preset conditions.

[0062] The modules in the aforementioned device for determining a communication master node can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor within the device in hardware form, or stored in the memory of the processing device in software form, so that the processor can call and execute the operations corresponding to each module. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division; in actual implementation, other division methods may be used.

[0063] Example 3:

[0064] Thirdly, this application provides a computer electronic production apparatus, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the methods described in the first aspect.

[0065] Example 4:

[0066] Fourthly, this application proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0067] Example 5:

[0068] Fifthly, this application proposes a computer program product, including a computer program / instructions, characterized in that, when the computer program is executed by a processor, it implements the steps of the method described in any one of the first aspects.

[0069] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0070] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0071] It should be noted that, in this document, 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 those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0072] In the several embodiments provided in this application, it should be understood that the disclosed production equipment and methods can be implemented in other ways. The production equipment embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces. The indirect coupling or communication connection of production equipment or units can be electrical, mechanical, or other forms.

[0073] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. They can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0074] Furthermore, in the various embodiments of this application, all functional units can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0075] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage production equipment, read-only memory (ROM), magnetic disks, or optical disks.

[0076] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage production equipment, ROM, magnetic disks, or optical disks.

[0077] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining a communication master node, characterized in that, include: Obtain the target node's current self-node information and preset conditions; Obtain current other node information sent by other nodes from the communication terminal; Based on the current self node information and the current other node information, determine whether the target node meets the preset conditions; When the target node meets the preset conditions, the target node is determined to be the communication master node.

2. The method according to claim 1, characterized in that, The current self-node information includes: the current self-node startup duration; the current other-node information includes: the current node status of other nodes; determining whether the target node meets the preset conditions based on the current self-node information and the current other-node information includes: The number of communication master nodes whose current node status is a communication master node is determined based on the current node status of each other node. Determine whether the target node meets the preset conditions based on the number of communication master nodes and the startup time of the slave nodes; Specifically, when the startup duration of the self-node is greater than or equal to a preset duration and the number of communication master nodes is 0, the target node is determined to meet the preset condition.

3. The method according to claim 1, characterized in that, The current self-node information includes: self-node ID information; the current other-node information includes: control transfer information; the step of determining whether the target node meets the preset conditions based on the current self-node information and the current other-node information further includes: Determine the target ID information based on the control transfer information; Determine whether the target node meets the preset conditions based on the target ID information and the self-node ID information; Specifically, when the target ID information is the same as the self-node ID information, the target node is determined to meet the preset condition.

4. The method according to claim 2 or 3, characterized in that, The method also includes: When the number of other nodes is 1, obtain the self node status of the target node; When the self-node is in the state of a communication master node, a communication master node conflict warning is issued.

5. The method according to claim 4, characterized in that, The method further includes: When the self-node status is a communication slave node, the target node is determined to be a communication slave node; The control interface of the target node is locked.

6. The method according to claim 3, characterized in that, The method further includes: When the target ID information and the self-node ID information are different, obtain the self-node status of the target node; When the self-node is in the state of a communication master node, a communication master node conflict warning is issued.

7. A device for determining a communication master node, characterized in that, include: The first acquisition module is used to acquire the target node's current self-node information and preset conditions. The second acquisition module is used to acquire current other node information sent by other nodes from the communication end; The first judgment module is used to determine whether the target node meets the preset conditions based on the current self node information and the current other node information. The first determining module is used to determine the target node as the communication master node when the target node meets the preset conditions.

8. A computer electronic production equipment, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6.