Multi-master-control biplane real-time network control method and system and medium
Through the multi-main control dual-plane real-time network control method, the problem of packet loss in single-channel transmission is solved, high redundancy and stability of data transmission is achieved, and system design efficiency and aircraft stability are improved.
Patent Information
- Application Number
- CN202510112302.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-03-04
AI Technical Summary
In the aerospace and industrial fields where key requirements for key data, there is a problem of packet loss in single-channel transmission in the prior art, resulting in unstable and unreliable data transmission.
The multi-master dual-plane real-time network control method is adopted to prioritize the main site collection, and determine whether the active main site is abnormal in real time, and select the backup main site as the active main site through the backup main site switching algorithm. At the same time, two channels of data are sent to the terminal connected to the double plane through the double plane, valid data is obtained, and operation instructions are executed on the client.
It improves the redundancy and stability of data transmission, reduces the manpower, material and financial investment in complex cable networks, shortens the development cycle and iteration cycle, and improves the efficiency of overall system design.
Smart Images

Figure CN119556632A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aerospace technology, and more specifically to a multi-master dual-plane aircraft data network transmission method, and more specifically to a multi-master dual-plane real-time network control method, system and medium. Background Art
[0002] In view of the current industrial and aerospace fields, there are more and more requirements for recoverable, multi-flight and reusable aircraft. Based on the technical requirements of current aircraft, the reliability requirements of flight control systems are getting higher and higher. Not only must the real-time performance of the control system be met and the certainty of data transmission time be guaranteed, but also the stability and reliability of data during system transmission must be guaranteed. However, in actual application, due to the unreliability of UDP protocol transmission, data transmission based on Ethernet may result in packet loss, disorder, and incomplete data. That is, in aerospace and industrial fields with strict requirements on key data, reliable data transmission is required, but single-channel transmission in existing technologies often has the problem of data packet loss.
[0003] Therefore, there is an urgent need for a multi-master dual-plane real-time network control method, system and medium that can improve the redundancy of data transmission, improve the modular design of the overall aircraft internal control system, greatly reduce the investment in manpower, material and financial resources of complex cable networks, improve the efficiency of overall system design and data transmission stability, shorten the development cycle, and reduce the iteration cycle. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a multi-master dual-plane real-time network control method, system and medium to solve the technical problem that reliable data transmission is required in the aerospace and industrial fields with strict requirements on key data, but the single-channel transmission in the prior art often has data packet loss.
[0005] In a first aspect, an embodiment of the present application provides a multi-master dual-plane real-time network control method, the multi-master dual-plane real-time network control method comprising: Priority configuration is performed on the master stations in the master station set to obtain a priority order, and based on the priority order, one master station is selected from the master station set as an initial active master station, and the other master stations are selected as standby master stations; wherein each master station in the master station set determines in real time whether an abnormality occurs in the initial active master station, and if an abnormality occurs, a standby master station is selected as the active master station through a preset standby master station switching algorithm; The active master station sends two paths of data to a terminal connected to the dual plane through the dual plane, and obtains valid data from the two paths of data; Instruct the client to execute the operation instruction according to the valid data.
[0006] Optionally, each master station in the master station set is connected to two planes in the dual planes through two interfaces respectively; The two planes are respectively connected to two interfaces on each terminal.
[0007] Optionally, enabling the active master station to send two paths of data to a terminal connected to the dual plane through the dual plane, and obtaining valid data from the two paths of data, comprises: The active master sends data, copies the data into two identical data frames, and transmits the two data frames to two planes respectively; The terminal receives data frames in two planes and determines whether data frames are lost. If no data frames are lost, the terminal caches the data frames first transmitted to the terminal, removes the data frames later transmitted to the terminal, and uses the cached data frames as valid data.
[0008] Optionally, a preset data comparison program is used to determine whether data frames are lost. If no data frames are lost, data frames first transmitted to the terminal are cached, and data frames later transmitted to the terminal are discarded; this includes: Obtaining a data frame count of data sent by the active master station through a preset data counter, and obtaining a data volume of data frames cached by the application layer of the terminal through a preset register, if the data frame count is not greater than the data volume plus one, no data frame is lost; If no data frame is lost, caching the first-arrived data frame transmitted to the terminal to the application layer to obtain cached data; Through a preset data comparison program, the data frame transmitted later to the terminal is compared with the cached data as the late-arriving data to determine whether the late-arriving data is a duplicate frame. If the late-arriving data is a duplicate frame, the late-arriving data is discarded; if the late-arriving data is not a duplicate frame, the late-arriving data frame is cached in the application layer as newly added cached data.
[0009] Optionally, if the later-arriving data is not a duplicate frame, the plane through which the cached data passes is determined, and another plane is marked as an abnormal plane.
[0010] Optionally, the terminal determines whether data frames are lost based on a preset dual-plane routing algorithm. If no data frames are lost, the data frames first transmitted to the terminal are cached, and the data frames later transmitted to the terminal are discarded; this includes: Obtaining the data frame count of the data sent by the active master station through a preset data counter, and obtaining the data volume of the data frame cached by the application layer of the terminal through a preset register; When the terminal receives a new data frame, the data amount is increased by one as a reference value, and the reference value is compared with the data frame count; wherein, if the reference value is equal to the data frame count, no data frame is lost, and the new data frame received by the terminal is a data frame transmitted to the terminal first; if the reference value is greater than the data frame count, no data frame is lost, and the new data frame received by the terminal is a data frame transmitted to the terminal later; if the reference value is less than the data frame count, data frame loss occurs; The data frames transmitted to the terminal first are cached, and the data frames transmitted to the terminal later are discarded.
[0011] Optionally, if data frame loss occurs, the active master station is determined to be abnormal, and a standby master station is selected as the active master station by a preset standby master station switching algorithm; wherein the step of selecting a standby master station as the active master station by a preset standby master station switching algorithm comprises: Enable all standby master stations to monitor data exchanges between the active master station; Based on the data, it is determined that the active master station is judged to be abnormal, so that all the standby master stations enter a pre-switching state, and each master station in the pre-switching state broadcasts status information at a regular interval so that all the standby master stations receive the status information of each master station; the status information includes the priority of the standby master station itself in the priority order, the node number and the status parameter; Each standby master station in the pre-switching state determines whether its own priority is higher than the priority of other standby master stations. If the standby master station determines that its own priority is the highest and its own status parameter is online, it broadcasts its own status information again. If no objection response is received within the preset time, it changes its identity to the active master station and enters the active state. If the standby master station determines that its own priority is not the highest, or determines that its own priority is the highest but its own status parameter is offline, it exits the pre-switching state and changes to the listening state.
[0012] In a second aspect, an embodiment of the present application provides a multi-master dual-plane real-time network control system, which implements the multi-master dual-plane real-time network control method as described above, and the system includes: The upper computer is used to configure the priority of the master stations in the master station set to obtain a priority order, and select one master station in the master station set as an initial active master station based on the priority order, and use the other master stations as standby master stations; A master station switching module is used to determine in real time whether an abnormality occurs in the initial active master station, and if an abnormality occurs, select a standby master station as the active master station through a preset standby master station switching algorithm; A data sending module, used to enable the active master station to send two paths of data to a terminal connected to the dual plane through the dual plane, and to obtain valid data from the two paths of data; The instruction operation module is used to enable the client to execute the operation instruction according to the valid data.
[0013] Optionally, each master station in the master station set is connected to two planes in the dual planes through two interfaces respectively; The two planes are respectively connected to two interfaces on each terminal.
[0014] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the multi-master dual-plane real-time network control method described in any optional aspect of the first aspect is implemented.
[0015] It can be seen from the above technical solutions that the embodiments of the present application provide a multi-master dual-plane real-time network control method, system and computer-readable storage medium. Compared with the prior art, the present application has the following beneficial effects: Although the functions of each terminal node module are different, the interfaces are unified, which greatly reduces the problem of interface matching during module design. The design of a dual-plane transmission network can improve the redundancy of data transmission. Even if the line of one plane cannot transmit data, the other plane can complete data transmission. In addition, multiple active master controls and multiple backup master controls are set. Even if there is a problem with the main control, the backup master control can be switched automatically as the active master control, further improving the redundancy and the data transmission stability of the entire aircraft. The entire system logic is simple, and the unified interface greatly reduces the investment in manpower, material and financial resources of complex cable networks, improves the efficiency of the overall system design, shortens the development cycle, and reduces the iteration cycle. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] By referring to the following description in conjunction with the accompanying drawings, and with a more comprehensive understanding of the present invention, other objects and results of the present invention will become more clear and easy to understand. In the accompanying drawings: Figure 1 is a flow chart of a multi-master dual-plane real-time network control method according to an embodiment of the present invention; Figure 2 A schematic diagram of a dual-plane design involved in a multi-master dual-plane real-time network control method according to an embodiment of the present invention; Figure 3 A schematic diagram of a master station switching algorithm involved in a multi-master dual-plane real-time network control method according to an embodiment of the present invention; Figure 4 The figure is a logic block diagram of a multi-master dual-plane real-time network control system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In the existing technology, reliable data transmission is required in aerospace and other industrial fields with strict requirements on key data. However, single-channel transmission in the existing technology often has the problem of data packet loss, and if there is a problem with the main station for data transmission, the main station is difficult to switch, resulting in low overall data transmission efficiency and low redundancy.
[0018] In view of the above problems, the present invention provides a multi-master dual-plane real-time network control method, system and computer-readable storage medium. First, priority configuration is performed on the master stations in the master station set to obtain a priority order, and a master station is selected from the master station set as the initial active master station, and the other master stations are used as standby master stations. It is judged in real time whether the initial active master station has an abnormality. If an abnormality occurs, a standby master station is selected as the active master station through a preset standby master station switching algorithm, so that only one active master control participates in the control action of the overall system at the same time, sends control commands, receives control feedback, and completes control operations. The standby master control monitors the network status in real time, receives feedback and command information from all terminals and active master controls, and if an abnormality occurs, it can be immediately switched to the standby master station as the active master station, thereby improving the redundancy of the entire system. Even if a problem occurs in the master station, the standby master station can quickly take over the work. When the active master station sends data, it sends two channels of data to the terminal connected to the dual planes through the dual planes, obtains valid data from the two channels of data, and enables the client to execute operation instructions based on the valid data. The existence of the dual planes further improves the data transmission redundancy of the aircraft, improves the data transmission stability, and thus improves the stability of the aircraft.
[0019] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. The description of the following exemplary embodiments is actually merely illustrative and is by no means intended to limit the present invention and its application or use. The techniques and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, the techniques and equipment should be considered as part of the specification. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0020] Figure 1 A flowchart of a multi-master dual-plane real-time network control method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes: S1: Priority configuration is performed on the master stations in the master station set to obtain a priority order, and based on the priority order, one master station is selected from the master station set as an initial active master station, and the other master stations are selected as standby master stations; wherein each master station in the master station set determines in real time whether an abnormality occurs in the initial active master station, and if an abnormality occurs, a standby master station is selected as the active master station through a preset standby master station switching algorithm; S2: enabling the active master station to send two paths of data to a terminal connected to the dual plane through the dual plane, and obtaining valid data from the two paths of data; S3: Instruct the client to execute the operation instruction according to the valid data.
[0021] Step S1 is a process of configuring the priority of the master stations in the master station set to obtain a priority order, and selecting a master station in the master station set as the initial active master station, and using the other master stations as standby master stations; wherein each master station in the master station set determines in real time whether an abnormality occurs in the initial active master station, and if an abnormality occurs, a standby master station is selected as the active master station through a preset standby master station switching algorithm; In this embodiment, the initial active master station is configured in advance by the host computer, and the respective priorities of all master stations are set. If the active master station fails, the backup master station is selected in order according to the priority. If the selected backup master station meets the conditions, the backup master station is changed to the active master station.
[0022] Specifically, in Figure 1 , Figure 3 In the embodiment shown together, if there is data frame loss, the active master station is determined to be abnormal, and a standby master station is selected as the active master station through a preset standby master station switching algorithm; wherein, selecting a standby master station as the active master station through a preset standby master station switching algorithm includes: S11: enabling all standby master stations to monitor data exchanges between the active master station; S12: determining that the active master station is judged to be abnormal based on the data, causing all standby master stations to enter a pre-switching state, and each master station in the pre-switching state broadcasts status information at regular intervals so that all standby master stations receive status information of each master station; the status information includes the priority of the standby master station itself in the priority order, the node number and the status parameter; S13: Each standby master station in the pre-switching state determines whether its own priority is higher than the priority of other standby master stations. If the standby master station determines that its own priority is the highest and its own status parameter is online, it broadcasts its own status information again. If no objection response is received within the preset time, it changes its own identity to the active master station and enters the active state. If the standby master station determines that its own priority is not the highest, or determines that its own priority is the highest but its own status parameter is offline, it exits the pre-switching state and changes to the listening state.
[0023] More specifically, in simple terms, Figure 2 , Figure 3 As shown in the figure, in this embodiment, a multi-master control system (multiple master stations) is used, and there is only one active master station (master control node). Other master control nodes (master stations) can only serve as standby nodes. Standby master control nodes will not send data to the network, but only monitor the status of the active master station on the network. This multi-master control redundancy method has one active master station and multiple standby masters. When the active master is running, the standby master monitors the network status in real time and does not send data and commands to the network. When the active master fails, the standby master can directly switch to the active master after detecting the network abnormality, and continue to maintain the normal operation of the network system. The standby master is determined by configuring the priority of the standby master to replace the active master.
[0024] To improve the reliability of the control system, only one active master controller participates in the control actions of the overall system at the same time, sending control commands, receiving control feedback, and completing control operations. The standby master controller monitors the network status in real time and receives feedback and command information from all network terminal nodes TN and the active master controller MC.
[0025] The backup master node will be assigned a priority by the host computer. When the active master is detected to be offline or in a fault state, the backup master with the highest priority becomes the active master and starts to work as the active master parameter of the system.
[0026] When switching Figure 3 As shown, after each standby master control node simultaneously monitors that the active master control node fails and goes offline, it switches its own state machine from the 'monitoring state' to the 'pre-switching state'; in the pre-switching state, the standby master control node will send 'status information' to the network at intervals, and can send three messages to inform each standby master control of its current priority, node number, status information and other parameters; All standby master nodes receive the "status information" of multiple standby master nodes at the same time, and compare whether the priority of the current node is higher than that of other standby master nodes according to the status information. If it is determined that the current priority of its own node is not the highest, it will immediately switch to the listening state and no longer send any messages to the network; if it is determined that the current priority of its own node is the highest, it will send "status information" to the network three times at intervals again. If there is no status information response from other standby nodes, it will automatically switch to the active master state, where sending status information complies with the status information protocol, and the status information protocol follows the format described in the following table:
[0027] The status information is shown in the following table:
[0028] The switching of the active master station is completed in this way, which can greatly improve the redundancy of the entire aircraft. Once the active master station fails, the backup master station will immediately take over, thereby ensuring the stability of data transmission.
[0029] Step S2 is a process in which the active master station sends two paths of data to the terminal connected to the dual planes through the dual planes, and obtains valid data from the two paths of data. In this embodiment, each master station in the master station set is connected to two planes in the dual planes through two interfaces respectively; the two planes are connected to two interfaces on each terminal respectively, that is, the master station and the terminal are connected through two independent interaction planes, such as Figure 2 As shown, a star connection method with multi-master dual-network redundant architecture is adopted, in which each node (master station and terminal) has two independent interfaces. The two interfaces (network interfaces) are transmitted through independent dual network planes. There is no connection between the two planes and they operate completely independently.
[0030] It has an active master station MC1 and multiple standby masters MCn. When the active master is running, the standby master monitors the network status in real time and does not send data and commands to the network. When the active master fails, the standby master detects the network abnormality and can directly switch to the active master to continue the normal operation of the network system. The priority configuration of the standby master determines which standby master replaces the active master. The terminal TN accesses the control system through the network, receives the command information of the active master and performs the corresponding operation. The terminal node TN is distinguished by the node ID number. With such a full network design, although each terminal node module has different functions, the interface is unified, which greatly reduces the problem of interface matching during module design.
[0031] There are two independent data transmission planes connected between the master station and the terminal, and each terminal node has two independent Ethernet interfaces, which are connected to two independent data transmission planes respectively, so as to realize the redundancy of physical media. The interface of each terminal node is unified into an Ethernet interface, but only the physical layer and MAC layer of the Ethernet protocol are retained. By designing a real-time communication protocol algorithm based on the MAC layer, the real-time performance of data transmission is realized, ensuring that the control system cycle is less than 1ms.
[0032] Among them, when the master station sends a data frame, the data frame is copied into two identical data frames, which are sent from two Ethernet interfaces to two network transmission planes respectively. The terminal node receives the same data frame through two network interfaces, and the terminal node internally deduplicates the received data frames, receives the first arriving data frames in chronological order, and discards the later arriving data frames. With this architecture, even if one plane fails, the other plane can still transmit normally, thereby realizing dual-network redundant transmission of the system, ensuring that in the state of single-plane transmission failure of the system, switching without time interval can be realized, and ensuring that no frame is lost during the fault switching time during the data transmission process.
[0033] In order to realize the multi-master dual-network redundant architecture, the transmission of the two planes is specifically based on two independent HUBs (interface components of the plane). The interaction mode of the HUB can reduce the transmission delay of the system and achieve a delay time of no more than 1us. The two network interfaces of the active master station are respectively connected to two independent HUB interfaces, which are connected to each terminal through the HUB interface. The terminal receives the data from the two HUBs for deduplication and copies the data frames into two identical frames for data transmission through two network planes.
[0034] Each master controller has two independent Ethernet interfaces, each Ethernet is connected to the HUB corresponding to its own plane. Each HUB supports multiple Ethernet interface connections. The interfaces all use the traditional Ethernet physical layer. Each network interface in the HUB uses the form of MAC+PHY+network transformer. Through the physical layer connection of the HUB, a network data delay of no more than 1us can be achieved, thus meeting the purpose of real-time transmission of the system.
[0035] Regardless of whether it is an active master station or a terminal node, the data is copied into two identical frames and redundant transmission is achieved through two independent transmission planes. Therefore, the two network planes work simultaneously. When one network plane fails, the network node can send and receive data from another plane. The biggest advantage of this mechanism is that there is no need for network switching time, and the entire network architecture adopts a star architecture. The communication delay time of the system does not exceed 1us, meeting the requirements of real-time transmission.
[0036] The difference between sending and receiving data in dual-plane redundancy is as follows: Sending data: The data frame is copied into two identical frames and sent simultaneously on two networks; Receiving data: If both networks are working properly, the receiving node will receive two packets of the same data frames from the two networks. The receiving node needs to select one data frame to send to the node application layer. The simplest selection mechanism is first come first served, and the data frames that arrive later are discarded. Since there is a delay in the transmission of the two network planes, the data received by the two planes are not sent at the same time, so the receiving node needs to cache the data frames that arrive first, and compare the data frames that arrive later with the previously cached data frames that arrive earlier. If they are the same, the data frames that arrive later are discarded. Otherwise, the data frames that arrive later need to be passed to the node application layer (with frame loss), and the frame data is cached at the same time, because the frame data is a new frame of data.
[0037] In simple terms, the active master station sends two paths of data to a terminal connected to the dual planes through the dual planes, and obtains valid data from the two paths of data, including: S21: the active master station sends data, copies the data into two identical data frames, and transmits the two data frames to two planes respectively; S22: The terminal receives data frames in two planes and determines whether any data frames are lost. If no data frames are lost, the data frames first transmitted to the terminal are cached, the data frames later transmitted to the terminal are discarded, and the cached data frames are used as valid data.
[0038] In a specific embodiment, the method of removing the second redundant data frame is completed by a preset program, that is, judging whether there is data frame loss through a preset data comparison program, if there is no data frame loss, caching the data frame transmitted to the terminal first, and removing the data frame transmitted to the terminal later, including: SA221: obtaining a data frame count of data sent by the active master station through a preset data counter, and obtaining a data volume of data frames cached by the application layer of the terminal through a preset register. If the data frame count is not greater than the data volume plus one, no data frame is lost. SA222: If no data frame is lost, cache the first-arrived data frame transmitted to the terminal to the application layer to obtain cache data; SA223: Through a preset data comparison program, the data frame transmitted later to the terminal is compared with the cached data as the late-arriving data to determine whether the late-arriving data is a duplicate frame. If the late-arriving data is a duplicate frame, the late-arriving data is discarded; if the late-arriving data is not a duplicate frame, the late-arriving data frame is cached in the application layer as newly added cached data.
[0039] The comparison completed by the preset data comparison program is more accurate and can identify whether an abnormality occurs in the plane. That is, if the later data is not a duplicate frame, the plane through which the cached data passes is determined, and another plane is marked as an abnormal plane. Although there is an abnormal plane, the data frames sent by the active master station can still be obtained by the terminal, so there is no need to perform targeted operations on this.
[0040] In another specific embodiment, based on a preset dual-plane routing algorithm, the terminal determines whether data frames are lost. If no data frames are lost, the data frames first transmitted to the terminal are cached, and the data frames later transmitted to the terminal are discarded, including: SB221: obtaining the data frame count of the data sent by the active master station through a preset data counter, and obtaining the data volume of the data frame cached by the application layer of the terminal through a preset register; the register is connected to the terminal; SB222: When the terminal receives a new data frame, the data amount is increased by one as a reference value, and the reference value is compared with the data frame count; wherein, if the reference value is equal to the data frame count, no data frame is lost, and the new data frame received by the terminal is a data frame transmitted to the terminal first; if the reference value is greater than the data frame count, no data frame is lost, and the new data frame received by the terminal is a data frame transmitted to the terminal later; if the reference value is less than the data frame count, data frame loss occurs; SB223: Cache the data frames transmitted to the terminal first, and discard the data frames transmitted to the terminal later.
[0041] That is, no software program is used for data comparison throughout the process. Only the dual-plane routing algorithm is needed to compare the data of the two counters to receive data sent by only one active master station, thereby avoiding the problem of receiving duplicate data. This method can further speed up the processing speed and shorten the processing time compared to the use of comparison programs, and the amount of calculation is small, further improving the overall data processing efficiency of the aircraft.
[0042] Specifically, in this specific embodiment, during the operation of the dual plane, the active master station and the terminal node use two channels to send and receive data frames. After the data frame arrives at the terminal node, the terminal node needs to select data from two independent planes. The dual plane selection needs to communicate according to a certain protocol in the frame format. The communication frame format is as follows:
[0043] As shown in the table above, the frame format includes the frame header, information type, frame count, frame length, and valid frame data. The above information is required in the path selection process.
[0044] The dual-plane routing algorithm is executed sequentially, following the first-come, first-served principle. That is, when the terminal receives the first data frame, it assigns the current data frame count to the global frame count register. The two planes follow the same algorithm. Plane 1 receives the first frame data first and then gives an identifier. Plane 2 will not re-assign the global frame count register.
[0045] After data transmission starts, the active master sends the same data frame from plane 1 and plane 2 at the same time. Due to the characteristics of network delay, the terminal nodes receive them in sequence (if they arrive at the same time, they will be judged on the principle of plane 1 first and then plane 2). According to the principle of first come first served, the plane that receives the data first will parse the current data frame first.
[0046] After receiving the data frame, read the data frame header. If the frame header is correct, the next step of reading the frame type is allowed. Different data frame types initialize different frame counts, and data frame routing is performed according to the principle of independent frame skipping for different data types.
[0047] The data frame count of the data sent by the active master station is obtained through the preset data counter, and the data volume of the data frame cached by the application layer of the terminal is obtained through the preset register: One: When the amount of data in the judgment register + 1 is equal to the current data frame count, it means that the current frame is the required data frame and is saved in the data cache.
[0048] 2: When the amount of data in the judgment register + 1 is not equal to the current data frame count, it is necessary to further determine whether it is a duplicate frame. If the amount of data in the current register + 1 is greater than the current data frame count, it means that the current frame is a duplicate frame and is discarded directly; if the current register + 1 is less than the current data frame count, it means that two plane data frames are lost and the value of the count register needs to be reassigned.
[0049] It should be noted that this register is a 16-bit unsigned integer with a maximum count range of 0-65535. When the data frame accumulates from 65535 to 0, special processing is required to prevent the two planes from judging it as a frame loss state. The judgment method is: if the amount of data in the current register + 1 is less than the current frame count, the difference between the two frame counts needs to be judged. When the difference is 65535, it is judged as a normal data frame and the current data frame needs to be cached.
[0050] As described above, the multi-master dual-plane real-time network control method provided by the present invention can determine in real time whether an abnormality occurs in the initial active master station. If an abnormality occurs, a backup master station is selected as the active master station through a preset backup master station switching algorithm, so that only one active master station participates in the control action of the overall system at the same time, sends control commands, receives control feedback, and completes control operations. The backup master monitors the network status in real time, receives feedback and command information from all terminals and active masters, and if an abnormality occurs, it can immediately switch to the backup master station as the active master station, thereby improving the redundancy of the entire system. Even if a problem occurs in the master station, the backup master station can quickly take over the work; when the active master station sends data, it sends two-way data to the terminal connected to the dual plane through the dual plane, and obtains valid data in the two-way data, so that the client executes the operation instruction according to the valid data. The existence of the dual plane further improves the data transmission redundancy of the aircraft, improves the data transmission stability, and thus improves the stability of the aircraft.
[0051] A multi-master dual-plane real-time network control system provided in an embodiment of the present application is introduced below. The multi-master dual-plane real-time network control system described below and the multi-master dual-plane real-time network control method described above can refer to each other.
[0052] like Figure 4 As shown, the present invention also provides a multi-master dual-plane real-time network control system 100, which can implement the multi-master dual-plane real-time network control method as described above, and the system includes: The upper computer 110 is used to configure the priority of the master stations in the master station set to obtain a priority order, and select one master station in the master station set as an initial active master station, and use the other master stations as standby master stations; The master station switching module 120 is used to determine in real time whether the initial active master station has an abnormality, and if an abnormality occurs, select a standby master station as the active master station through a preset standby master station switching algorithm; The data sending module 130 is used to enable the active master station to send two paths of data to the terminal connected to the dual plane through the dual plane, and obtain valid data from the two paths of data; The instruction operation module 140 is used to enable the client to execute an operation instruction according to the valid data.
[0053] Among them, each master station in the master station set is connected to two planes in the dual planes through two interfaces respectively; the two planes are connected to two interfaces on each terminal respectively, so as to realize real-time control of dual-plane multi-master and improve the redundancy of the entire aircraft.
[0054] The multi-master dual-plane real-time network control system 100 provided by the present invention generally performs calculations as the aforementioned multi-master dual-plane real-time network control method. For more specific implementation processes, reference can be made to the specific embodiments of the aforementioned multi-master dual-plane real-time network control method.
[0055] As described above, in the multi-master dual-plane real-time network control system 100 provided by the present invention, the host computer 110 performs priority configuration on the master stations in the master station set to obtain a priority order, and selects one master station in the master station set as the initial active master station, and uses the other master stations as standby master stations. The master station switching module 120 determines in real time whether the initial active master station has an abnormality. If an abnormality occurs, a standby master station is selected as the active master station through a preset standby master station switching algorithm. Then, the data sending module 130 enables the active master station to send two-way data to the terminal connected to the dual plane through the dual plane, and obtains valid data in the two-way data. The instruction operation module 140 enables the client to execute the operation instruction according to the valid data, thereby completing the data transmission and execution from the master control to the client in the aircraft, improving the redundancy of the control system through the multi-master design, improving the redundancy of the data transmission through the dual-plane transmission network design, and improving the modular design of the overall aircraft internal control system through the network design, greatly reducing the investment in manpower, material and financial resources of the complex cable network, improving the efficiency of the overall system design, shortening the development cycle, and reducing the iteration cycle.
[0056] An embodiment of the present invention further provides a computer-readable storage medium, which may be non-volatile or volatile, and stores a computer program, which, when executed by a processor, implements: Priority configuration is performed on the master stations in the master station set to obtain a priority order, and a master station is selected from the master station set as an initial active master station, and the other master stations are selected as standby master stations; wherein each master station in the master station set determines in real time whether an abnormality occurs in the initial active master station, and if an abnormality occurs, a standby master station is selected as the active master station through a preset standby master station switching algorithm; The active master station sends two paths of data to a terminal connected to the dual plane through the dual plane, and obtains valid data from the two paths of data; Instruct the client to execute an operation instruction according to the valid data.
[0057] Specifically, the specific implementation method when the computer program is executed by the processor can refer to the description of the relevant steps in the multi-master dual-plane real-time network control method of the embodiment, which will not be repeated here.
[0058] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0059] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0060] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0061] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0062] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0063] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0064] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for methods, devices, electronic devices and computer-readable storage media, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The methods, devices, electronic devices and media described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0065] As described above with reference to the accompanying drawings, the multi-master dual-plane real-time network control method, system and storage medium proposed according to the present invention are described by way of example. However, it should be understood by those skilled in the art that various improvements can be made to the multi-master dual-plane real-time network control method, system and storage medium proposed by the present invention without departing from the content of the present invention. Therefore, the protection scope of the present invention should be determined by the content of the attached claims.
Claims
1. A multi-master dual-plane real-time network control method, characterized in that: include: Priority configuration is performed on the master stations in the master station set to obtain a priority order, and based on the priority order, one master station is selected from the master station set as an initial active master station, and the other master stations are selected as standby master stations; wherein each master station in the master station set determines in real time whether an abnormality occurs in the initial active master station, and if an abnormality occurs, a standby master station is selected as the active master station through a preset standby master station switching algorithm; The active master station sends two paths of data to a terminal connected to the dual plane through the dual plane, and obtains valid data from the two paths of data; Instruct the client to execute the operation instruction according to the valid data.
2. The multi-master dual-plane real-time network control method according to claim 1, characterized in that: Each master station in the master station set is connected to two planes in the dual planes through two interfaces respectively; The two planes are respectively connected to two interfaces on each terminal.
3. The multi-master dual-plane real-time network control method according to claim 2, characterized in that: The active master station sends two paths of data to a terminal connected to the dual plane through the dual plane, and obtains valid data from the two paths of data, including: The active master sends data, copies the data into two identical data frames, and transmits the two data frames to two planes respectively; The terminal receives data frames in two planes and determines whether data frames are lost. If no data frames are lost, the terminal caches the data frames first transmitted to the terminal, removes the data frames later transmitted to the terminal, and uses the cached data frames as valid data.
4. The multi-master dual-plane real-time network control method according to claim 3, characterized in that: A preset data comparison program is used to determine whether data frames are lost. If no data frames are lost, the data frames transmitted to the terminal first are cached, and the data frames transmitted to the terminal later are discarded; These include: Obtaining a data frame count of data sent by the active master station through a preset data counter, and obtaining a data volume of data frames cached by the application layer of the terminal through a preset register, if the data frame count is not greater than the data volume plus one, no data frame is lost; If no data frame is lost, caching the first-arrived data frame transmitted to the terminal first to the application layer to obtain cached data; Through a preset data comparison program, the data frame transmitted later to the terminal is compared with the cached data as the late-arriving data to determine whether the late-arriving data is a duplicate frame. If the late-arriving data is a duplicate frame, the late-arriving data is discarded; if the late-arriving data is not a duplicate frame, the late-arriving data frame is cached in the application layer as newly added cached data.
5. The multi-master dual-plane real-time network control method according to claim 4, characterized in that: If the later-arriving data is not a repeated frame, the plane through which the buffered data passes is determined, and another plane is marked as an abnormal plane.
6. The multi-master dual-plane real-time network control method according to claim 3, characterized in that: Based on the preset dual-plane routing algorithm, the terminal determines whether there is data frame loss. If there is no data frame loss, the data frame transmitted to the terminal first is cached, and the data frame transmitted to the terminal later is discarded; These include: Obtaining the data frame count of the data sent by the active master station through a preset data counter, and obtaining the data volume of the data frame cached by the application layer of the terminal through a preset register; When the terminal receives a new data frame, the data amount is increased by one as a reference value, and the reference value is compared with the data frame count; wherein, if the reference value is equal to the data frame count, no data frame is lost, and the new data frame received by the terminal is a data frame transmitted to the terminal first; if the reference value is greater than the data frame count, no data frame is lost, and the new data frame received by the terminal is a data frame transmitted to the terminal later; if the reference value is less than the data frame count, data frame loss occurs; The data frames transmitted to the terminal first are cached, and the data frames transmitted to the terminal later are discarded.
7. The multi-master dual-plane real-time network control method according to claim 6, characterized in that: If data frame loss occurs, the active master station is determined to be abnormal, and a standby master station is selected as the active master station through a preset standby master station switching algorithm; wherein the step of selecting a standby master station as the active master station through a preset standby master station switching algorithm includes: Enable all standby master stations to monitor data exchanges between the active master station; Based on the data, it is determined that the active master station is judged to be abnormal, so that all the standby master stations enter a pre-switching state, and each master station in the pre-switching state broadcasts status information at a regular interval so that all the standby master stations receive the status information of each master station; the status information includes the priority of the standby master station itself in the priority order, the node number and the status parameter; Each standby master station in the pre-switching state determines whether its own priority is higher than the priority of other standby master stations. If the standby master station determines that its own priority is the highest and its own status parameter is online, it broadcasts its own status information again. If no objection response is received within the preset time, it changes its identity to the active master station and enters the active state. If the standby master station determines that its own priority is not the highest, or determines that its own priority is the highest but its own status parameter is offline, it exits the pre-switching state and changes to the listening state.
8. A multi-master dual-plane real-time network control system, characterized in that: To implement the multi-master dual-plane real-time network control method as described in any one of claims 1 to 7, the system includes: The upper computer is used to configure the priority of the master stations in the master station set to obtain a priority order, and select one master station in the master station set as an initial active master station based on the priority order, and use the other master stations as standby master stations; A master station switching module is used to determine in real time whether an abnormality occurs in the initial active master station, and if an abnormality occurs, select a standby master station as the active master station through a preset standby master station switching algorithm; A data sending module, used to enable the active master station to send two paths of data to a terminal connected to the dual plane through the dual plane, and to obtain valid data from the two paths of data; The instruction operation module is used to enable the client to execute the operation instruction according to the valid data.
9. The multi-master dual-plane real-time network control system according to claim 8, characterized in that: Each master station in the master station set is connected to two planes in the dual planes through two interfaces respectively; The two planes are respectively connected to two interfaces on each terminal.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-master dual-plane real-time network control method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for forming hot standby redundant main station
CN102710402A
High frequency centralized control method for large-scale AC / DC hybrid power grid
CN110086211A
Electrical equipment redundancy monitoring device switching method and switching control system
CN112286041A
Dual-redundancy FC network transmission system
CN112636816A
Method for redundancy of high-speed industrial Ethernet master station
CN113162778A
Cited By
RS485 bus-based host extension method, apparatus and device, and storage medium
CN119847967A