Host communication control method, device and system and computer readable storage medium

By using multiple communication controllers (CCUs) in the communication system, the host communication control system is composed of multiple communication controllers (CCUs) and selecting alternative hosts when the host fails, the problem of single point of failure risk and low resource utilization in a single communication host mode is solved, and the stability and user experience of the communication system are improved.

CN120498919APending Publication Date: 2025-08-15HANGZHOU GOLD ELECTRONICS EQUIP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510830949.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The single communication host mode has problems such as risk of single point of failure, limited scalability and low resource utilization in the communication system, resulting in unstable communication system and poor user experience.

Method used

A host communication control system composed of multiple communication controllers (CCUs) is used to select alternative hosts when the host fails through preset campaign rules to ensure the stability of the communication system and improve user experience.

Benefits of technology

It improves the reliability and flexibility of the communication system, reduces operation and maintenance costs, reduces service interruption time, and optimizes resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120498919A_ABST
    Figure CN120498919A_ABST
Patent Text Reader

Abstract

The invention provides a host communication control method, device and system and a computer readable storage medium, is applied to a host communication control system, and relates to the technical field of communication. The system comprises a plurality of communication controllers and a service client, the plurality of communication controllers are divided into a master communication controller and at least one slave communication controller; the main communication controller is determined based on a preset election rule; the main communication controller is connected with the service client; the method comprises the following steps: a main communication controller responds to an operation instruction and sends an action signal to a service client; wherein the operation instruction is directly generated by the master communication controller or sent to the master communication controller by the slave communication controller; the service client executes an action based on the action signal; according to the communication system, the plurality of communication controllers are arranged, and when the host fails, the alternative host is selected from the plurality of slaves through the preset election rule, so that the stability of the communication system is ensured, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a host communication control method, device, system and computer-readable storage medium. Background Art

[0002] The technology of using a single communication host for communication is mainly affected by the limitations of communication technology, business demand characteristics and technological development trends. With the continuous advancement of technology and the continuous change of demand, the single communication host mode is no longer the mainstream choice of modern communication systems.

[0003] A single communication host is the core of the entire communication system. Once the host fails, the entire communication system may be paralyzed, resulting in service interruption, unstable communication system and poor user experience. Summary of the Invention

[0004] The object of the present invention is to provide a host communication control method, device, system and computer-readable storage medium. By setting up multiple communication controllers, when a host fails, a replacement host is selected from multiple slaves according to preset election rules, thereby ensuring the stability of the communication system and improving the user experience.

[0005] In a first aspect, the present invention provides a host communication control method, which is applied to a host communication control system, the system comprising: multiple communication controllers and service clients; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on a preset election rule; the master communication controller is connected to the service client;

[0006] Methods include:

[0007] The master communication controller responds to the operation instruction and sends an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent to the master communication controller by the slave communication controller;

[0008] The service client performs actions based on the action signal.

[0009] In some preferred embodiments of the present invention, multiple communication controllers communicate with each other in real time via intra-network multicast; the method further comprises:

[0010] The campaign rules include the following steps:

[0011] The communication controller sends the election message to the other communication controllers after a preset delay period; wherein the delay period is determined based on the basic time, the node number of the communication controller and the weighted time;

[0012] If the communication controller does not receive a campaign message sent by another communication controller before sending the campaign message, the communication controller is determined as the master communication controller.

[0013] In some preferred embodiments of the present invention, after the step of the communication controller sending the election message to the other communication controllers after the preset delay period, the method further includes:

[0014] If the communication controller receives a campaign message sent by another communication controller before sending the campaign message, the communication controller is determined as a slave communication controller.

[0015] In some preferred embodiments of the present invention, after the step of determining the communication controller as a slave communication controller if the communication controller receives a campaign message sent by another communication controller before sending the campaign message, the method further includes:

[0016] The secondary communication controller broadcasts the role definition of the secondary communication controller via multicast within the network.

[0017] In some preferred embodiments of the present invention, the election message is composed of the working condition data of the communication controller; the working condition data represents the number, role definition, authentication key and IP address of the communication controller.

[0018] In some preferred embodiments of the present invention, the operating status data includes: project service number, company project number, centralized control group number, grouped group number, node number, service key, device number, role definition or IP address.

[0019] In some preferred embodiments of the present invention, the service client is connected to the main communication controller via a physical port or a TCP network.

[0020] In a second aspect, the present invention provides a host communication control device, which is applied to a host communication control system, the system comprising: a plurality of communication controllers and a service client; the plurality of communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on a preset election rule; the master communication controller is connected to the service client;

[0021] The device includes:

[0022] An action signal processing module is used for the master communication controller to respond to an operation instruction and send an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent to the master communication controller by the slave communication controller;

[0023] The action signal execution module is used to serve the client to execute actions based on the action signal.

[0024] In a third aspect, the present invention provides a host communication control system, the system comprising: multiple communication controllers and service clients; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on preset election rules; the master communication controller is connected to the service client; the host communication control system executes computer executable instructions to implement the host communication control method provided in the first aspect above.

[0025] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the host communication control method provided in the first aspect above.

[0026] The present invention brings the following beneficial effects:

[0027] The present invention provides a host communication control method, device, system and computer-readable storage medium, which are applied to a host communication control system, wherein the system comprises: a plurality of communication controllers and a service client; the plurality of communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on preset election rules; the master communication controller is connected to the service client; the method comprises: the master communication controller responds to an operation instruction and sends an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent to the master communication controller by the slave communication controller; the service client executes an action based on the action signal; by setting up a plurality of communication controllers, when a host fails, a replacement host is selected from a plurality of slaves according to the preset election rules, thereby ensuring the stability of the communication system and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 A schematic diagram of the structure principle of a host communication control system provided by an embodiment of the present invention;

[0030] Figure 2 A flow chart of a host communication control method provided by an embodiment of the present invention;

[0031] Figure 3 A schematic diagram of the communication principle of a host communication control system provided by an embodiment of the present invention;

[0032] Figure 4 A schematic diagram of the principle of a host agent provided by an embodiment of the present invention;

[0033] Figure 5 A schematic structural diagram of a host communication control device provided by an embodiment of the present invention;

[0034] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention.

[0035] Icon: 210 - action signal processing module; 220 - action signal execution module; 400 - memory; 401 - processor; 402 - bus; 403 - communication interface. DETAILED DESCRIPTION

[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0037] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0038] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not require further definition or explanation in subsequent drawings.

[0039] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" and the like indicate positions or locations based on the positions shown in the accompanying drawings, or the positions or locations in which the inventive product is typically placed when in use. These terms are intended solely to facilitate the description of the present invention and to simplify the description, and are not intended to indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third," etc., are used solely to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0040] Furthermore, terms such as "horizontal," "vertical," and "overhanging" do not necessarily imply that a component must be absolutely horizontal or overhanging, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but rather that it can be slightly tilted.

[0041] In the description of the present invention, it should also be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0042] The background technology behind the use of a single communication host is primarily influenced by the limitations of communication technology, business requirements, and technological trends. With the continuous advancement of technology and evolving needs, the single communication host model is no longer the mainstream choice for modern communication systems. Disadvantages of a single communication host: Single point of failure risk: A single communication host is the core of the entire communication system. Once this host fails, the entire communication system may be paralyzed, resulting in service interruption. This single point of failure risk is the most significant disadvantage of a single communication host. Limited scalability: As business expands and communication volume increases, a single communication host may not be able to meet growing demand. While performance can be improved through hardware or software upgrades, this approach is often limited by cost and technical limitations. Low resource utilization: In a single communication host model, system resources (such as CPU, memory, and network bandwidth) may not be fully utilized. When the host load is low, some resources become idle, resulting in resource waste. In summary, a single communication host is unable to meet the challenges of single point of failure risk, limited scalability, and low resource utilization.

[0043] Compared to a single communication host, automatic failover of multiple communication hosts offers significant advantages in the following areas: Improved system reliability: By configuring a backup communication host and implementing automatic failover, services can be quickly taken over in the event of a primary host failure, ensuring continuity and stability of communication services. This rapid response helps reduce service interruptions and improve overall system reliability. Enhanced system flexibility: The automatic failover feature can flexibly adjust the configuration of the primary and backup hosts based on factors such as system load and host status. This helps optimize system resource allocation, improve resource utilization, and adapt to the needs of different business scenarios. Reduced O&M costs: The automatic failover feature automatically detects faults and performs failover operations without manual intervention. This not only reduces the workload of O&M personnel but also reduces the risk of failures caused by human error. Furthermore, by rationally allocating backup host resources, system reliability can be maintained while reducing overall O&M costs. Automatic failover of multiple communication hosts effectively offsets the shortcomings of a single host system by improving system reliability, enhancing system flexibility, and reducing O&M costs.

[0044] The following embodiments of the present invention are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

[0045] Example 1

[0046] An embodiment of the present invention provides a host communication control method, which is applied to a host communication control system. The system includes: multiple communication controllers and a service client; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on preset election rules; the master communication controller is connected to the service client.

[0047] Specifically, the host communication control system is an advanced communication architecture that aims to improve the reliability, flexibility and scalability of the system through the collaborative work of multiple communication controllers (CCUs).

[0048] The host communication control system includes multiple CCUs, which are responsible for processing and coordinating communication tasks. Each CCU has independent processing capabilities and can complete specific communication tasks independently or collaborate with other CCUs to handle more complex tasks.

[0049] At system startup, when the existing master communication controller fails, or when the system load changes, the system selects a master communication controller from among all CCUs based on pre-set election rules. The master communication controller coordinates the work of other CCUs, maintains the system's global state, and makes key decisions. Its primary function is to connect with service clients and forward requests from the communication controller to them, thus reducing the operational burden on the entire system.

[0050] All CCUs except the master communication controller function as slave communication controllers. They can receive instructions from the master communication controller, perform specific communication tasks, and feed the results back to the master communication controller. They can also receive requests and instructions from external devices, send control signals generated by external operations to the master communication controller, and communicate with service clients through the master communication controller.

[0051] Service clients are components in the system that are directly related to actual communication services. They receive action signals from the CCU and perform corresponding operations, such as data transmission and device control.

