CN111913387A - System for redundancy and load balancing of multiple acquisition devices based on soft bus - Google Patents
System for redundancy and load balancing of multiple acquisition devices based on soft bus Download PDFInfo
- Publication number
- CN111913387A CN111913387A CN202010789660.8A CN202010789660A CN111913387A CN 111913387 A CN111913387 A CN 111913387A CN 202010789660 A CN202010789660 A CN 202010789660A CN 111913387 A CN111913387 A CN 111913387A
- Authority
- CN
- China
- Prior art keywords
- fep
- rtu
- communication front
- data
- end processor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B9/00—Safety arrangements
- G05B9/02—Safety arrangements electric
- G05B9/03—Safety arrangements electric with multiple-channel loop, i.e. redundant control systems
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to a system for redundancy and load balance of a plurality of acquisition devices based on a soft bus, which comprises a platform server, a node management server, a message soft bus and all area comprehensive monitoring subsystems, wherein each area comprehensive monitoring subsystem comprises a main communication front-end processor and a standby communication front-end processor; the node management server dynamically manages the master and standby states of all regional communication front-end computers, and the master communication front-end computer allocates all the sub-system channels of the region to different communication front-end computers for access according to rules, so that multi-computer redundancy of the communication front-end computers is realized; in the operation process, the main communication front-end processor adjusts the channel distribution of the subsystem in real time according to a load balancing algorithm. Compared with the prior art, the invention solves the problem of complex communication between heterogeneous building of the distributed platform, and simultaneously reduces the problem of overweight data access load of single acquisition equipment.
Description
Technical Field
The invention relates to the field of rail transit comprehensive monitoring, in particular to a system for redundancy and load balancing of a plurality of acquisition devices based on a soft bus.
Background
The modern intelligent rail transit platform is connected with a plurality of subsystems, such as an automatic train monitoring system (ATS), a broadcasting system (PA), a Passenger Information System (PIS), a video monitoring system (CCTV), a fire hazard system (FAS) and a basic system (BAS), provides an auxiliary decision for dispatchers by analyzing a plurality of subsystem data and combining an intelligent operation and maintenance algorithm, not only improves operation and maintenance efficiency, but also provides a more powerful guarantee for rail transit, particularly unmanned driving safety, through linkage among the subsystems in an emergency situation.
When the line scale is small, a communication front-end processor can be arranged in the center to access all subsystem data, and two redundant communication front-end processors are usually arranged to ensure the stable operation of the communication front-end processor, however, a general method is to arrange a cold standby communication front-end processor, and the standby communication front-end processor can take over all data access work only after the main communication front-end processor fails.
In order to solve the problem of data fluctuation, some methods use two hot standby communication front-end processors to perform data access work simultaneously, and a server selectively receives data uploaded by one communication front-end processor, but the method also cannot avoid resource waste, and increases the comparison work of the server, and meanwhile, due to the particularity of some subsystem interfaces, two-way connection cannot be supported, so the method also has certain limitation.
With the increase of line scale, the central centralized access mode cannot meet the processing requirement of large data, so that a distributed technology needs to be introduced, a plurality of groups of redundant servers are arranged in the center and the central station, the communication front-end processor is sunk to the station, and after the station accesses and processes subsystem data, partial data are respectively uploaded to the station server and the central server according to the requirement, so that the processing pressure of the communication front-end processor and the central server is reduced. However, the introduction of the distributed architecture greatly increases the number of communication front-end processors and servers, and if the traditional API coding communication mode is used again at this time, the network structure in the whole platform is extremely complex, which is very unfavorable for platform development and maintenance, and moreover, certain difficulty is caused to the later expansion of the platform.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a system for realizing redundancy and load balance of a plurality of acquisition devices based on a soft bus, which is suitable for acquiring data of an external subsystem of a rail transit comprehensive monitoring platform, solves the problem of complex communication between heterogeneous building of a distributed platform, and simultaneously reduces the problem of overweight data access load of a single acquisition device.
The purpose of the invention can be realized by the following technical scheme:
a system for redundancy and load balancing of a plurality of acquisition devices based on a soft bus comprises a platform server, a node management server, a message soft bus and all area comprehensive monitoring subsystems, wherein each area comprehensive monitoring subsystem comprises a main communication front-end processor and a standby communication front-end processor;
the node management server dynamically manages the master and standby states of all regional communication front-end computers, and the master communication front-end computer allocates all subsystem channels of the region to different communication front-end computers according to rules for access, so that multi-computer redundancy of the communication front-end computers is realized; in the operation process, the main communication front-end processor adjusts the channel distribution of the subsystem in real time according to a load balancing algorithm.
Preferably, the message soft bus is a message soft bus based on a publish or subscribe system and without centralization.
Preferably, the system configures all devices accessing the platform to communicate using a message soft bus, which is set to strictly reliable transmission.
Preferably, the communication front-end processor provides data acquisition and command forwarding services through a message soft bus, the node management server provides active/standby state management services of the full-line communication front-end processor through the message soft bus, and the platform server subscribes data of the communication front-end processor through the message soft bus and issues control commands to the main communication front-end processors in different areas by combining the active/standby state information of the communication front-end processor provided by the node management service.
Preferably, the specific process of the node management server dynamically managing the active/standby states of all the regional communication front-end computers is as follows:
1) when the communication front-end processor is started, local information is registered to a node management server;
2) the node management server monitors the online state of the communication front-end processor in each area in real time, when the communication front-end processor in a certain area triggers a soft bus disconnection event, the main communication front-end processor is elected for the area again according to rules, and the electing result is immediately issued through the soft bus;
3) when the node management server is started or runs in fault, the communication front-end processor fails to register, if the communication front-end processor issues a registration message, response data containing the state of the node is not received within a specified time t, and registration is initiated again until the registration is successful.
Preferably, the specific process of registering the local information by the communication front-end processor to the node management server is as follows:
a) the communication front-end processor issues the local area number, the equipment number and the equipment state to the node management server;
b) the node management server groups the communication front-end computers according to the area numbers and sets the master and standby states of the communication front-end computers according to the information of the communication front-end computers in the group;
c) if no communication front-end processor is registered in the current group or no on-line communication front-end processor exists, setting the communication front-end processor as a main communication front-end processor;
d) if the communication front-end processor is registered in the current group and the main communication front-end processor exists, setting the communication front-end processor as a standby communication front-end processor;
e) if the communication front-end processor is registered in the current group but the main communication front-end processor does not exist, selecting the main communication front-end processor according to the rule:
f) after the registration is successful, the node management server immediately returns the state information of all the communication front-end computers in the area to the communication front-end computers, and adds the state of the communication front-end computers into the state information of the full-line communication front-end computers which is periodically released later.
Preferably, the election rule in e) is
Firstly, comparing the equipment states, and preferentially selecting the communication front-end processor with the optimal equipment state as a main communication front-end processor;
if the network state is NS, the single-network online value is 0, the dual-network online value is 1, the CPU utilization rate is Ucpu, and the memory utilization rate is Umem, then the equipment state priority calculation formula is as follows:
0.5×NS+0.3×(1-Ucpu)+0.2×(1-Umem)
if the state priorities of all the communication front-end processor devices are the same, the device numbers of the communication front-end processors are compared again, and the communication front-end processor with the larger device number is preferentially selected as the main communication front-end processor.
Preferably, the FEP data publishing and subscribing rule of the message soft bus configuration communication front-end processor is specifically:
the method comprises the following steps of dividing FEP data into four types, namely system data S, service data D, a control command C and command return correction R, wherein S is FEP state information comprising an equipment operation state, a software operation state, a system alarm and a channel state, D is subsystem data analyzed by FEP, C is an FEP control command or a subsystem control command, R is FEP control command return correction or subsystem control command return correction, S, D, R is actively issued by the FEP in the four types of data, and C is subscribed by the FEP;
each type of data is published and subscribed using a different soft bus topic, and topic parameters, including domain, partition, topic name, and content filtering conditions, are modified through a configuration library.
Preferably, the soft bus topics corresponding to the four types of data are combined into a soft bus route, the FEP and the different platform servers use the same or different topics to implement publishing and subscribing of the data according to the soft bus route configuration, and the FEP provides differentiated data acquisition services for the different modules of the platform through the soft bus route table.
Preferably, the soft bus routing table is configured as follows:
{ROUTE_1(TS,TD,TC,TR),…,ROUTE_N(TS,TD,TC,TR)}
TSrepresenting system data topics, TDRepresenting a business data topic, TCIndicating the subject of the control command, TRRepresenting a command return theme.
Preferably, the system data S is periodically issued data, wherein the device running state, the software running state and the channel state are all configured in an issuing cycle through a configuration library, while the system alarm is issued at the fastest speed by using a change triggering mode, and the same system data theme can be configured for different soft bus routes.
Preferably, the service data D is divided into three types, which are digital quantity data, analog quantity data and accumulated quantity data, each type of data corresponds to a data forwarding table, a mapping relationship between the data and a soft bus route is configured in the data forwarding table, and when the data in the data forwarding table changes, the FEP uses a service data theme corresponding to the soft bus route to issue the changed data to a corresponding platform server according to the mapping relationship between the data and the soft bus route.
Preferably, the control command C can only be subscribed by the main FEP, and the main FEP forwards the control command C to the FEP of the main channel according to the channel distribution;
when each platform server issues a control command to the FEP, the corresponding area main FEP information is firstly obtained from the node management server, and the main FEP number is added to the control command.
Preferably, the command for the return correction R is issued by using a change triggering mode, and is directly issued by the FEP executing the control command or the FEP receiving the subsystem command for the return correction.
Preferably, a subsystem accessed by the FEP of the communication front-end processor is virtualized to be an RTU channel, and the RTU channel is taken as a minimum unit of channel redundancy and load balancing;
and configuring a redundancy mode of each RTU according to the subsystem characteristics and in combination with a load balancing rule, wherein the redundancy mode comprises a fault switching mode and a load balancing mode, the fault switching mode means that the RTU is switched only when the link or the service is unavailable, and the load balancing mode means that the RTU can be dynamically switched according to a load balancing result.
Preferably, the main communication front-end processor adjusting the subsystem channel allocation in real time according to the load balancing algorithm specifically comprises:
(1) after the FEP elects the main FEP, firstly judging whether the RTU channel is distributed, if not, uniformly distributing the RTU channel to each FEP according to the RTU configuration and the current online FEP information;
(2) each FEP establishes corresponding services including acquisition service, forwarding service and synchronization service according to the RTU channel allocated by the FEP;
(3) the standby FEP issues the state information of the local equipment and the state information of the RTU channel to the main FEP in real time, and the main FEP calculates whether the RTU channel needs to be switched currently according to the load balancing rule;
(4) when the RTU channel generates load balancing switching, the main FEP immediately issues the RTU channel distribution result after load balancing to other standby FEPs, and if the RTU channel does not generate channel switching, RTU channel information is periodically issued.
Preferably, the allocation rule of the RTU channel in (1) is:
a) if N is presentrtu<=NfepSequentially allocating the RTUs to the FEP according to the sequence of the RTU and the FEP numbers from small to large;
b) if N is presentrtu>NfepThen the number of RTUs assigned per FEP is In order from small to large RTU and FEP numbering, RTU groupings are assigned to FEP,
wherein the number of RTUs is NrtuFEP number NfepFEP, numbered i, where i is 0,1,2 …,indicating a rounding down.
Preferably, the collection service in (2) loads a corresponding device driver and collection protocol according to RTU configuration to establish communication with the subsystem; and the forwarding service issues the service data in real time according to the forwarding table, and the synchronization service synchronizes the RTU channel data to the FEP of other redundant RTU channels in real time.
Preferably, the load balancing rule in (3) is specifically:
A) if certain RTU channel of FEP is not in operation state and the duration exceeds TofflineSelecting the current optimal FEP from other FEPs, and switching the RTU channel to the optimal FEP, wherein the selection of the optimal FEP is the CPU usage rate U of the FEPcpuMemory usage rate UmemAnd determining the network state NS, wherein the specific calculation formula is as follows:
0.5×NS+0.3×(1-Ucpu)+0.2×(1-Umem)
the FEP with the largest calculation result is the optimal FEP, and if the calculation results of a plurality of FEPs are the same, the FEP with the largest number is taken as the optimal FEP;
B) setting the CPU utilization rate and the memory utilization rate of FEP as U, and if U is greater than a set value UmaxAnd the duration exceeds ToverloadThen some RTU channels under this FEP need to be allocated to itHis FEP.
Preferably, the allocation rule in B) is as follows:
B1) all RTU channels configured to load balance under the FEP are related to the utilization rate U according to the channelsrtuSorting from small to large;
B2) reading U in sequencertuAnd selecting the current relative usage rate UbestThe lowest FEP;
B3) if U isrtu+Ubest<UmaxSwitching the corresponding RTU channel to the FEP with the lowest utilization rate, and setting U as U-Urtu,Ubest=Ubest+Urtu;
B4) If U isrtu+Ubest>UmaxJumping out of the distribution process;
B5) if U-Urtu>UmaxStep B2 is repeated, otherwise the allocation procedure is skipped.
Compared with the prior art, the invention has the following advantages:
1) the non-differentiation distribution of data is realized, and all FEPs are accessed to a message soft bus which is based on a publish/subscribe system and is not centralized;
2) the redundancy of FEP in multiple machines is realized, a node management server is arranged, and the active and standby states of FEP in all areas of a line are dynamically managed; the main FEP allocates all subsystem channels of the area to different FEPs for access according to rules;
3) the performance of the FEP equipment is fully exerted, the stability of data access of the subsystem is guaranteed, and in the running process, the main FEP adjusts the channel allocation of the subsystem in real time according to a load balancing algorithm.
Drawings
FIG. 1 is a diagram of a network architecture for a plurality of redundant acquisition devices according to the present invention;
FIG. 2 is a block diagram of the main functions of the acquisition device according to the present invention;
FIG. 3 is a flow chart of control command data according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
The invention relates to a system suitable for multi-machine redundancy and load balancing of a communication front-end processor in the field of rail transit, and provides a communication method using a soft bus for adapting to a distributed architecture of a modern intelligent rail transit platform, wherein the specific solution is as follows:
1. configuring platform devices to communicate using message softbus
The devices configuring all access platforms use message soft bus communication, and set the message soft bus QoS to strict reliable transmission. FEP provides data acquisition and command forwarding services through a message soft bus, a node management server provides full-line FEP master and standby state management services through the message soft bus, other modules of the platform subscribe FEP data through the message soft bus and issue control commands to the FEP in different areas in combination with FEP master and standby state information provided by the node management services.
2. Configuring node management server to manage full-line FEP master/slave state
When the FEP is started, the local information is firstly registered to the node management server, and the method comprises the following steps:
a) the FEP issues the area number, the equipment number and the equipment state of the FEP to a node management server;
b) the node management server groups the FEP according to the area number and sets an FEP active/standby state according to FEP information in the group;
c) if no FEP is registered in the current group or online FEP does not exist, setting the FEP as the main FEP;
d) if the FEP is registered in the current group and the main FEP exists, setting the FEP as the standby FEP;
e) if the FEP is registered in the current group but the main FEP does not exist, selecting the main FEP according to the following rules:
firstly, equipment states are compared, and the FEP (fluorinated ethylene propylene) with the optimal equipment state is optimalFirst selected as the primary FEP. Setting the network state as NS, the single network online value 0, the double network online value 1 and the CPU utilization rate as UcpuThe memory usage rate is UmemThen, the device status priority calculation formula is as follows:
0.5*NS+0.3*(1-Ucpu)+0.2*(1-Umem)
if all the FEP equipment status priorities are the same, the FEP equipment numbers are compared again, and the FEP with the larger equipment number is preferentially selected as the main FEP.
f) After the registration is successful, the node management server immediately returns the status information of all FEPs in the area to the FEP, and adds the status of the FEP to the full-line FEP status information periodically issued later.
And (e) the node management server monitors the FEP online state of each area in real time, when the FEP of a certain area triggers a soft bus disconnection event, the main FEP is selected for the area again according to the rule in the step e, and the selection result is immediately issued through the soft bus.
When the node management server is started or runs in fault, the FEP registration fails, if the FEP issues a registration message, the FEP does not receive response data containing the state of the node within the specified time t, and the FEP re-initiates the registration until the registration is successful.
3. Configuring FEP data publishing and subscribing rules
The FEP data is divided into four types, namely system data S, service data D, a control command C and command return correction R, wherein S is FEP state information including equipment operation state, software operation state, system alarm and channel state, D is subsystem data analyzed by FEP, C is an FEP control command or subsystem control command, R is FEP control command return correction or subsystem control command return correction, S, D, R is actively issued by FEP in the four types of data, and C is subscribed by FEP.
In order to avoid the mutual influence among data and ensure the efficiency of data publishing and subscribing, each type of data uses different soft bus topics for publishing and subscribing, and topic parameters including domains, partitions, topic names and content filtering conditions can be modified through a configuration library.
The four themes are combined into a soft bus route, the FEP and different modules of the platform use the same or different themes to realize the publishing and subscription of data according to the soft bus route configuration, the FEP provides differentiated data acquisition services for the different modules of the platform through a soft bus route table, and the configuration of the soft bus route table is as follows:
{ROUTE_1(TS,TD,TC,TR),…,ROUTE_N(TS,TD,TC,TR)}
the system data S is generally periodically issued data, wherein the equipment running state, the software running state and the channel state can be configured with an issuing period through a configuration library, the system alarm is issued at the fastest speed in a change triggering mode, and the same system data theme can be configured for different soft bus routes to relieve FEP issuing pressure.
The service data D can be divided into three types, namely digital quantity data, analog quantity data and accumulated quantity data, each type of data corresponds to a data forwarding table, the mapping relation between the data and the soft bus route is configured in the forwarding table, and when the data in the forwarding table changes, the FEP uses the service data theme corresponding to the soft bus route to issue the changed data to the corresponding module of the platform according to the mapping relation between the data and the soft bus route.
The control command C can only be subscribed by the main FEP, and the main FEP forwards the control command C to the FEP where the main channel is located according to the channel distribution condition, so that the safety problem that the control command is repeatedly issued when double main channels exist is avoided. When each module of the platform issues a control command to the FEP, the module firstly acquires main FEP information of a corresponding area from the node management server, and appends a main FEP number in the control command.
The command return R is issued using change triggering and is issued directly by the FEP executing the control command or by the FEP receiving the subsystem command return, and is no longer forwarded through the main FEP.
4. Channel redundancy and load balancing rules
The subsystem accessed by the FEP is virtualized to be an RTU channel representation, and the RTU channel is used as the minimum unit of channel redundancy and load balancing. And configuring a redundancy mode of each RTU according to the subsystem characteristics and in combination with a load balancing rule, wherein the redundancy mode comprises a fault switching mode and a load balancing mode, the fault switching mode means that the RTU is switched only when the link or the service is unavailable, and the load balancing mode means that the RTU can be dynamically switched according to a load balancing result.
After the FEP elects the main FEP, whether the RTU channel is distributed or not is judged firstly, if not, the RTU channel is uniformly distributed to each FEP according to the RTU configuration and the current online FEP information, and the number of the RTUs is set to be NrtuFEP number NfepFEP number i (i ═ 0,1,2 …), and the allocation rule is:
a) if N is presentrtu<=NfepSequentially allocating the RTUs to the FEP according to the sequence of the RTU and the FEP numbers from small to large;
b) if N is presentrtu>NfepThen the number of RTUs assigned per FEP isAssigning RTU groups to FEP in order of RTU and FEP numbers from small to large;
each FEP creates corresponding services according to the RTU channel allocated by the FEP, wherein the corresponding services comprise an acquisition service, a forwarding service and a synchronization service. The acquisition service loads corresponding equipment drivers and acquisition protocols according to the RTU configuration to establish communication with the subsystem; and the forwarding service issues the service data in real time according to the forwarding table, and the synchronization service synchronizes the RTU channel data to the FEP of other redundant RTU channels in real time.
The standby FEP issues the state information of the local equipment and the state information of the RTU channel to the main FEP in real time, the main FEP calculates whether the RTU channel needs to be switched currently according to a load balancing rule, and the load balancing rule is as follows:
a) if certain RTU channel of FEP is not in operation state and the duration exceeds TofflineSelecting the current optimal FEP from other FEPs, and switching the RTU channel to the optimal FEP, wherein the selection of the optimal FEP is the CPU usage rate U of the FEPcpuMemory usage rate UmemAnd determining the network state NS, wherein the specific calculation formula is as follows:
0.5*NS+0.3*(1-Ucpu)+0.2*(1-Umem)
the FEP with the largest number is the optimal FEP, and if the calculation results of a plurality of FEPs are the same, the FEP with the largest number is the optimal FEP.
b) Setting the CPU utilization rate and the memory utilization rate of FEP as U, and if U is greater than a set value UmaxAnd the duration exceeds ToverloadThen some RTU channels under this FEP need to be assigned to other FEPs, the assignment rule is as follows:
1. all RTU channels configured to load balance under the FEP are related to the utilization rate U according to the channelsrtuSorting from small to large;
2. reading U in sequencertuAnd selecting the current relative usage rate UbestThe lowest FEP;
3. if U isrtu+Ubest<UmaxSwitching the corresponding RTU channel to the FEP with the lowest utilization rate, and setting U as U-Urtu,Ubest=Ubest+Urtu;
4. If U isrtu+Ubest>UmaxJumping out of the distribution process;
5. if U-Urtu>UmaxAnd repeating the step 2, otherwise, jumping out of the distribution process.
When the RTU channel generates load balancing switching, the main FEP immediately issues the RTU channel distribution result after load balancing to other standby FEPs, and if the RTU channel does not generate channel switching, RTU channel information is periodically issued.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
FIG. 1 is a network structure diagram of a plurality of redundant acquisition devices according to the present invention, in which a plurality of FEPs are configured in each area, the FEPs communicate with a platform module via a soft bus, a communication protocol uses a soft bus IDL + PROTOBUF custom format, the FEPs communicate with subsystems via Ethernet or a serial port, and the communication protocol uses IEC-60870-5-104, Modbus TCP or a custom protocol.
In this embodiment, a region number and a serial number are configured for each FEP, and subsystems to be accessed in each region are represented by RTU channels, for example, a power supply subsystem PSCADA is represented by RTU 1, a fire subsystem FAS is represented by RTU 2, and an environmental control subsystem BAS is represented by RTU 3.
Configuring an interface mode and a communication protocol of each RTU channel, selecting a redundancy mode for each RTU channel, setting the redundancy mode as a fault switching mode for a subsystem which does not need to be frequently switched, such as a PSCADA subsystem, and setting the redundancy mode as load balancing for a subsystem which has large data volume and lower safety level, such as an FAS/BAS subsystem.
Configuring an FEP soft bus routing table, wherein the FEP soft bus routing table comprises a system data theme, a service data theme, a control command theme and a command returning theme which are communicated with modules of the platform, and configuring a domain, a partition, a theme name and a content filtering condition of each theme. For example, in this embodiment, the FEP may configure three soft bus routes, which respectively provide data services for the station server, the central PSCADA server, and the central ring control server.
Configuring an FEP data forwarding table, which comprises a digital quantity forwarding table, an analog quantity forwarding table and a cumulative quantity forwarding table, wherein the forwarding table comprises a mapping relation between RTU data and soft bus routes, for example, mapping all PSCADA subsystem data and station server soft bus routes, mapping part of PSCADA important data and central PSCADA server soft bus routes, and when PSCADA data changes, FEP issues data by using one or more service topics according to the mapping relation between the data and the soft bus routes, thereby providing differentiated data services for different modules.
As shown in fig. 2, the FEP main function module of the present invention includes a node management module, a forwarding module, a synchronization module, and an acquisition module, where after the FEP is started, all RTU channels are first set to be a standby state, and meanwhile, the node management module registers local information to a node management server through a soft bus, including the following registration steps:
a) the node registration theme is used for releasing local node information including the area number, the equipment number and the equipment state, and waiting for the response of the node management server;
b) if the response data containing the node state is not received within the time t, the step a is repeatedly executed;
c) if the answer data containing the node state of the local machine is received within the time t, the node registration is successful, and at the moment, the main/standby state of the local machine is set according to the received state data.
If the FEP is selected as the main FEP, firstly judging whether all current RTU channels are allocated, if not, allocating the RTU channels to each FEP according to the RTU channel configuration and the current online FEP information, issuing the allocation result to all standby FEPs through a soft bus, and if the RTU channels are allocated, directly entering a load balancing calculation cycle;
if the FEP is selected as the standby FEP, directly subscribing the RTU channel distribution result issued by the main FEP through the soft bus, and issuing the local state information and the RTU channel state information to the main FEP through the soft bus in real time, wherein the main FEP performs load balancing calculation according to all data, and the method comprises the following calculation steps:
a) the status of the RTU link assigned by each FEP is first checked and if the link is not established and the specified time is exceeded, the RTU channel is reassigned.
b) And secondly, checking the performance use condition of each FEP, and when finding that the FEP performance use is overloaded, combining the RTU channel performance use conditions of the FEP, and reallocating some RTU channels to other FEPs with optimal performance.
After the registration is successful, the node management module subscribes all FEP main/standby state information of the local area published by the node management server in real time, and when the change of the main/standby state of the local machine is found, the local machine is actively switched to a corresponding state.
When the FEP normally exits, the node management module initiates an exit process, including the following two cases:
a) if the local machine is the main FEP, all RTU channels of the local machine are firstly reassigned to other FEPs in the local area, and then local machine logout information is issued through the node registration topic. After receiving the FEP logout information, the node management server puts the FEP in an offline state and reselects the main FEP for the area;
c) if the local machine is backup FEP, the node registration theme is directly used for releasing local machine logout information. After receiving the FEP logout information, the main FEP reassigns the RTU channel on the FEP to other FEPs in the area; after receiving the FEP logout information, the node management server puts the FEP in an offline state.
When the FEP is abnormally exited, the exiting process comprises the following two cases:
a) if the local area is the main FEP, after detecting the FEP offline event, the node management server sets the FEP to be in an offline state, and reselects the main FEP for the area, and the main FEP reallocates the RTU channel on the offline FEP to other FEPs in the area according to the FEP state information issued by the node management server;
b) if the local is the backup FEP, the node management server detects that the FEP is in an offline state after detecting the FEP offline event, and the main FEP reallocates the RTU channel on the offline FEP to other FEPs in the local area according to FEP state information issued by the node management server;
the FEP respectively starts the following services according to the RTU channel allocated to the FEP:
1. and starting the data acquisition service of the corresponding channel. The main functions of the acquisition service include:
a) establishing a communication link with the subsystem according to the channel interface configuration, and loading a corresponding communication protocol library according to the channel protocol configuration;
c) receiving and analyzing subsystem data, and writing the data into an FEP real-time library;
d) and analyzing the platform control command, packaging the control command according to a communication protocol structure and then forwarding the control command to the subsystem.
2. And starting the data forwarding service of the corresponding channel. The forwarding service includes the following functions:
a) the running state of the local equipment, the running state of the software, the channel state and the system alarm are published in real time through a system data theme;
b) checking whether corresponding channel data in a forwarding table are changed in real time, and when the data are changed, issuing the changed data by using a corresponding service data theme according to the mapping relation between the data and a soft bus route;
c) subscribing the control command of each module of the platform through the control command theme;
as shown in fig. 3, when subscribing the control command, the FEP sets a content filtering condition based on the FEP number, that is, only receives the control command whose FEP number is the local number in the control command, and when each module of the platform issues the control command, the main FEP number is added to the control command according to the main FEP main/standby state information of each area issued by the node management server, so that the control command is received only by the main FEP of the corresponding area.
After receiving the control command, the main FEP forwarding module firstly checks whether the RTU channel corresponding to the control command is distributed on the local machine, if so, the local machine acquisition module directly forwards the control command to the corresponding subsystem, if not, the FEP where the RTU channel is located is inquired according to the RTU channel distribution table, then the FEP number in the control command is modified into the FEP number where the RTU channel is located, and the control command is reissued through the control command theme, so that one-to-one transmission of the control command is realized, and the safety problem of control when the FEP has double main or double channels is avoided.
d) And issuing a subsystem command for returning the school in real time through a command returning theme.
3. And starting data synchronization service of the corresponding channel, wherein the synchronization service checks whether the data of the corresponding RTU channel in the local real-time library changes in real time, when the data changes, the changed data is published through the data synchronization theme, and FEP of other redundant RTU channels subscribes the data through the data synchronization theme, so that the data synchronization among the redundant RTU channels is realized.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (20)
1. A system for redundancy and load balancing of a plurality of acquisition devices based on a soft bus is characterized by comprising a platform server, a node management server, a message soft bus and all area comprehensive monitoring subsystems, wherein each area comprehensive monitoring subsystem comprises a main communication front-end processor and a standby communication front-end processor;
the node management server dynamically manages the master and standby states of all regional communication front-end computers, and the master communication front-end computer allocates all subsystem channels of the region to different communication front-end computers according to rules for access, so that multi-computer redundancy of the communication front-end computers is realized; in the operation process, the main communication front-end processor adjusts the channel distribution of the subsystem in real time according to a load balancing algorithm.
2. The system according to claim 1, wherein the message soft bus is a publish or subscribe architecture based message soft bus without centralization.
3. The system of claim 1, wherein the system configures all devices of the access platform to communicate using a message soft bus that is configured for strictly reliable transmission.
4. The system for redundancy and load balancing of multiple acquisition devices based on a soft bus according to claim 1 or 3, wherein the communication front-end processor provides data acquisition and command forwarding services through a message soft bus, the node management server provides active/standby state management services of a full-line communication front-end processor through a message soft bus, the platform server subscribes data of the communication front-end processor through the message soft bus, and issues control commands to the main communication front-end processors in different areas in combination with active/standby state information of the communication front-end processor provided by the node management service.
5. The system according to claim 1, wherein the specific process of the node management server dynamically managing the active/standby states of all the regional communication front-end processors is as follows:
1) when the communication front-end processor is started, local information is registered to a node management server;
2) the node management server monitors the online state of the communication front-end processor in each area in real time, when the communication front-end processor in a certain area triggers a soft bus disconnection event, the main communication front-end processor is elected for the area again according to rules, and the electing result is immediately issued through the soft bus;
3) when the node management server is started or runs in fault, the communication front-end processor fails to register, if the communication front-end processor issues a registration message, response data containing the state of the node is not received within a specified time t, and registration is initiated again until the registration is successful.
6. The system for multiple acquisition device redundancy and load balancing based on soft bus according to claim 5, wherein the specific process of registering the local information by the communication front-end processor to the node management server is as follows:
a) the communication front-end processor issues the local area number, the equipment number and the equipment state to the node management server;
b) the node management server groups the communication front-end computers according to the area numbers and sets the master and standby states of the communication front-end computers according to the information of the communication front-end computers in the group;
c) if no communication front-end processor is registered in the current group or no on-line communication front-end processor exists, setting the communication front-end processor as a main communication front-end processor;
d) if the communication front-end processor is registered in the current group and the main communication front-end processor exists, setting the communication front-end processor as a standby communication front-end processor;
e) if the communication front-end processor is registered in the current group but the main communication front-end processor does not exist, selecting the main communication front-end processor according to the rule:
f) after the registration is successful, the node management server immediately returns the state information of all the communication front-end computers in the area to the communication front-end computers, and adds the state of the communication front-end computers into the state information of the full-line communication front-end computers which is periodically released later.
7. The system for multiple acquisition device redundancy and load balancing over flexible buses of claim 6, wherein the election rule in e) is
Firstly, comparing the equipment states, and preferentially selecting the communication front-end processor with the optimal equipment state as a main communication front-end processor;
if the network state is NS, the single-network online value is 0, the dual-network online value is 1, the CPU utilization rate is Ucpu, and the memory utilization rate is Umem, then the equipment state priority calculation formula is as follows:
0.5×NS+0.3×(1-Ucpu)+0.2×(1-Umem)
if the state priorities of all the communication front-end processor devices are the same, the device numbers of the communication front-end processors are compared again, and the communication front-end processor with the larger device number is preferentially selected as the main communication front-end processor.
8. The system for redundancy and load balancing of multiple acquisition devices based on a soft bus as claimed in claim 1, wherein the FEP data publishing and subscribing rule of the message soft bus configuration communication front-end processor is specifically as follows:
the method comprises the following steps of dividing FEP data into four types, namely system data S, service data D, a control command C and command return correction R, wherein S is FEP state information comprising an equipment operation state, a software operation state, a system alarm and a channel state, D is subsystem data analyzed by FEP, C is an FEP control command or a subsystem control command, R is FEP control command return correction or subsystem control command return correction, S, D, R is actively issued by the FEP in the four types of data, and C is subscribed by the FEP;
each type of data is published and subscribed using a different soft bus topic, and topic parameters, including domain, partition, topic name, and content filtering conditions, are modified through a configuration library.
9. The system according to claim 8, wherein the soft bus topics corresponding to the four types of data are combined into a soft bus route, the FEP and the different platform servers use the same or different topics to publish and subscribe data according to the soft bus route configuration, and the FEP provides differentiated data collection services for different modules of the platform through the soft bus route table.
10. The system according to claim 9, wherein the configuration of the soft bus routing table is as follows:
{ROUTE_1(TS,TD,TC,TR),…,ROUTE_N(TS,TD,TC,TR)}
TSrepresenting system data topics, TDRepresenting a business data topic, TCIndicating the subject of the control command, TRRepresenting a command return theme.
11. The system for multiple acquisition device redundancy and load balancing based on soft bus of claim 10, wherein the system data S is periodically published data, wherein the device running status, the software running status and the channel status are all published through configuration library configuration publishing cycle, and the system alarm is published at the fastest speed using change triggering, and for different soft bus routes, the same system data theme can be configured.
12. The system according to claim 10, wherein the service data D is divided into three types, namely digital quantity data, analog quantity data and accumulated quantity data, each type of data corresponds to a data forwarding table, a mapping relationship between data and a soft bus route is configured in the data forwarding table, and when data in the data forwarding table changes, the FEP uses a service data topic corresponding to the soft bus route to issue the changed data to a corresponding platform server according to the mapping relationship between the data and the soft bus route.
13. The system for multiple acquiring device redundancy and load balancing based on soft bus as claimed in claim 10, wherein the control command C can only be subscribed by the main FEP, and the main FEP forwards the control command C to the FEP of the main channel according to the channel distribution;
when each platform server issues a control command to the FEP, the corresponding area main FEP information is firstly obtained from the node management server, and the main FEP number is added to the control command.
14. The system according to claim 10, wherein the command return R is issued using change triggering and is issued directly from the FEP executing the control command or the FEP receiving the subsystem command return R.
15. The system for redundancy and load balancing of multiple acquisition devices based on the soft bus as claimed in claim 1, wherein a subsystem accessed by a communication front-end processor FEP is virtualized to be an RTU channel representation, and the RTU channel is taken as a minimum unit of channel redundancy and load balancing;
and configuring a redundancy mode of each RTU according to the subsystem characteristics and in combination with a load balancing rule, wherein the redundancy mode comprises a fault switching mode and a load balancing mode, the fault switching mode means that the RTU is switched only when the link or the service is unavailable, and the load balancing mode means that the RTU can be dynamically switched according to a load balancing result.
16. The system for redundancy and load balancing of multiple acquisition devices based on a soft bus according to claim 15, wherein the main communication front-end processor adjusts the channel allocation of the subsystems in real time according to the load balancing algorithm specifically as follows:
(1) after the FEP elects the main FEP, firstly judging whether the RTU channel is distributed, if not, uniformly distributing the RTU channel to each FEP according to the RTU configuration and the current online FEP information;
(2) each FEP establishes corresponding services including acquisition service, forwarding service and synchronization service according to the RTU channel allocated by the FEP;
(3) the standby FEP issues the state information of the local equipment and the state information of the RTU channel to the main FEP in real time, and the main FEP calculates whether the RTU channel needs to be switched currently according to the load balancing rule;
(4) when the RTU channel generates load balancing switching, the main FEP immediately issues the RTU channel distribution result after load balancing to other standby FEPs, and if the RTU channel does not generate channel switching, RTU channel information is periodically issued.
17. The system according to claim 16, wherein the RTU channel allocation rule in (1) is:
a) if N is presentrtu<=NfepSequentially allocating the RTUs to the FEP according to the sequence of the RTU and the FEP numbers from small to large;
b) if N is presentrtu>NfepThen the number of RTUs assigned per FEP is In order from small to large RTU and FEP numbering, RTU groupings are assigned to FEP,
18. The system according to claim 16, wherein the collection service of (2) loads the corresponding device driver and collection protocol to establish communication with the subsystem according to the RTU configuration; and the forwarding service issues the service data in real time according to the forwarding table, and the synchronization service synchronizes the RTU channel data to the FEP of other redundant RTU channels in real time.
19. The system for redundancy and load balancing of multiple acquisition devices based on a flexible bus according to claim 16, wherein the load balancing rule in (3) is specifically:
A) if certain RTU channel of FEP is not in operation state and the duration exceeds TofflineSelecting the current optimal FEP from other FEPs, and switching the RTU channel to the optimal FEP, wherein the selection of the optimal FEP is the CPU usage rate U of the FEPcpuMemory usage rate UmemAnd determining the network state NS, wherein the specific calculation formula is as follows:
0.5×NS+0.3×(1-Ucpu)+0.2×(1-Umem)
the FEP with the largest calculation result is the optimal FEP, and if the calculation results of a plurality of FEPs are the same, the FEP with the largest number is taken as the optimal FEP;
B) setting the CPU utilization rate and the memory utilization rate of FEP as U, and if U is greater than a set value UmaxAnd the duration exceeds ToverloadThen some RTU channels under that FEP need to be assigned to other FEPs.
20. The system for multiple acquisition device redundancy and load balancing over a flexible bus as claimed in claim 16, wherein the allocation rule in B) is as follows:
B1) all RTU channels configured to load balance under the FEP are related to the utilization rate U according to the channelsrtuSorting from small to large;
B2) reading U in sequencertuAnd selecting the current relative usage rate UbestThe lowest FEP;
B3) if U isrtu+Ubest<UmaxSwitching the corresponding RTU channel to the FEP with the lowest utilization rate, and setting U as U-Urtu,Ubest=Ubest+Urtu;
B4) If U isrtu+Ubest>UmaxJumping out of the distribution process;
B5) if U-Urtu>UmaxStep B2 is repeated, otherwise the allocation procedure is skipped.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010789660.8A CN111913387A (en) | 2020-08-07 | 2020-08-07 | System for redundancy and load balancing of multiple acquisition devices based on soft bus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010789660.8A CN111913387A (en) | 2020-08-07 | 2020-08-07 | System for redundancy and load balancing of multiple acquisition devices based on soft bus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111913387A true CN111913387A (en) | 2020-11-10 |
Family
ID=73283283
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010789660.8A Pending CN111913387A (en) | 2020-08-07 | 2020-08-07 | System for redundancy and load balancing of multiple acquisition devices based on soft bus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111913387A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113098747A (en) * | 2021-04-28 | 2021-07-09 | 卡斯柯信号有限公司 | Real-time soft bus implementation method for intelligent rail transit system |
CN115695156A (en) * | 2022-10-27 | 2023-02-03 | 宝信软件(成都)有限公司 | Communication front-end processor port management system, port fault handling method and medium |
CN116599830A (en) * | 2023-07-19 | 2023-08-15 | 同方泰德软件(北京)有限公司 | Communication node and link configuration method and device, storage medium and electronic equipment |
CN118626279A (en) * | 2024-08-12 | 2024-09-10 | 东方电子股份有限公司 | Urban rail transit communication front-end processor path decision method |
-
2020
- 2020-08-07 CN CN202010789660.8A patent/CN111913387A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113098747A (en) * | 2021-04-28 | 2021-07-09 | 卡斯柯信号有限公司 | Real-time soft bus implementation method for intelligent rail transit system |
WO2022227414A1 (en) * | 2021-04-28 | 2022-11-03 | 卡斯柯信号有限公司 | Real-time soft bus implementation method oriented to intelligent rail transit system |
CN115695156A (en) * | 2022-10-27 | 2023-02-03 | 宝信软件(成都)有限公司 | Communication front-end processor port management system, port fault handling method and medium |
CN116599830A (en) * | 2023-07-19 | 2023-08-15 | 同方泰德软件(北京)有限公司 | Communication node and link configuration method and device, storage medium and electronic equipment |
CN116599830B (en) * | 2023-07-19 | 2023-10-10 | 同方泰德软件(北京)有限公司 | Communication node and link configuration method and device, storage medium and electronic equipment |
CN118626279A (en) * | 2024-08-12 | 2024-09-10 | 东方电子股份有限公司 | Urban rail transit communication front-end processor path decision method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111913387A (en) | System for redundancy and load balancing of multiple acquisition devices based on soft bus | |
CN112671882B (en) | Same-city double-activity system and method based on micro-service | |
TWI436197B (en) | Rack level power management | |
US7400062B2 (en) | Rack level power management | |
US7441133B2 (en) | Rack level power management for power over Ethernet | |
US20060101465A1 (en) | Distributed control system | |
CN109660466A (en) | A kind of more live load balance realizing methods towards cloud data center tenant | |
KR100715962B1 (en) | Server | |
JP2003186765A (en) | Network connecting device, network connecting device management system and network connecting device management method | |
CN111835849B (en) | Method and device for enhancing service capability of access network | |
CN108282526B (en) | Dynamic allocation method and system for servers between double clusters | |
CN117149445B (en) | Cross-cluster load balancing method and device, equipment and storage medium | |
WO2020001409A1 (en) | Virtual network function (vnf) deployment method and apparatus | |
US20170163493A1 (en) | Network resource allocation proposals | |
CN101621409B (en) | Service control method, service control device and broadband access servers | |
CN114338670B (en) | Edge cloud platform and network-connected traffic three-level cloud control platform with same | |
CN111262723A (en) | Edge intelligent computing platform based on modularized hardware and software definition | |
CN110324253A (en) | Flow control methods, device, storage medium and electronic equipment | |
JP4309321B2 (en) | Network system operation management method and storage apparatus | |
CN101867580A (en) | Method for allocating network flow and device | |
CN118138461A (en) | Airborne distributed file server cluster bandwidth control method | |
CN111400028B (en) | Load balancing processing method for train management | |
CN116800686A (en) | Load balancing flow distribution method, system, equipment and storage medium | |
CN112822062A (en) | Management method for desktop cloud service platform | |
CN114553823A (en) | Access control method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |