Vehicle-mounted safety platform data acquisition method based on real-time channel switching
By selecting the main channel of the redundant channel in real time in the on-board security platform and sending the main channel data to the computing board for processing, the problem of redundant channel data being discarded is solved, and the bandwidth utilization rate and the computing board processing efficiency are improved.
Patent Information
- Application Number
- CN202510040451.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-10
AI Technical Summary
The existing on-board security platform has the problem of redundant channel data being discarded during data acquisition, resulting in wasting the platform's internal bus communication bandwidth and increased computing board processing load.
The computing board selects a main channel in real time in multiple redundant channels, and the communication board sends the main channel data to the computing board for processing, real-time switching and effective processing of redundant channel data are realized.
This reduces the bandwidth share of the internal bus of the platform, increases the amount of data access, and improves the processing efficiency of the computing board.
Smart Images

Figure CN119928958A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-mounted safety platform data acquisition, and more specifically to a vehicle-mounted safety platform data acquisition method based on real-time channel switching. Background Art
[0002] In the rail transit train control system, ATP (Automotic Train Protection) and ATO (Automatic Train Operation) are all running on the on-board safety platform. The on-board safety platform realizes the data transmission, reception and processing of various interface types such as relay interface, network, serial port, bus, etc. The application outputs the drive command and status data to different interfaces through the on-board safety platform in each cycle to drive the on-board equipment to operate and realize information interaction with the front and rear trains and ground equipment. At the same time, the application will also receive the action status of the train interface relay and other peripheral communication data collected by the on-board safety platform to ensure the safe operation of the train.
[0003] The vehicle safety platform is connected to various types of devices, among which network and serial port devices have the largest communication data volume. Network and serial port devices mostly use redundant channels for communication, and the same data will be transmitted on multiple channels. The traditional practice is that the vehicle safety platform communication board collects data from all network and serial port channels, and sends all channel data to the computing board for processing through the bus. For the data of redundant channels, the computing board only takes one of the data as valid data for processing, and the data of the remaining channels are discarded. This practice not only greatly wastes the communication bandwidth of the platform's internal bus, but also increases the processing load of the computing board. Summary of the invention
[0004] In order to overcome the defects existing in the above-mentioned prior art, the present invention discloses a vehicle-mounted safety platform data acquisition method based on real-time channel switching. The computing board of the present invention selects a main channel in real time from multiple redundant channels according to the redundant channel status uploaded by the communication board, and the communication board sends the main channel data in the multiple redundant channels to the computing board for processing according to the main channel information elected by the computing board. Through this method, not only the bandwidth occupancy of the internal bus of the platform is greatly reduced, the data access volume of the entire platform is increased, but also the processing efficiency of the computing board is improved.
[0005] In order to achieve the above objectives, the technical solution adopted by the present invention is: A vehicle safety platform data acquisition method based on real-time channel switching includes the following steps: 1. Start the computing board S1, after the computing board starts, load all external devices and channel configurations; Preferably, before step S1, it also includes: numbering all external devices that communicate with the vehicle-mounted safety platform, each external device is represented by a number Si (i=1..N); numbering all redundant channels for the external device Si to communicate with the vehicle-mounted safety platform, each channel is represented by a number Pi (i=1...N), and the external devices and channels are represented as Si{P1,...,Pn}.
[0006] Preferably, step S1 includes: after the computing board is powered on, all external devices and their channel configurations are loaded from FLASH, and the external devices and corresponding channels connected to each communication board are classified, and the main channel of each external device is not selected during initialization.
[0007] 2. Communication board startup S2, after the communication board is started, it requests the computing board for the external device and channel configuration connected to the board, and establishes a link with the external device according to the channel configuration; Preferably, step S2 includes: after the communication board is powered on, obtaining the external device and corresponding channel configuration that the current board needs to be connected to from the computing board through the bus, and establishing a link with the external device according to the channel configuration.
[0008] 3. Channel Status Statistics S3. After the channel link is successfully established, the communication board collects channel data in real time to generate channel status, and periodically sends the channel status to the computing board; Preferably, in step S3, the channel status information sent by the communication board to the computing board is a four-byte integer value V, and the generation of the channel status value V includes the following steps: S31, after the communication board enters the normal operation state, the communication data of all channels of the board are read in real time, and it is determined whether the communication data of the channel is of a known protocol type, if so, it enters step S32, if not, it enters step S33; S32, for the channel data that determines the protocol and contains the message sequence number, after the communication board reads the channel data, it parses the data according to the protocol format, and takes the message sequence number as the state value of the channel, and then enters step S34; S33, for channel data of uncertain protocol, each time the communication board successfully reads the channel data, the channel status value is accumulated by one, and then the process goes to step S34; S34, the communication board packages all channel statuses recorded by the board every T period and sends them to the computing board through the bus, while clearing the status values of all channels and entering the next channel status generation cycle.
[0009] 4. Main Channel Election S4, the computing board selects the main channel of each external device according to the channel status, and periodically sends the main channel election information to the communication board; Preferably, in step S4, the computing board selects the main channel of each external device according to the received channel status information of all communication boards, and broadcasts the main channel election information to all communication boards. The main channel election includes the following steps: S41, the computing board into normal operation state, every T cycle processing all communication board channel status information, set the external device Sa channel Pa corresponding to the state value of Va, Va's initial value is 0, the external device Sa all channel state Sa {V1, ..., Vn}; S42. If the external device Sa has not currently selected a main channel, and any channel state value Vi (i=1...N) of the external device Sa is greater than 0, the computing board starts to independently accumulate each channel state value of the external device Sa, and the accumulated state value of channel Pa is recorded as Ea. After two consecutive accumulation cycles, if Ea=MAX(E1,...,Ei), the channel Pa corresponding to Ea is taken as the main channel of the external device Sa, and Ea is used as the reference value R for calculating the channel state of the external device in subsequent cycles; Preferably, in step S42, if Ea=Eb and is greater than the state accumulated value of other channels, the main channel is selected according to the order of channel numbers from small to large.
[0010] S43, after the main channel of the external device Sa is determined to be Pa, starting from the next cycle, other channels use R as a reference value to calculate the channel state value of the current cycle; Preferably, in step S43, the step of using R as a reference value to calculate the channel state value of the channel in the current cycle includes: W=R-V1+V2; Wherein, W represents the state value calculated by the current channel, R represents the reference value of the external device, V1 represents the channel state value obtained by the current channel from the communication board, and V2 represents the channel state value obtained by the main channel from the communication board; Each channel uses the calculation result W as the reference value R of the channel's calculated state value in the next cycle.
[0011] S44. If the state value Wb calculated by channel Pb for two consecutive periods is less than 0, and Wb=MIN(W1,...Wi), the computing board switches the main channel of the external device Sa to Pb, and uses the absolute value |Wb| as the reference value R of the external device, and continues to repeat the main channel election process of S43.
[0012] Preferably, in step S44, if Wb=Wc and is smaller than the calculation results of other channels, the main channel is selected according to the order of channel numbers from small to large.
[0013] 5. Main channel update and data transmission S5. The communication board obtains the main channel information of all external devices from the computing board every cycle and updates it locally, and sends the main channel data in the multiple redundant channels to the computing board for processing, and discards the non-main channel data.
[0014] Preferably, step S5 includes: if the channel currently read by the communication board is not the main channel, the read channel data is directly discarded and not sent to the computing board; otherwise, the main channel data is sent to the computing board in real time via the bus; If the communication board does not receive the main channel information sent by the computing board for two consecutive cycles, all local channels will be upgraded to main channels.
[0015] Beneficial effects of the present invention: The present invention provides a channel status statistics method, which can quickly identify the communication quality of a network or serial port channel; and provides a main channel election method, which can quickly elect a channel with better communication quality from multiple redundant channels as the main data acquisition channel. The method of pre-processing redundant channels is implemented, which not only greatly reduces the bandwidth occupancy of the platform internal bus, increases the data access volume of the entire platform, but also improves the processing efficiency of the computing board. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The data communication logic structure of the vehicle safety platform of the present invention; Figure 2 This is the channel status interaction process between the computing board and the communication board of the present invention; Figure 3 The detailed process of the communication board channel status statistics of the present invention; Figure 4 The detailed process of the main channel election of the computing board of the present invention; Figure 5 The following is a detailed process of redundant channel data collection of the present invention. DETAILED DESCRIPTION
[0017] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and drawings to fully understand the purpose, characteristics and effects of the present invention.
[0018] Example 1 A vehicle safety platform data acquisition method based on real-time channel switching includes the following steps: 1. Number all external devices that communicate with the platform, and each external device is represented by a number Si (i=1..N). Number all redundant channels that communicate between the external device Si and the platform, and each channel is represented by a number Pi (i=1...N). The devices and channels can be represented as Si{P1,...,Pn}.
[0019] 2. After the computing board is powered on, all external devices and their channel configurations are loaded from FLASH, and the external devices and corresponding channels connected to each communication board are classified. The main channel of each external device is not selected during initialization.
[0020] 3. After the communication board is powered on, it obtains the external device and corresponding channel that the current board needs to connect to from the computing board through the bus, and establishes a link with the external device according to the channel configuration.
[0021] 4. After the computing board and the communication board enter normal operation, the communication board sends the status information of all channels of the board to the computing board every 50 milliseconds, and the computing board broadcasts the main channel election information of all external devices to all communication boards every 50 milliseconds.
[0022] 5. The channel status information sent by the communication board to the computing board is a four-byte integer value V. The channel status value V is generated in the following way: 5.1. After the communication board enters normal operation, the communication data of all channels of the board will be read in real time; 5.2. For channel data that has a certain protocol and contains a message sequence number (such as Subset-037, RSSP-I and other protocol data), after the communication board reads the channel data, it parses the data according to the protocol format and takes the message sequence number as the status value of the channel; 5.3. For channel data with uncertain protocols (such as RAW data), the communication board will add one to the channel status value each time it successfully reads the channel data; 5.4. The communication board packages all channel status records recorded by the board every 50 milliseconds and sends them to the computing board through the bus. At the same time, it clears the status values of all channels and enters the next channel status generation cycle.
[0023] 6. The computing board selects the main channel of each external device based on the channel status information received from all communication boards, and broadcasts the main channel election information to all communication boards. The main channel is elected in the following way: 6.1. After the computing board enters the normal operation state, it processes the channel status information of all communication boards once every 50 milliseconds. Assuming that the state value corresponding to the channel Pa of the device Sa is Va (the initial value is 0), the state of all channels of Sa is Sa{V1,...,Vn}; 6.2. If the device Sa has not currently elected a main channel, and any channel status value Vi (i=1...N) of Sa is greater than 0, the computing board starts to independently accumulate the status values of each channel of Sa, and the accumulated status value of channel Pa is recorded as Ea. After two consecutive accumulation periods of 50 milliseconds, if Ea=MAX(E1,...,Ei), the channel Pa corresponding to Ea is taken as the main channel of the device Sa, and Ea is taken as the reference value R of the device; If Ea = Eb and is greater than the status accumulation values of other channels, the main channel is elected in ascending order of channel numbers. That is, if Pa < Pb, then Pa is elected as the main channel; 6.3. After the main channel of device Sa is determined as Pa, starting from the next cycle, other channels use R as the reference value and calculate the channel status value of this channel in the current cycle through the following formula: W = R - V1 + V2; Where, W represents the status value calculated by the current channel, R represents the device reference value, V1 represents the channel status value obtained by the current channel from the communication board, and V2 represents the channel status value obtained by the main channel from the communication board.
[0024] Each channel uses the calculation result W as the reference value R for calculating the status value of this channel in the next cycle.
[0025] 6.4. If the status value Wb calculated by channel Pb in two consecutive cycles is less than 0, and Wb = MIN(W1,...Wi), then the calculation board switches the main channel of device Sa to Pb, and at the same time uses the absolute value |Wb| as the reference value R of this device, and continues to repeat the main channel election process in 6.3.
[0026] If Wb = Wc and is less than the calculation results of other channels, the main channel is selected in ascending order of channel numbers. That is, if Pb < Pc, then Pb is elected as the main channel.
[0027] 7. The communication board obtains the main channel information of all devices from the calculation board every cycle and updates it locally. If the currently read channel is not the main channel, the channel data after reading is directly discarded and not sent to the calculation board. Otherwise, the main channel data is sent to the calculation board in real time through the bus.
[0028] 8. If the communication board does not receive the main channel information sent by the calculation board for two consecutive cycles, all local channels are promoted to the main channel. Embodiment 2 This embodiment further elaborates on the basis of Embodiment 1. Refer to Figure 1 , the peripheral device sends data to the communication board through the redundant channel, and after the communication board collects the data, it sends the peripheral device data to the calculation board through the bus.
[0029] Refer to Figure 2 , introduce the channel status interaction process between the communication board and the calculation board of the present invention, including the following steps: Step 100, after the calculation board starts, it loads all peripheral device and channel configurations from the FLASH; Step 101, after the communication board starts, it requests the peripheral devices and channel configurations connected to this board from the calculation board; Step 102, the communication board establishes a link with the peripheral device according to the configuration; Step 103, after the channel link is successfully established, the communication board starts to collect channel data in real time and generate channel status; Step 104, the communication board periodically sends the channel status to the computing board; Step 105, the computing board selects the main channel of each peripheral device according to the channel status; Step 106: The computing board periodically sends channel election information to the communication board.
[0030] refer to Figure 3 , introduces the channel state generation method proposed by the present invention, comprising the following steps: Step 107, the communication board establishes a channel link with the peripheral device according to the channel configuration; Step 108, after the channel link is successfully established, the communication board starts to read the channel data; Step 109, if the current channel data is of a known protocol type and contains a message sequence number, the communication board parses the data according to the protocol type and extracts the message sequence number in the data as the current channel state value; Step 110, if the current channel data is of unknown type, the communication board increases the channel status value by one each time a packet of data is successfully read; Step 111, at the end of each 50 millisecond cycle, the communication board sends a channel status group packet to the computing board and clears the channel status generated in this cycle.
[0031] refer to Figure 4 , introduces the method for selecting a main channel of a computing board of the present invention, comprising the following steps: Step 112, after the computing board enters the normal operation state, it waits to receive the channel status sent by all communication boards; Step 113, if any channel status value of the device Sa is greater than 0, the computing board starts to independently accumulate all channel values of the device, and the accumulated value is recorded as E; Step 114, after two consecutive accumulation cycles, if Ea=MAX(E1,...,En), Pa is elected as the main channel of device Sa, and Ea is used as a reference value for calculating the channel status in subsequent cycles; Step 115, the computing board continues to receive the channel status sent by the communication board, and calculates the status values of other non-main channels of the device Sa according to the formula W=R-V1+V2 every cycle; Step 116, if Wb is less than 0 for two consecutive cycles and Wb=MIN(W1,...,Wn), then the main channel Pa of Sa is switched to Pb, and |Wb| is used as a reference value for calculating the channel status in subsequent cycles; Step 117, the computing board repeats the process of step 115 and switches the main channel in real time.
[0032] refer to Figure 5 , introduces the communication board data collection and uploading method of the present invention, comprising the following steps: Step 118, the communication board receives the main channel information sent by the computing board in real time and updates it locally; Step 119, if no main channel information is received for two consecutive cycles, the communication board upgrades all channels of the board to main channels; Step 120, the communication board reads the data of all channels of the board in sequence; Step 121, if the channel currently being read is the main channel, the data is packaged and sent to the computing board, otherwise the read data is directly discarded.
[0033] The above is a specific description of the implementation mode of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention, and these equivalents or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A vehicle-mounted safety platform data acquisition method based on real-time channel switching, characterized in that: The following steps are involved: S1, after the computing board starts, load all external devices and channel configurations; S2, after the communication board is started, it requests the computing board for the external device and channel configuration connected to the board, and establishes a link with the external device according to the channel configuration; S3. After the channel link is successfully established, the communication board collects channel data in real time to generate channel status, and periodically sends the channel status to the computing board; S4, the computing board selects the main channel of each external device according to the channel status, and periodically sends the main channel election information to the communication board; S5. The communication board obtains the main channel information of all external devices from the computing board every cycle and updates it locally, and sends the main channel data in the multiple redundant channels to the computing board for processing, and discards the non-main channel data.
2. The vehicle-mounted safety platform data collection method according to claim 1, characterized in that: Before step S1, it also includes: numbering all external devices that communicate with the vehicle safety platform, each external device is represented by a number Si (i=1..N); numbering all redundant channels for the external device Si to communicate with the vehicle safety platform, each channel is represented by a number Pi (i=1...N), and the external devices and channels are represented as Si{P1,...,Pn}.
3. The vehicle-mounted safety platform data collection method according to claim 1, characterized in that: Step S1 includes: after the computing board is powered on, all external devices and their channel configurations are loaded from FLASH, and the external devices and corresponding channels connected to each communication board are classified, and the main channel of each external device is not selected during initialization.
4. The vehicle-mounted safety platform data collection method according to claim 1, characterized in that: Step S2 includes: after the communication board is powered on, the external device and corresponding channel configuration that the current board needs to connect to are obtained from the computing board through the bus, and a link with the external device is established according to the channel configuration.
5. The vehicle-mounted safety platform data collection method according to claim 1, characterized in that: In step S3, the channel status information sent by the communication board to the computing board is a four-byte integer value V. The generation of the channel status value V includes the following steps: S31, after the communication board enters the normal operation state, the communication data of all channels of the board are read in real time, and it is determined whether the communication data of the channel is of a known protocol type, if so, it enters step S32, if not, it enters step S33; S32, for the channel data that determines the protocol and contains the message sequence number, after the communication board reads the channel data, it parses the data according to the protocol format, and takes the message sequence number as the state value of the channel, and then enters step S34; S33, for channel data of uncertain protocol, each time the communication board successfully reads the channel data, the channel status value is accumulated by one, and then the process goes to step S34; S34, the communication board packages all channel statuses recorded by the board every T period and sends them to the computing board through the bus, while clearing the status values of all channels and entering the next channel status generation cycle.
6. The vehicle-mounted safety platform data collection method according to claim 1, characterized in that: In step S4, the computing board selects the main channel of each external device according to the channel status information of all communication boards received, and broadcasts the main channel election information to all communication boards. The main channel election includes the following steps: S41, the computing board into normal operation state, every T cycle processing all communication board channel status information, set the external device Sa channel Pa corresponding to the state value of Va, Va's initial value is 0, the external device Sa all channel state Sa {V1, ..., Vn}; S42. If the external device Sa has not currently selected a main channel, and any channel state value Vi (i=1...N) of the external device Sa is greater than 0, the computing board starts to independently accumulate each channel state value of the external device Sa, and the accumulated state value of channel Pa is recorded as Ea. After two consecutive accumulation cycles, if Ea=MAX(E1,...,Ei), the channel Pa corresponding to Ea is taken as the main channel of the external device Sa, and Ea is used as the reference value R for calculating the channel state of the external device in subsequent cycles; S43, after the main channel of the external device Sa is determined to be Pa, starting from the next cycle, other channels use R as a reference value to calculate the channel state value of the current cycle; S44. If the state value Wb calculated by channel Pb for two consecutive periods is less than 0, and Wb=MIN(W1,...Wi), the computing board switches the main channel of the external device Sa to Pb, and uses the absolute value |Wb| as the reference value R of the external device, and continues to repeat the main channel election process of S43.
7. The vehicle-mounted safety platform data collection method according to claim 6, characterized in that: In step S42, if Ea=Eb and is greater than the state accumulated value of other channels, the main channel is elected according to the order of channel numbers from small to large.
8. The vehicle-mounted safety platform data collection method according to claim 6, characterized in that: In step S43, the calculation of the channel state value of the current channel in the current cycle using R as a reference value includes: W=R-V1+V2; Wherein, W represents the state value calculated by the current channel, R represents the reference value of the external device, V1 represents the channel state value obtained by the current channel from the communication board, and V2 represents the channel state value obtained by the main channel from the communication board; Each channel uses the calculation result W as the reference value R for calculating the state value of the channel in the next cycle.
9. The vehicle-mounted safety platform data collection method according to claim 6, characterized in that: In step S44, if Wb=Wc and is smaller than the calculation results of other channels, the main channel is selected according to the order of channel numbers from small to large.
10. The vehicle-mounted safety platform data collection method according to claim 1, characterized in that: Step S5 includes: if the channel currently read by the communication board is not the main channel, the read channel data is directly discarded and not sent to the computing board; otherwise, the main channel data is sent to the computing board in real time through the bus; If the communication board does not receive the main channel information sent by the computing board for two consecutive cycles, all local channels will be upgraded to main channels.
Citation Information
Patent Citations
Communication method of wireless mesh network and movable access point
CN101657031A
Main / standby decision channel selecting method and device
CN107645390A
Redundancy method, redundancy management apparatus, server and computer readable storage medium
CN108399112A
Anomaly recovery method and device for wireless bridging network
CN111372272A
Unmanned aerial vehicle-oriented dual-communication link intelligent selection method and medium
CN115474254A