[0052] All CCUs and service clients share data and coordinate tasks via a network or hardware serial port connection. This connection can be a local area network, wide area network, or other form of network connection, ensuring that information can be transmitted quickly and accurately within the system.

[0053] Pre-set election rules can factor in device performance, network status, task load, or device number. The system dynamically selects the most suitable CCU as the primary communications controller, ensuring optimal system configuration and operational efficiency under varying conditions. If a primary communications controller fails, the system quickly detects and selects a new one to take over, minimizing system downtime. Based on the capabilities and current load of each CCU, the system intelligently selects a primary communications controller to avoid overloading the current one and improve overall system performance.

[0054] Furthermore, in some preferred embodiments of the present invention, a redundant main communication controller may be provided. When an active main communication controller fails, a backup main communication controller can immediately take over its work, further improving the reliability of the system.

[0055] Furthermore, in some preferred embodiments of the present invention, the service client is connected to the main communication controller via a physical port or a TCP network.

[0056] Specifically, the service client is connected to the main communication controller through a physical port or a TCP network.

[0057] In traditional Modbus (service client) devices, RTU (Remote Terminal Unit) serial devices are typically connected directly to the main communication controller through a physical port. This approach utilizes physical lines to ensure stable and reliable data transmission and is suitable for applications that require high real-time performance and stability.

[0058] The service client device must have a corresponding serial port interface and be connected directly to the corresponding port on the main communication controller via a physical line. This connection method is simple and reliable, but requires wiring and maintenance. The service client sends data requests via the physical line, and the main communication controller receives and processes these requests and returns the corresponding data results. Throughout this process, data is transmitted via the physical line, ensuring data integrity and consistency.

[0059] In modern communication systems, to improve system flexibility and scalability, service clients prefer to communicate with the main communication controller via TCP network. TCP network connection has the following advantages:

[0060] Flexibility: Through TCP network connections, service clients can remotely access the main communication controller without physical wiring, facilitating system expansion and maintenance. Security: The TCP protocol provides multiple security mechanisms (such as SSL / TLS encryption) to ensure the security of data transmission and prevent data interception or tampering. Stability: The TCP protocol features data retransmission mechanisms and flow control functions, ensuring the stability and reliability of data transmission. Even in poor network conditions, data transmission can be guaranteed intact.

[0061] Service client devices connect to a switch or router via an Ethernet interface, and then to the main communication controller via the network. This configuration reduces wiring complexity and improves system maintainability. Service clients send data requests to the main communication controller via the TCP protocol. The main communication controller receives and processes these requests and then returns the corresponding data results via the TCP protocol. Throughout the entire process, data is transmitted via the TCP protocol, ensuring data integrity and consistency.

[0062] For example, in an enterprise office unified communications system, service clients can connect to the main communications controller via a TCP network, enabling remote monitoring and management of various office devices. This connection method not only improves system management efficiency but also enhances system flexibility and scalability. For example, if a fault occurs in a specific office area, the system can quickly locate the problem and remotely address it, reducing recovery time.

[0063] In the call center system, service clients connect to the main communication controller via a TCP network, enabling comprehensive management and monitoring of the call center. The system dynamically adjusts task allocation strategies based on real-time load conditions to ensure efficient call center operations. Furthermore, through TCP network connections, the call center system can be integrated with other business systems to provide a richer customer service experience.

[0064] In the emergency command and dispatch system, the service client connects to the main communication controller via a TCP network, enabling centralized management and dispatch of various emergency resources. The system dynamically adjusts resource allocation strategies based on real-time circumstances and needs, improving the efficiency and effectiveness of emergency response. Furthermore, through TCP network connections, the emergency command and dispatch system can share information and collaborate with other relevant departments, enhancing overall emergency management capabilities.

[0065] Service clients communicating with the main communication controller via physical ports or TCP networks each have their own advantages and application scenarios. Physical port connections are suitable for traditional devices with high real-time and stability requirements, while TCP network connections are more suitable for modern communication systems that require high flexibility, security, and scalability. Properly selecting and applying these two connection methods can effectively improve system operational efficiency and management capabilities.

[0066] For example, multiple CCUs are connected in parallel to form a cluster. As the parallel scale increases, protective failures or shutdowns of single cabinets will become the norm. CCUs can have master role control, but the master should have dynamic drift capability, that is, other CCUs have hot standby capabilities for master control and communication functions. Figure 1 The embodiment of the present invention shown is a schematic diagram of the structural principle of a host communication control system. A group of communication controllers is added between each application Modbus-type host call service and the interface communication service (interface), including a group communication controller and at least one slave communication controller. The communication controller dynamically competes for the current host in the cluster and supports data forwarding and reading with other communication controllers.

[0067] It should be emphasized that the election host service is an independent process service and builds an independent host management data interface.

[0068] For further information, see Figure 2 The flowchart of a host communication control method provided by an embodiment of the present invention is shown, and the method includes:

[0069] Step S102 : The master communication controller responds to the operation instruction and sends an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent by the slave communication controller to the master communication controller.

[0070] Specifically, the master communication controller plays a central role. It can directly generate operational instructions or receive operational instructions from slave communication controllers. Once an operational instruction is received or generated, the master communication controller immediately processes it and converts it into corresponding action signals. These action signals are specific commands that instruct the service client to perform specific operations or tasks.

[0071] The main communication controller autonomously generates operational instructions based on system requirements and current status. This may involve configuring system resources, assigning tasks, or quickly responding to emergencies.

[0072] Slave controllers can send operational instructions to the master controller based on monitored data, specific events, or in response to external actions. This mechanism increases system flexibility and allows slave controllers to directly influence system behavior in specific situations.

[0073] Step S104: The service client performs an action based on the action signal.

[0074] Specifically, after receiving action signals from the main communication controller, the service client performs corresponding actions based on these signals. These actions may include, but are not limited to, data processing, device control, and status updates. The service client must be designed to flexibly interpret and respond to various action signals to ensure that the system can complete its tasks efficiently and accurately.

[0075] Furthermore, in some preferred embodiments of the present invention, multiple communication controllers communicate with each other in real time through intra-network multicast; the method also includes: the election rules include the following steps: the communication controller sends an election message to the remaining communication controllers after a preset delay time period; wherein the delay time period is determined based on the basic time, the node number of the communication controller and the weighted time; if the communication controller does not receive an election message sent by other communication controllers before sending the election message, the communication controller is determined as the main communication controller.

[0076] Specifically, in a host communication control system, real-time communication between multiple communication controllers (CCUs) via intra-network multicast is a key mechanism to ensure high reliability and flexibility. Furthermore, the selection of the master communication controller in the system is achieved through a strict set of election rules. These rules ensure that the system automatically and fairly selects the most suitable CCU as the master communication controller to coordinate communication tasks across the entire system.

[0077] In a host communication control system, each CCU is capable of multicast communication. Multicast is a network communication method that allows a source node to send the same information to multiple destination nodes simultaneously. This is particularly important in multi-host communication control systems. Through multicast, the CCU can efficiently and in real time convey key information such as campaign messages, system status updates, and task assignment instructions to all other CCUs in the system. This not only reduces network load but also improves the efficiency and accuracy of information transmission. In a host communication control system, each CCU is configured with a multicast address. When a CCU needs to send information to other CCUs, it sends the data packet to this multicast address, ensuring that all CCUs receive the information.

[0078] Election rules are an important mechanism for determining the master communication controller in the host communication control system. These rules are designed to be fair and efficient, ensuring that the system can always select the most suitable CCU as the master communication controller.

[0079] Each CCU will wait for a preset delay before sending a campaign message when participating in the election. This delay can be a fixed value or determined by the following factors:

[0080] Base time: a fixed start time followed by all CCUs. Node number: each CCU has a unique node number. The larger the node number, the longer the delay period. This is to give CCUs with smaller node numbers more opportunities to become the main communication controller to ensure the fairness of the election. Weighted time: a time that is dynamically adjusted based on factors such as the CCU's performance, current load, and network status. CCUs with better performance, lower load, and good network status will have a shorter weighted time, making it easier to become the main communication controller. In some preferred embodiments of the present invention, the weighted time can be referred to as a fixed value.

[0081] After the delay period, if the CCU does not receive a campaign message from another CCU, it will send its own campaign message to the remaining communication controllers. The campaign message contains information such as the CCU's node ID, performance indicators, and current load, allowing other CCUs to evaluate whether it is suitable to become the master communication controller.

[0082] If the CCU that sent the election message does not receive any election messages from other CCUs after a period of time (such as several hundred milliseconds), it will be determined as the master communication controller. Once selected as the master communication controller, the CCU will begin to assume the task of coordinating the entire system until the next election occurs.

[0083] In some preferred embodiments of the present invention, in order to ensure the efficiency of the election process and the stable operation of the system, the election rules are usually optimized:

[0084] Add randomization factors: Introduce randomization factors in the setting of the delay period to increase the unpredictability of the election results, thereby preventing certain CCUs from monopolizing the role of the main communication controller for a long time.

[0085] Implement dynamic adjustments: Dynamically adjust the parameters in the campaign rules (such as the calculation method of base time and weighted time, etc.) based on the system operation status and historical performance to adapt to the ever-changing environment.

[0086] Develop a detailed exception handling mechanism to ensure rapid recovery and re-election in special circumstances (such as conflicts caused by multiple CCUs sending election messages at the same time).

[0087] The detailed description of the real-time multicast communication mechanism and election rules above demonstrates the meticulous design of the host communication control system to ensure high reliability and flexibility. These mechanisms not only ensure efficient collaboration among the CCUs within the system but also ensure that the system can quickly and fairly select the most suitable master communication controller to coordinate communication tasks across the entire system, even in complex situations.

[0088] Furthermore, in some preferred embodiments of the present invention, after the step of the communication controller sending a campaign message to the remaining communication controllers after a preset delay period, the method also includes: if the communication controller receives a campaign message sent by other communication controllers before sending the campaign message, the communication controller is determined as a slave communication controller.

[0089] Specifically, during the waiting delay period, the communication controller will continue to monitor whether there are any campaign messages sent by other CCUs in the network. If other CCUs have sent campaign messages in advance, the communication controller will immediately receive and parse the content of these messages. The communication controller will evaluate its competition with other CCUs based on the information in the received campaign messages (such as node number, performance indicators, etc.). If it finds that there is a candidate that is more suitable to become the master communication controller than itself, the communication controller will immediately stop sending its own campaign messages. Once the communication controller confirms that it is in a disadvantageous position (that is, there is a master communication controller that is more suitable than itself), it will automatically switch to the role of a slave communication controller. This automatic switching mechanism ensures that the system can respond and adapt to environmental changes quickly, avoiding communication interruption or confusion caused by delayed response. Generally speaking, as long as a campaign message sent by other communication controllers is received, it will automatically acknowledge its disadvantageous position and automatically switch to the role of a slave communication controller.

[0090] Furthermore, in some preferred embodiments of the present invention, after the step of determining the communication controller as a slave communication controller if the communication controller receives a campaign message sent by other communication controllers before sending the campaign message, the method also includes: broadcasting the role definition of the slave communication controller via multicast within the network.

[0091] Specifically, after a communication controller is determined to be a slave communication controller, the slave communication controller needs to broadcast its role definition via multicast within the network to ensure that other components in the system can identify and adapt to this change.

[0092] The slave communication controller broadcasts its role definition information to the entire system via a preconfigured multicast address. This information includes key parameters such as the slave communication controller's node ID, current status, and priority. By broadcasting this role definition information, the slave communication controller can synchronize the latest system status and task allocation with other CCUs. This helps ensure that the entire system can quickly resume normal operation after a role change. Based on the new slave communication controller role, the system automatically adjusts task scheduling strategies and resource allocation plans. For example, tasks originally assigned to the master communication controller can be reassigned to other available CCUs to maintain efficient system operation.

[0093] For example, see Figure 3 This diagram shows the communication principles of a host communication control system according to an embodiment of the present invention. Application services forward data to the host's interface service through a proxy for data read communication. The host synchronizes its IP address and other information with other CCUs via multicast role messages. The host proxy essentially emulates the Modbus service for applications and the client for interfaces or devices. The proxy determines the final host address to which the current application data will be forwarded through multicast within the cluster.

[0094] Modbus devices are divided into RTU serial devices and TCP network devices based on the connection method of the physical line. From the role definition of the application software, the one who initiates the connection is defined as the client, and the one being connected to the corresponding service is defined as the service client. The Modbus client application initiates the TCP connection client, which is also the specific business application. The Modbus proxy server provides services to the application service. All other connected devices read data and respond to data through this service; it supports multiple clients to connect concurrently and share the request of a device. Data reading from the same device supports data caching and cache aging management by register. Modbus proxy service client, the proxy service client loads the Modbus connection with the specific device or establishes a connection through the RTU to TCP service of the interface service, and maintains the connection management of the target device.

[0095] Modbus RTU devices are typically serial devices bound to physical ports. In some preferred embodiments of the present invention, to ensure universal communication topology, all RTU devices in the CCU product have an internal dedicated interface service for RTU to TCP mode migration. This means that all Modbus devices use the TCP link standard.

[0096] In multi-device master-slave or hot standby scenarios, external Modbus devices are typically connected to a host computer. Other applications or services access data through the host's Modbus service. However, if a host switch occurs due to a host failure or other factors, other applications or services may fail to read data. A host proxy solution ensures reliable communication between external Modbus devices while other applications or services continue to read data from them.

[0097] The host agent solution, in terms of software architecture, includes Modbus client, Modbus proxy service, Modbus proxy service client, Modbus proxy service multicast data synchronization, interface service (RTU to multiple TCP links or TCP to multiple TCP links), etc.

[0098] Target device link management supports management by slave ID, serial or TCP target address, and port maintainer target device link address. Multicast synchronization of master information broadcasts the Modbus service availability information of the current master node. Other slave nodes obtain the current master's IP address and service port through multicast information. The slave's Modbus proxy client uses this information to establish a link with the master's Modbus service proxy.

[0099] See also Figure 4 The schematic diagram of the host proxy principle provided by an embodiment of the present invention shows that in some preferred embodiments of the present invention, the Modbus proxy service shields the switching of Modbus devices caused by host switching. Multiple machines are connected in parallel with only one host, ensuring the uniqueness of the device host.

[0100] Furthermore, in some preferred embodiments of the present invention, the election message is composed of operating status data of the communication controller; the operating status data represents the serial number, role definition, authentication key and IP address of the communication controller.

[0101] Specifically, the election message consists of the operating condition data of the communication controller, which characterizes multiple key parameters of the communication controller, ensuring that the system can accurately evaluate and select the most suitable master communication controller.

[0102] Through real-time monitoring and feedback of operating data, the system can dynamically adjust the roles and task allocation of each CCU. For example, if the performance of a CCU degrades, the system can quickly switch it to a slave role and reallocate tasks to ensure stable system operation.

[0103] When a failure is detected in the primary communication controller, the system quickly identifies a candidate for the new primary communication controller based on operating data and selects a new one through an election process to take over. This automatic failover significantly improves system reliability and fault recovery capabilities.

[0104] Based on the number, role, and other information in the operating condition data, the system can optimize resource allocation strategies. For example, it can prioritize high-priority tasks to CCUs with lower numbers and assign low-load tasks to CCUs in slave roles. This not only improves resource utilization but also enhances overall system performance and efficiency.

[0105] Each CCU is assigned a series of numbers, including project numbers, cluster numbers, and group numbers, to identify its position within the system. Lower numbers indicate a higher priority within the system, but also carry greater responsibilities and burdens. Therefore, the number can, to a certain extent, reflect the importance and performance of the CCU.

[0106] The role definition determines the current working state of the CCU. In a host communication control system, the CCU may play the role of a master communication controller or a slave communication controller.

[0107] The master role represents the CCU currently responsible for primary tasks and coordinating other CCUs. The master role requires high processing power and stability to ensure overall system efficiency. The slave role typically serves as a standby, executing tasks assigned by the master or taking over tasks in the event of a master failure. Slaves do not require constant high load operation, thus reducing resource demands.

[0108] Authentication keys are security credentials used to verify and manage CCU access to system resources. By using specific authentication keys, only authorized CCUs can perform critical operations, such as sending campaign messages and receiving system commands. This ensures the security and integrity of the system and prevents unauthorized access and manipulation.

[0109] The IP address identifies the specific location of the CCU in the network, ensuring communication and data transmission between different CCUs. IP addresses should be unique and manageable to facilitate system monitoring and maintenance. In some preferred embodiments of the present invention, the ability to dynamically configure IP addresses is also an important means of improving system flexibility.

[0110] Furthermore, in some preferred embodiments of the present invention, the operating condition data includes: project service number, company project number, centralized control group number, grouped group number, node number, service key, device number, role definition or IP address.

[0111] Specifically, operating condition data is crucial information used to characterize the status and performance of CCUs within the host communication control system. It not only helps the system accurately assess the current status of each CCU but also provides a crucial basis for dynamic system adjustments, resource allocation, and fault recovery.

[0112] Project service numbers identify specific communication tasks or projects. Each number uniquely corresponds to a specific service or task. Using project service numbers, the system can accurately track and manage the execution of different tasks, ensuring orderly progress and effective monitoring.

[0113] The company project number is used to distinguish communication tasks within different companies or organizations. This number helps isolate and manage tasks within large-scale enterprise networks, ensuring that tasks within different companies do not interfere with each other, thereby improving system security and stability.

[0114] The centralized control group number groups multiple CCUs by function or geographic location, forming a logical "group." This grouping method improves system management efficiency, facilitates unified management and configuration of CCUs within a specific group, and enhances system scalability.

[0115] The grouped group numbers further refine the centralized control group numbers, enabling CCUs within the same group to share certain key parameters and configuration information, simplifying system management and maintenance. Furthermore, the grouped group numbers also help optimize task allocation and resource scheduling strategies.

[0116] The node number uniquely identifies a CCU within the system. Using the node number, the system can accurately locate and track each CCU, facilitating real-time monitoring of its operating status and performance. The node number can also be combined with other numbers to enable more complex task scheduling and management.

[0117] The service key is a key parameter used for authentication and management, ensuring that only authorized CCUs can access and operate specific services or resources. The use of the service key improves system security and reliability, preventing unauthorized access and operation. By managing and maintaining the service key, you can effectively protect the security and stable operation of the system.

[0118] The device number identifies a specific physical device, enabling the system to manage and configure each device individually. Combined with the node number, the device number can be used to pinpoint a specific physical device, facilitating troubleshooting and performance optimization. The device number can also be used for device lifecycle management and replacement planning.

[0119] The role definition determines the CCU's current operating status and responsibilities. In a host communication control system, a CCU can function as either a master or slave communication controller. The IP address identifies the CCU's specific location within the network, ensuring network communication and data transmission between different CCUs. IP addresses should be unique and manageable to facilitate system monitoring and maintenance. Furthermore, the ability to dynamically configure IP addresses is a key means of enhancing system flexibility.

[0120] For example, consider the host communication control system in a campus power system. Each CCU operates independently, but the RS485 characteristics of the meters within the main transformer area allow for a single host-based reading mode. The physical topology wiring facilitates this reliance on the actual host. A highly reliable host self-service switchover solution converts all single-point reading devices to network communication. Current network communication systems include a master communication controller and multiple slave communication controllers. When the master communication controller fails, each slave communication controller determines a delay in sending a campaign message to other slave communication controllers based on a preset base time, node number, and weighted time. When the delay expires, the slave communication controller sends a campaign message. Other slave communication controllers that receive the campaign message stop sending campaign messages and resume their roles as slave communication controllers. The slave communication controller that sent the campaign message changes its role from slave to master, assuming the functions of the original master communication controller. After the master communication controller is elected, the other slave communication controllers broadcast their roles as slave communication controllers.

[0121] In this system, each CCU collaborates to dynamically select a master to read data. If a master fails, another CCU becomes the dynamic master based on priority and takes over device data reading and platform access functions in real time. This mode features dynamic master self-identification, eliminating the need to define master and slave devices, allowing for unified programming across all CCUs. This significantly improves the reliability and stability of communication and control, and offers the self-balancing characteristics of chained control. To ensure high reliability, each CCU possesses master capabilities. The master is selected based on the priority of the CCU device number. Each device sets the initial group number and the group's centralized control device code during installation.

[0122] The multicast working condition data of each device in the network are as follows: project service number, company project number, centralized control group number, group number after grouping, node number: the number within the centralized control device group, service key: the authentication key required for grouping, device number: the factory number of the centralized control device, role definition: host (master), slave (slave), device IP address: device IP address.

[0123] The election rules can be that the CCU device authenticates the operating data received from other CCU devices against its own project service number, centralized control group number, service key, etc. If no device larger than itself is found within 3 seconds, the device switches to the master role. If a larger device is found, the device switches to the slave role.

[0124] In some preferred embodiments of the present invention, a heartbeat is multicasted only when a host is running for election, with a sending interval of 100ms and a timeout of 500ms. The working principle is as follows:

[0125] When each device is powered on and started, the master election service begins. After each device initiates the master election service, it delays broadcasting its own election message [delay time = 10 seconds (base time) + node number x 1 second (weighted time)], but accepts messages from other devices. By receiving other messages, it determines whether a master exists and whether there are devices with smaller nodes than its own device in the same group. The device delays sending its heartbeat message to join the election, which includes the service ID, group ID, device node number, authentication key, device serial number, and current role. If no master is found and no smaller nodes exist, the device broadcasts its node as the master. Otherwise, it broadcasts its node role as a slave. If the master exits due to a device failure or other reasons, other devices will time out from receiving the master's heartbeat message. If the master disappears, the slave with the smallest node number will become the master and broadcast the master role.

[0126] The host communication control method provided by this invention enables automatic switching to rapidly transfer services to a backup host when a communication host fails, ensuring the continuity and stability of communication services. This rapid response capability helps reduce service interruptions caused by single points of failure and improves overall system reliability. By configuring a backup communication host and enabling the automatic switching function, the impact of single points of failure on the entire communication system can be effectively mitigated. When the primary host fails, the backup host can seamlessly take over services, ensuring the normal operation of communication services.

[0127] The host communication control method provided by the present invention addresses the changes in the load on the communication system as business expands and communication volume increases. The automatic switching function can flexibly adjust the configuration of the primary and backup hosts based on system load to meet different business needs. This flexibility helps improve the overall performance and efficiency of the system. The automatic switching technology for communication hosts can be applied to a variety of communication scenarios, such as enterprise office unified communications systems, call center systems, and emergency command and dispatch systems. By configuring different switching strategies and parameters, the specific needs of different application scenarios can be met.

[0128] The host communication control method provided by this invention features an automatic switching function that automatically detects faults and performs switching operations without manual intervention. This not only reduces the workload of operations and maintenance personnel but also mitigates the risk of failures caused by human error. By rationally allocating resources between the primary and backup hosts, resource utilization can be maximized. Under normal circumstances, the backup host can operate in a low-power state or perform other low-load tasks. If the primary host fails, the backup host can quickly take over the business, ensuring efficient resource utilization.

[0129] The host communication control method provided by this invention features an automatic switching function that minimizes service interruptions caused by communication host failures, ensuring that users can enjoy continuous and stable communication services. This is particularly important for users who require highly reliable communication services. By quickly responding to failures and restoring communication services, the automatic switching function helps improve the overall quality of communication services. This helps increase user satisfaction and loyalty, improving reputation and economic benefits for enterprises.

[0130] The present invention provides a host communication control method, which is applied to a host communication control system, wherein the system comprises: a plurality of communication controllers and a service client; the plurality of communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on preset election rules; the master communication controller is connected to the service client; the method comprises: the master communication controller responds to an operation instruction and sends an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent to the master communication controller by the slave communication controller; the service client executes an action based on the action signal; by setting up a plurality of communication controllers, when a host fails, a replacement host is selected from a plurality of slaves according to the preset election rules, thereby ensuring the stability of the communication system and improving the user experience.

[0131] Example 2

[0132] Based on the above embodiment, an embodiment of the present invention provides a host communication control device, which is applied to a host communication control system. The system includes: multiple communication controllers and service clients; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on a preset election rule; the master communication controller is connected to the service client; see Figure 5 The embodiment of the present invention provides a schematic structural diagram of a host communication control device, the device comprising:

[0133] The action signal processing module 210 is used for the master communication controller to respond to the operation instruction and send an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent by the slave communication controller to the master communication controller;

[0134] The action signal execution module 220 is configured to serve the client to execute an action based on the action signal.

[0135] Furthermore, in some preferred embodiments of the present invention, multiple communication controllers communicate with each other in real time through intra-network multicast; the device also includes: a host election module, for which the election rules include the following steps: the communication controller sends an election message to the remaining communication controllers after a preset delay time period; wherein the delay time period is determined based on the basic time, the node number of the communication controller and the weighted time; if the communication controller does not receive an election message sent by other communication controllers before sending the election message, the communication controller is determined as the main communication controller.

[0136] Furthermore, in some preferred embodiments of the present invention, the host election module is further configured to determine the communication controller as a slave communication controller if the communication controller receives an election message from another communication controller before sending the election message.

[0137] Furthermore, in some preferred embodiments of the present invention, the apparatus further comprises: a role definition module, configured to broadcast the role definition of the communication controller from the communication controller via intra-network multicast.

[0138] Furthermore, in some preferred embodiments of the present invention, the election message is composed of operating status data of the communication controller; the operating status data represents the serial number, role definition, authentication key and IP address of the communication controller.

[0139] Furthermore, in some preferred embodiments of the present invention, the operating condition data includes: project service number, company project number, centralized control group number, grouped group number, node number, service key, device number, role definition or IP address.

[0140] Furthermore, in some preferred embodiments of the present invention, the service client is connected to the main communication controller via a physical port or a TCP network.

[0141] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the host communication control device described above can refer to the corresponding process in the aforementioned embodiment of the host communication control method, and will not be repeated here.

[0142] Example 3

[0143] An embodiment of the present invention also provides a host communication control system, which includes: multiple communication controllers and service clients; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on preset election rules; the master communication controller is connected to the service client; the host communication control system executes computer executable instructions to implement the host communication control method provided by the above embodiment.

[0144] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the host communication control system described above can refer to the corresponding process in the aforementioned embodiment of the host communication control method, and will not be repeated here.

[0145] Example 4

[0146] The embodiment of the present invention further provides an electronic device for executing the host communication control method; Figure 6 The embodiment of the present invention shown is a structural schematic diagram of an electronic device provided, which includes a memory 400 and a processor 401, wherein the memory 400 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 401 to implement the above-mentioned host communication control method.

[0147] Further, Figure 6The electronic device shown further includes a bus 402 and a communication interface 403 , and the processor 401 , the communication interface 403 and the memory 400 are connected via the bus 402 .

[0148] The memory 400 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 402 may be an ISA bus, a PCI bus, or an EISA bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0149] The processor 401 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 401 or by software instructions. The above processor 401 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 400, and processor 401 reads the information in memory 400 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.

[0150] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned host communication control method. The specific implementation can be found in the method embodiment and will not be repeated here.

[0151] The computer program product of the host communication control method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can be referred to the method embodiment and will not be repeated here.

[0152] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the system and / or device described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0153] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0154] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A host communication control method, characterized in that: Applied to a host communication control system, the system includes: multiple communication controllers and service clients; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on a preset election rule; the master communication controller is connected to the service client; The method comprises: The master communication controller responds to the operation instruction and sends an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent to the master communication controller by the slave communication controller; The service client performs an action based on the action signal.

2. The host communication control method according to claim 1, wherein: The plurality of communication controllers communicate with each other in real time via intra-network multicast; the method further comprising: The campaign rules include the following steps: The communication controller sends the election message to the remaining communication controllers after a preset delay period; wherein the delay period is determined based on the base time, the node number of the communication controller and the weighted time; If the communication controller does not receive the election message sent by other communication controllers before sending the election message, the communication controller is determined as the master communication controller.

3. The host communication control method according to claim 2, wherein: After the step of the communication controller sending the election message to the remaining communication controllers after a preset delay period, the method further includes: If the communication controller receives the campaign message sent by other communication controllers before sending the campaign message, the communication controller is determined as the slave communication controller.

4. The host communication control method according to claim 3, wherein: After the step of determining the communication controller as the slave communication controller if the communication controller receives the campaign message sent by another communication controller before sending the campaign message, the method further includes: The slave communication controller broadcasts the role definition of the slave communication controller via the intra-network multicast.

5. The host communication control method according to claim 2, wherein: The campaign message is composed of the working condition data of the communication controller; the working condition data represents the serial number, role definition, authentication key and IP address of the communication controller.

6. The host communication control method according to claim 5, characterized in that: The working condition data includes: project service number, company project number, centralized control group number, grouped group number, node number, service key, device number, role definition or IP address.

7. The host communication control method according to claim 1, wherein: The service client is connected to the main communication controller via a physical port or a TCP network.

8. A host communication control device, characterized in that: Applied to a host communication control system, the system includes: multiple communication controllers and service clients; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on a preset election rule; the master communication controller is connected to the service client; The device comprises: An action signal processing module, configured for the master communication controller to respond to an operation instruction and send an action signal to the service client; wherein the operation instruction is directly generated by the master communication controller or sent to the master communication controller by the slave communication controller; An action signal execution module is used for the service client to execute an action based on the action signal.

9. A host communication control system, characterized in that: The system includes: multiple communication controllers and service clients; the multiple communication controllers are divided into: a master communication controller and at least one slave communication controller; the master communication controller is determined based on preset election rules; the master communication controller is connected to the service client; the host communication control system executes computer executable instructions to implement the host communication control method described in any one of claims 1 to 7 above.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the host communication control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Master-slave relation switching method, slave server, master server and system

    CN111158915A

  • Control method and device of SVG parallel operation system and storage medium

    CN111181169A

  • Intelligent mobile microgrid control system and method

    CN111509845A

  • Deterministic timed bus access method

    US5434861A