A protocol converter and data processing method thereof

By utilizing the data processing and scheduling modules in the protocol converter, the problem of data interaction differences between the ground target controller and different types of automatic train monitoring devices was solved, enabling flexible data conversion and interaction.

CN118660089BActive Publication Date: 2024-11-05HUNAN CRRC TIMES SIGNAL & COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411139809.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-05
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

The data interaction between the ground target controller and different models of automatic train monitoring devices is inconsistent, resulting in an inflexible data interaction.

Method used

Design a protocol converter comprising a first communication module, a second communication module, a data processing module, and a data scheduling module. The converter converts the operating data of the ground target controller into data recognizable by the automatic train monitoring device through a pre-set data conversion format, and converts the command data of the automatic train monitoring device into data recognizable by the ground target controller.

Benefits of technology

It enables flexible data interaction between the ground target controller and different models of automatic train monitoring devices, avoiding the need to focus on the model of the automatic train monitoring device and improving the flexibility and efficiency of data interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660089B_ABST
    Figure CN118660089B_ABST
Patent Text Reader

Abstract

The present application discloses a protocol converter and a data processing method thereof, belonging to the field of communication technology, comprising: a first communication module, used to send the operation data of the ground target controller to the data processing module, and send the second conversion data to the ground target controller; a second communication module, used to send the command data of the train automatic monitoring device to the data processing module, and send the first conversion data to the train automatic monitoring device; a data processing module, used to convert the operation data of the ground target controller into data recognizable by the train automatic monitoring device, obtain the first conversion data, and convert the command data of the train automatic monitoring device into data recognizable by the ground target controller, obtain the second conversion data; a data scheduling module, used to schedule the communication process of each of the above modules. Through the protocol converter, the ground target controller can flexibly interact with different types of train automatic monitoring devices for data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a protocol converter and a data processing method thereof. Background Art

[0002] TACS (Train Autonomous Circumambulate System, a train autonomous operation system based on vehicle-to-vehicle communication) is the development trend of urban rail transit. In TACS, its internal ground object controller (ObjectController, OC) needs to continuously exchange data with the automatic train supervision (Automatic Train Supervision, ATS).

[0003] Since different companies produce different models of automatic train monitoring devices, there are many differences in electrical characteristics and interface forms of different models of automatic train monitoring devices, which makes the ground target controller unable to flexibly exchange data with different models of automatic train monitoring devices. At present, there is no more effective solution to this technical problem. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a protocol converter and a data processing method thereof to solve the problem in the prior art that the ground target controller cannot flexibly exchange data with different types of automatic train monitoring devices. The specific scheme is as follows:

[0005] In order to solve the above technical problems, the present invention provides a protocol converter, comprising:

[0006] A first communication module is used to send the operation data of the ground object controller to the data processing module, and simultaneously obtain the second conversion data from the data processing module, and send the second conversion data to the ground object controller;

[0007] a second communication module, used for sending command data of the automatic train monitoring device to the data processing module, and simultaneously obtaining first conversion data from the data processing module, and sending the first conversion data to the automatic train monitoring device;

[0008] The data processing module is connected to both the first communication module and the second communication module, and is used to convert the operation data of the ground target controller into data recognizable by the automatic train monitoring device using a preset data conversion format to obtain the first conversion data, and convert the command data of the automatic train monitoring device into data recognizable by the ground target controller to obtain the second conversion data;

[0009] A data scheduling module is connected to the first communication module, the second communication module and the data processing module, and is used to schedule the communication processes of the first communication module, the second communication module and the data processing module.

[0010] Preferably, the first communication module includes:

[0011] A data sending unit, used for adding a mutex lock to the operation data of the ground target controller, obtaining target adding data, and sending the target adding data to the data processing module;

[0012] A data extraction unit is used to obtain the second conversion data from the data processing module, package the second conversion data, and send the packaged second conversion data to the ground target controller.

[0013] Preferably, it also includes:

[0014] A data storage module is connected to the first communication module, the second communication module and the data processing module, and is used to obtain the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data, and store the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data.

[0015] Preferably, the data storage module includes:

[0016] A data acquisition unit, used for acquiring the operation data of the ground target controller, the command data of the automatic train monitoring device, the first conversion data and the second conversion data through boost::signal2 or signals and slots in QT;

[0017] A data storage unit is used to store the operation data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data.

[0018] In order to solve the above technical problems, the present invention further provides a data processing method of a protocol converter, which is applied to the data processing module in the above disclosed protocol converter, and the method comprises:

[0019] The operation data of the ground target controller is converted into data recognizable by the train automatic monitoring device using a preset data conversion format to obtain first conversion data, and the command data of the train automatic monitoring device is converted into data recognizable by the ground target controller to obtain second conversion data.

[0020] Preferably, the process of converting the operation data of the ground target controller into data recognizable by the automatic train monitoring device by using a preset data conversion format to obtain the first converted data includes:

[0021] Extracting state information of a designated object from the operation data of the ground object controller to obtain object state information;

[0022] Creating a byte format recognizable by the automatic train monitoring device according to the target state information to obtain a target byte format;

[0023] Reconstructing the target state information according to a preset byte format to obtain target reconstructed data;

[0024] The target reconstructed data is format-converted according to the target byte format to obtain the first converted data.

[0025] Preferably, the process of creating a byte format recognizable by the automatic train monitoring device according to the target state information to obtain the target byte format includes:

[0026] Based on the communication protocol between the ground target controller and the automatic train monitoring device, and according to the target state information, a byte format recognizable by the automatic train monitoring device is created to obtain the target byte format.

[0027] Preferably, when the designated object is a turnout, the target byte format is sequentially provided with a first information storage area for storing the status information of the turnout, a second information storage area for storing the train delay time, a third information storage area for storing the train ID number, and a fourth information storage area for storing reserved information in order of position, and the preset byte format is sequentially provided with a first data storage area for storing the status information of the turnout, a second data storage area for storing the train delay time, and a third data storage area for storing the train ID number in order of position.

[0028] Preferably, the number of bytes occupied by the first information storage area is 1 byte, and the first information storage area is provided with, in order of position, a 2-bit first information storage unit for storing the positive and reverse position status information of the turnout, a 1-bit second information storage unit for storing the fork status information of the turnout, a 2-bit third information storage unit for storing the blocking status information of the turnout, a 1-bit fourth information storage unit for storing the allocation status information of the turnout, a 1-bit fifth information storage unit for storing blank information, and a 1-bit sixth information storage unit for storing the fault status information of the turnout.

[0029] Preferably, the number of bytes occupied by the first data storage area is 1 byte, and the first data storage area is provided with a 2-bit first data storage unit for storing the position information of the turnout, a 1-bit second data storage unit for storing the individual locking status information of the turnout or the guiding total locking status information, a 1-bit third data storage unit for storing the blocking status information of the turnout, a 1-bit fourth data storage unit for storing the side protection status information of the turnout, a 1-bit fifth data storage unit for storing reserved data, a 1-bit sixth data storage unit for storing the driving status information of the turnout, and a 1-bit seventh data storage unit for storing the squeezing status information of the turnout.

[0030] Beneficial effect: In the protocol converter provided by the present invention, a first communication module, a second communication module, a data processing module and a data scheduling module are provided; wherein the first communication module can send the operation data of the ground target controller to the data processing module, and the second communication module can send the command data of the train automatic monitoring device to the data processing module; when the data processing module receives the operation data of the ground target controller sent by the first communication module and the command data of the train automatic monitoring device sent by the second communication module, it will use a pre-set data conversion format to convert the operation data of the ground target controller into data that can be recognized by the train automatic monitoring device to obtain the first conversion data, and convert the command data of the train automatic monitoring device into data that can be recognized by the ground target controller to obtain the second conversion data; thereafter, the first communication module will send the second conversion data to the ground target controller, and the second communication module will send the first conversion data to the train automatic monitoring device; since a large number of communication processes are involved in the first communication module, the second communication module and the data processing module, in order to ensure that the first communication module, the second communication module and the data processing module can reasonably and quickly perform data interaction, a data scheduling module will also be used in the protocol converter to schedule the communication processes in the first communication module, the second communication module and the data processing module.

[0031] Compared with the prior art, the protocol converter can use the pre-set data conversion format to convert the operating data of the ground target controller into data recognizable by the automatic train monitoring device, and convert the command data of the automatic train monitoring device into data recognizable by the ground target controller when acquiring the operating data of the ground target controller and the command data of the automatic train monitoring device. Under this setting, when the ground target controller exchanges data with the automatic train monitoring device, it does not need to pay attention to the model corresponding to the automatic train monitoring device. Therefore, the protocol converter allows the ground target controller to flexibly exchange data with different models of automatic train monitoring devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0033] Figure 1 A structural diagram of a protocol converter provided by an embodiment of the present invention;

[0034] Figure 2 A schematic diagram of a protocol converter provided by an embodiment of the present invention performing data interaction with an automatic train monitoring device and a ground target controller;

[0035] Figure 3 A structural diagram of another protocol converter provided by an embodiment of the present invention;

[0036] Figure 4 A schematic diagram of the data format of byte 1 of the second information storage area;

[0037] Figure 5 A design architecture diagram of a protocol converter provided by an embodiment of the present invention;

[0038] Figure 6 A data processing flow chart of a protocol converter provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] See also Figure 1 , Figure 1 A structural diagram of a protocol converter provided by an embodiment of the present invention, the protocol converter comprising:

[0041] The first communication module 11 is used to send the operation data of the ground object controller to the data processing module 13, and at the same time obtain the second conversion data from the data processing module 13, and send the second conversion data to the ground object controller;

[0042] The second communication module 12 is used to send the command data of the automatic train monitoring device to the data processing module 13, and at the same time obtain the first conversion data from the data processing module 13, and send the first conversion data to the automatic train monitoring device;

[0043] The data processing module 13 is connected to both the first communication module 11 and the second communication module 12, and is used to convert the operation data of the ground target controller into data recognizable by the automatic train monitoring device using a preset data conversion format to obtain first conversion data, and convert the command data of the automatic train monitoring device into data recognizable by the ground target controller to obtain second conversion data;

[0044] The data scheduling module 14 is connected to the first communication module 11 , the second communication module 12 and the data processing module 13 , and is used to schedule the communication processes of the first communication module 11 , the second communication module 12 and the data processing module 13 .

[0045] In this embodiment, a protocol converter is provided, by which the ground target controller can flexibly exchange data with different types of automatic train monitoring devices. In the protocol converter, a first communication module 11, a second communication module 12, a data processing module 13 and a data scheduling module 14 are provided.

[0046] In the protocol converter, the first communication module 11 first obtains the operation data of the ground target controller from the ground target controller, and after the first communication module 11 obtains the operation data of the ground target controller from the ground target controller, the operation data of the ground target controller is sent to the data processing module 13. After the second communication module 12 obtains the command data of the automatic train monitoring device from the automatic train monitoring device, the command data of the automatic train monitoring device is sent to the data processing module 13.

[0047] The operation data of the ground target controller includes: system status information, configurable information, version information, turnout dynamic status information, section dynamic status information, function button dynamic status information, flood prevention door dynamic status information, parking area dynamic status information, garage door dynamic status information, dynamic acquisition status information corresponding to scattered devices, dynamic drive status information corresponding to scattered devices, and train dynamic status information, etc. The command data of the train automatic monitoring device includes: turnout command, button command, confirmation command, emergency message command, general command, etc.

[0048] In practical applications, the operation data of the ground target controller can be processed by designing the following fields:

[0049] GetBooleanCalcuator, used to obtain the Boolean logic operator;

[0050] CalcuateBoolean, used to calculate Boolean logic operators;

[0051] GetTipManager, used to obtain information about the information manager;

[0052] SetCiData, used to set the communication data of the ground target controller;

[0053] GetCiData, used to obtain the communication data of the ground target controller;

[0054] GetSystemState, used to obtain the system state of the ground target controller;

[0055] SetSystemState, used to set the system state of the ground target controller;

[0056] GetSetableStateInfo, used to obtain settable information;

[0057] SetSetableStateInfo, used to set settable information;

[0058] GetVersionInfo, used to obtain version information;

[0059] SetVersionInfo, used to set version information;

[0060] GetSwitchCount, used to obtain the number of switch devices;

[0061] GetSectionCount, used to obtain the number of section devices;

[0062] GetFuncBtnCount, used to obtain the number of function button devices;

[0063] GetAfgCount, used to obtain the number of anti-flood door devices;

[0064] GetStationCount, used to obtain the number of parking area equipment;

[0065] GetGarageDoorCount, used to obtain the number of garage door devices;

[0066] GetOtherInCount, used to obtain the number of scattered collection devices;

[0067] GetOtherOutCount, used to obtain the number of scattered drive devices;

[0068] SetSwitchData, used to set the dynamic state of the switch;

[0069] SetSectionData, used to set the dynamic state of the section;

[0070] SetFuncBtnData, used to set the dynamic state of the function button;

[0071] SetAfgData, used to set the dynamic state of the flood control door;

[0072] SetStationData, used to set the dynamic status of the parking area;

[0073] SetGarageDoorData, used to set the dynamic state of the garage door;

[0074] SetOtherInData, used to set the dynamic state of scattered collection;

[0075] SetOtherOutData, used to set the dynamic state of scattered drivers;

[0076] SetTrainSta, used to set the dynamic status of the train;

[0077] GetSwitchData, used to obtain the dynamic status of the switch equipment;

[0078] GetSectionData, used to obtain the dynamic status of the section device;

[0079] GetFuncBtnData, used to obtain the dynamic status of the function button device;

[0080] GetAfgData, used to obtain the dynamic status of the flood control door device;

[0081] GetStationData, used to obtain the dynamic status of parking area equipment;

[0082] GetGarageDoorData, used to obtain the dynamic status of the garage door device;

[0083] GetOtherInData, used to obtain the dynamic status of scattered acquisition devices;

[0084] GetOtherOutData, used to obtain the dynamic status of scattered drive devices;

[0085] GetTrainSta, used to obtain the dynamic status of the train;

[0086] atomiDataFromCI, used to store received communication data;

[0087] vecDynmicDataSwitch, used to store turnout dynamic data;

[0088] vecDynmicDataSection, used to store dynamic data of the section;

[0089] vecDynmicDataFuncBtn, used to store dynamic data of function buttons;

[0090] vecDynamicDataAFGAFG, used to store dynamic data;

[0091] vecDynamicDataStation, used to store station dynamic data;

[0092] vecDynamicDataGarageDoor, used to store dynamic data of garage door;

[0093] vecLsInput, used to store scattered collected dynamic data;

[0094] vecLsOutput, used to store scattered driver dynamic data;

[0095] vecTrainSta, used to store train dynamic data;

[0096] criticalSection, used to store multi-threaded data locks.

[0097] When the data processing module 13 receives the operating data of the ground target controller sent by the first communication module 11 and the command data of the train automatic monitoring device sent by the second communication module 12, the data processing module 13 will use a pre-set data conversion format to convert the operating data of the ground target controller into data that can be recognized by the train automatic monitoring device to obtain first conversion data, and convert the command data of the train automatic monitoring device into data that can be recognized by the ground target controller to obtain second conversion data.

[0098] Afterwards, the first communication module 11 will take out the second conversion data that can be recognized by the ground target controller from the data processing module 13, and send the second conversion data to the ground target controller, and the second communication module 12 will take out the first conversion data that can be recognized by the train automatic monitoring device from the data processing module 13, and send the first conversion data to the train automatic monitoring device.

[0099] It is understandable that since a large number of communication processes are involved in the first communication module 11, the second communication module 12 and the data processing module 13, if there is no data scheduling module 14 to reasonably schedule these communication processes, the first communication module 11, the second communication module 12 and the data processing module 13 cannot independently complete their own functional tasks. Therefore, in the protocol converter, the data scheduling module 14 is also needed to reasonably schedule the various communication processes in the first communication module 11, the second communication module 12 and the data processing module 13.

[0100] Specifically, in actual operation, the data scheduling module 14 is equivalent to a main program. The data scheduling module 14 can be used to establish corresponding threads for the first communication module 11, the second communication module 12 and the data processing module 13, and the data scheduling module 14 can be used to associate the corresponding pointers or handles of the first communication module 11, the second communication module 12 and the data processing module 13, and then, the data scheduling module 14 is used to start the threads corresponding to the first communication module 11, the second communication module 12 and the data processing module 13.

[0101] It should be noted that, in actual applications, the first communication module 11, the second communication module 12, the data processing module 13 and the data scheduling module 14 can be written in C++, C#, or other assembly languages, which are not specifically limited here.

[0102] See also Figure 2 , Figure 2 A schematic diagram of a protocol converter provided by an embodiment of the present invention performing data interaction with an automatic train monitoring device and a ground target controller. Figure 2 In the figure, 10 represents a protocol converter, 20 represents a ground target controller, 30 represents an automatic train monitoring device, and 40 represents a data server. Since the protocol converter 10 can convert the operation data of the ground target controller 20 into command data recognizable by the automatic train monitoring device 30, and convert the command data of the automatic train monitoring device 30 into operation data recognizable by the ground target controller 20. Therefore, by using the protocol converter 10, the ground target controller can flexibly exchange data with automatic train monitoring devices of different models. In actual applications, after receiving the operation data of the ground target controller 20 and the command data of the automatic train monitoring device 30, the protocol converter 10 can also store the received data in the data server 40, so as to facilitate the query of these data later.

[0103] In the protocol converter provided in this embodiment, a first communication module, a second communication module, a data processing module and a data scheduling module are provided; wherein the first communication module can send the operation data of the ground target controller to the data processing module, and the second communication module can send the command data of the train automatic monitoring device to the data processing module; when the data processing module receives the operation data of the ground target controller sent by the first communication module and the command data of the train automatic monitoring device sent by the second communication module, it will use a pre-set data conversion format to convert the operation data of the ground target controller into data recognizable by the train automatic monitoring device to obtain first conversion data, and convert the command data of the train automatic monitoring device into data recognizable by the ground target controller to obtain second conversion data; thereafter, the first communication module will send the second conversion data to the ground target controller, and the second communication module will send the first conversion data to the train automatic monitoring device; since a large number of communication processes are involved in the first communication module, the second communication module and the data processing module, in order to ensure that the first communication module, the second communication module and the data processing module can reasonably and quickly perform data interaction, a data scheduling module will also be used in the protocol converter to schedule the communication processes in the first communication module, the second communication module and the data processing module.

[0104] Compared with the prior art, the protocol converter can use the pre-set data conversion format to convert the operating data of the ground target controller into data recognizable by the automatic train monitoring device, and convert the command data of the automatic train monitoring device into data recognizable by the ground target controller when acquiring the operating data of the ground target controller and the command data of the automatic train monitoring device. Under this setting, when the ground target controller exchanges data with the automatic train monitoring device, it does not need to pay attention to the model corresponding to the automatic train monitoring device. Therefore, the protocol converter allows the ground target controller to flexibly exchange data with different models of automatic train monitoring devices.

[0105] Based on the above embodiments, this embodiment further illustrates and optimizes the technical solution. As a preferred implementation, the first communication module includes:

[0106] A data sending unit, used for adding a mutex to the operation data of the ground target controller, obtaining target adding data, and sending the target adding data to the data processing module;

[0107] The data extraction unit is used to obtain the second conversion data from the data processing module, package the second conversion data, and send the packaged second conversion data to the ground target controller.

[0108] Since the data processing module is converting the format of the operation data of the ground target controller and the command data of the automatic train monitoring device, it is possible that when the data processing module is processing the target data, the first communication module and the second communication module are simultaneously acquiring the target data. If the above situation occurs, a communication blockage problem will occur. In this embodiment, in order to avoid this problem, when the first communication module sends the operation data of the ground target controller to the data processing module, a mutex lock is also added to the operation data of the ground target controller.

[0109] Specifically, in this embodiment, a data transmission unit and a data extraction unit are set in the first communication module, wherein the data transmission unit adds a mutex lock to the operation data of the ground target controller to obtain the target addition data, and then the data transmission unit sends the target addition data with the mutex lock to the data processing module. The data extraction unit extracts the second conversion data that can be recognized by the ground target controller from the data processing module, and packages the second conversion data, and then sends the packaged second conversion data to the ground target controller.

[0110] In actual application, in order to enable the first communication module to realize the above functions, the network can be initialized first, the thread corresponding to CI communication can be run, and functions such as send and receive can be called to send and receive data with the first communication module; then, a mutex is added to the acquired data, and the data with the mutex added is added to the message sending queue, so that the data is sent to the data processing module by using the message sending queue. At the same time, the second conversion data recognizable by CI is obtained from the data processing module through the receiving message queue.

[0111] The key fields involved in this process are:

[0112] CriticalSection, used to store multi-threaded data locks. This field is mainly used to prevent the first communication module from conflicting with the running data of the ground target controller sent to the data processing module when receiving the second conversion data;

[0113] ipconfig, used to store the IP port configuration when communicating with the ground target controller;

[0114] RecvQueue, used to store the received message queue;

[0115] SendQueue, used to store the send message queue;

[0116] pDataManger, used to store data manager objects and is responsible for maintaining device status in real time;

[0117] hDataArchive is used to store the handle of the data storage module and send a message to the data storage module to notify it to perform data storage.

[0118] Based on the same principle, in order to enable the second communication module to realize its corresponding function, in actual application, the network can also be initialized first, the thread corresponding to the communication with the train automatic monitoring device is run, and the send, receive and other functions are called to send and receive data with the train automatic monitoring device; then, the object related to the first communication module is associated, and the command data of the train automatic monitoring device is added to the message sending queue, so as to send the data to the data processing module using the message sending queue. At the same time, the first conversion data recognizable by the train automatic monitoring device is extracted from the data processing module using the message receiving queue.

[0119] The key fields involved in this process are:

[0120] CriticalSection, used to store multi-threaded data locks. This field is mainly used to prevent the second communication module from conflicting with the command data of the automatic train monitoring device sent to the data processing module when receiving the first conversion data;

[0121] ipconfig, used to store the IP port configuration when communicating with the automatic train monitoring device;

[0122] RecvQueue, used to store the received message queue;

[0123] SendQueue, used to store the send message queue;

[0124] pNet2Ci, used to store the object pointer of the IC communication module and forward the command to the first communication module when receiving the command data of the automatic train monitoring device;

[0125] pDataManger, used to store data manager objects and is responsible for maintaining device status in real time;

[0126] hDataArchive is used to store the handle of the data storage module and send a message to the data storage module to notify it to perform data storage.

[0127] Obviously, through the technical solution provided in this embodiment, the first communication module can be used to send the operating data of the ground target controller to the data processing module, and the command data of the automatic train monitoring device recognizable by the ground target controller can be extracted from the data processing module.

[0128] Based on the above embodiments, this embodiment further illustrates and optimizes the technical solution. Figure 3 , Figure 3 This is a structural diagram of another protocol converter provided by an embodiment of the present invention. As a preferred implementation, the protocol converter further includes:

[0129] The data storage module 15 is connected to the first communication module 11, the second communication module 12 and the data processing module 13, and is used to obtain the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data, and store the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data.

[0130] In this embodiment, in order to facilitate the viewing and analysis of the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data in the later stage, a data storage module 15 can also be set in the protocol converter, and the data storage module 15 is used to obtain the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data, and store the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data.

[0131] The following key fields are involved when designing a data storage module:

[0132] OnMsgCvtRecvfromCI, used to receive the data sent by the first communication module, and extract the second converted data from the data processing module for storage;

[0133] OnMsgCvtRecvfromATS, used to receive the data sent by the second communication module, and extract the first conversion data from the data processing module for storage;

[0134] pNet2Ci, used to store the object pointer of the first communication module;

[0135] pNet2Ats is used to store the object pointer of the second communication module.

[0136] Obviously, the technical solution provided in this embodiment can facilitate people to query and trace the operation data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data in the later stage.

[0137] As a preferred implementation, the data storage module 15 includes:

[0138] A data acquisition unit, used to acquire the operation data of the ground target controller, the command data of the automatic train monitoring device, the first conversion data and the second conversion data through boost::signal2 or the signals and slots in QT;

[0139] The data storage unit is used to store the operation data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data.

[0140] Specifically, the data storage module is provided with a data acquisition unit and a data storage unit, wherein the data acquisition unit is used to obtain the operation data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data through boost::signal2 or the signals and slots in QT, and the data storage unit is used to store the operation data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data.

[0141] Because boost::signal2 and the signals and slots in QT are built-in function libraries in C++, data can be safely and reliably obtained from other modules by calling the signals and slots in boost::signal2 and QT. Therefore, in this embodiment, the signals and slots in boost::signal2 or QT are used to obtain the operating data of the ground target controller, the command data of the train automatic monitoring device, the first conversion data and the second conversion data from the first communication module, the second communication module and the data processing module.

[0142] Obviously, the technical solution provided in this embodiment can ensure the flexibility of the data storage module when acquiring data from other modules.

[0143] Correspondingly, an embodiment of the present invention further provides a data processing method of a protocol converter, which is applied to a data processing module in a protocol converter disclosed above, and the method includes:

[0144] The operation data of the ground target controller is converted into data recognizable by the train automatic monitoring device using a preset data conversion format to obtain first conversion data, and the command data of the train automatic monitoring device is converted into data recognizable by the ground target controller to obtain second conversion data.

[0145] The data processing method of a protocol converter provided in this embodiment can refer to the contents disclosed in the above embodiments, and will not be described in detail here.

[0146] As a preferred implementation, the process of converting the operation data of the ground target controller into data recognizable by the automatic train monitoring device using a preset data conversion format to obtain the first conversion data includes:

[0147] Extracting state information of a designated object from operation data of a ground object controller to obtain object state information;

[0148] Creating a byte format recognizable by a train automatic monitoring device according to the target state information to obtain a target byte format;

[0149] Reconstructing the target state information according to a preset byte format to obtain target reconstructed data;

[0150] The target reconstructed data is format-converted according to the target byte format to obtain first converted data.

[0151] It is understandable that, because the running data of the ground target controller contains the status information of multiple devices, such as: the dynamic status information of the train door, the dynamic status information of the turnout, and the dynamic status information of the anti-flooding door, etc., in order to make the dynamic status information of each type of equipment in the running data of the ground target controller can be converted into data that can be recognized by the train automatic monitoring device, it is necessary to convert the format of each type of data in the running data of the ground target controller. Therefore, when using the pre-set data conversion format to convert the running data of the ground target controller into data that can be recognized by the train automatic monitoring device, the state information of the specified object is first extracted from the running data of the ground target controller to obtain the target state information. Among them, the specified objects include: turnouts, anti-flooding doors, sections, and function buttons, etc.

[0152] Then, a byte format recognizable by the train automatic monitoring device is created according to the target state information to obtain the target byte format. That is, a target byte format corresponding to the train automatic monitoring device is created according to the communication protocol recognizable by the train automatic monitoring device, wherein various field information about the target state information is stored in each storage location of the target byte format. For example, field information about train delay time, turnout status, train number, etc. is stored in each storage location of the target byte format.

[0153] Afterwards, the target state information is reconstructed according to the preset byte format to obtain the target reconstructed data. That is, various field information about the target state information is stored in each storage location of the preset byte format. Obviously, in this way, the target state information can be stored in the target reconstructed data according to a unified data storage format.

[0154] Finally, the target reconstructed data is format-converted according to the target byte format to obtain the first converted data. That is, according to the data content that should be stored in a certain storage position in the target byte format, the corresponding data content is read from the target reconstructed data to fill the storage position in the target byte format, so that the first converted data recognizable by the train automatic monitoring device can be obtained.

[0155] Obviously, through the technical solution provided in this embodiment, the operating data of the ground target controller can be uniformly converted into data that can be recognized by the train automatic monitoring device, thereby allowing the ground target controller to flexibly exchange data with the train automatic monitoring device.

[0156] As a preferred implementation, the above step of creating a byte format recognizable by the automatic train monitoring device according to the target state information to obtain the target byte format includes:

[0157] Based on the communication protocol between the ground target controller and the automatic train monitoring device, a byte format recognizable by the automatic train monitoring device is created according to the target state information to obtain the target byte format.

[0158] Specifically, in this embodiment, the target byte format recognizable by the automatic train monitoring device is created based on the communication protocol used by the ground target controller and the automatic train monitoring device and according to the target state information. Of course, in actual applications, other communication protocols recognizable by the automatic train monitoring device can also be used to create the target byte format, which will not be described in detail here.

[0159] Obviously, the technical solution provided by this embodiment can improve the universality when establishing the target byte format.

[0160] As a preferred embodiment, when the designated object is a turnout, the target byte format is sequentially provided with a first information storage area for storing the status information of the turnout, a second information storage area for storing the train delay time, a third information storage area for storing the train ID number, and a fourth information storage area for storing reserved information in order of position, and the preset byte format is sequentially provided with a first data storage area for storing the status information of the turnout, a second data storage area for storing the train delay time, and a third data storage area for storing the train ID number.

[0161] If the designated object is a turnout, the state information about the turnout can be extracted from the running data of the ground target controller to obtain the dynamic state information about the turnout. At this time, the target byte format that can be recognized by the automatic train monitoring device can be created based on the dynamic state information of the turnout.

[0162] Specifically, the target byte format stores, in order of position, a first information storage area for storing the state information of the turnout, a second information storage area for storing the train delay time, a third information storage area for storing the train ID number, and a fourth information storage area for storing the reserved information. The reserved information stored in the fourth information storage area can be used by the user to develop or upgrade the device in the later stage.

[0163] If the number of bytes occupied by the target byte format is 10 bytes, then the number of bytes occupied by the first information storage area, the second information storage area, the third information storage area and the fourth information storage area can be set to 1 byte, 1 byte, 4 bytes and 4 bytes respectively. Among them, byte 0 of the first information storage area is used to store the state information of the turnout, byte 1 of the second information storage area is used to store the train delay time, bytes 2 to byte 5 of the third information storage area are used to store the train ID (Identity Document) number, and bytes 6 to byte 9 of the fourth information storage area are used to store reserved information.

[0164] See also Figure 4 , Figure 4 Schematic diagram of the data format of byte 1 of the second information storage area. The train delay time can be filled from bit 0 to bit 7 from low to high.

[0165] The preset byte format is sequentially provided with a first data storage area for storing the state information of the turnout, a second data storage area for storing the train delay time, and a third data storage area for storing the train ID number in sequence according to the position.

[0166] It should be noted that the number of bytes occupied by each storage area in the target byte format and the preset byte format can be adaptively adjusted according to actual conditions, and the information content stored in each storage area in the target byte format and the preset byte format can also be adaptively adjusted according to actual conditions.

[0167] Obviously, through the technical solution provided in this embodiment, the dynamic state information about the turnout can be accurately and completely stored in the target byte format and the preset byte format.

[0168] As a preferred embodiment, the first information storage area occupies 1 byte, and the first information storage area is sequentially provided with a 2-bit first information storage unit for storing the positive and reverse position status information of the turnout, a 1-bit second information storage unit for storing the fork status information of the turnout, a 2-bit third information storage unit for storing the blocking status information of the turnout, a 1-bit fourth information storage unit for storing the allocation status information of the turnout, a 1-bit fifth information storage unit for storing blank information, and a 1-bit sixth information storage unit for storing the fault status information of the turnout.

[0169] In this embodiment, the information content stored in each storage location in the first information storage area is specifically described, wherein the data format of byte 0 in the first information storage area is shown in Table 1.

[0170] Table 1

[0171]

[0172] In Table 1, bit 0 to bit 1 represent the first information storage area, bit 2 represents the second information storage area, bit 3 to bit 4 represent the third information storage area, bit 5 represents the fourth information storage area, bit 6 represents the fifth information storage area, and bit 7 represents the sixth information storage unit.

[0173] Please refer to Table 2 for the description of turnout locations:

[0174] Table 2

[0175]

[0176] Obviously, through the technical solution provided in this embodiment, relevant information about the turnout can be stored in the storage area of ​​the first automatic train monitoring device.

[0177] As a preferred embodiment, the first data storage area occupies 1 byte, and the first data storage area is provided with a 2-bit first data storage unit for storing the position information of the turnout, a 1-bit second data storage unit for storing the individual locking status information of the turnout or the guiding total locking status information, a 1-bit third data storage unit for storing the blocking status information of the turnout, a 1-bit fourth data storage unit for storing the side protection status information of the turnout, a 1-bit fifth data storage unit for storing reserved data, a 1-bit sixth data storage unit for storing the driving status information of the turnout, and a 1-bit seventh data storage unit for storing the squeezing status information of the turnout.

[0178] In this embodiment, the information content stored in each storage location in the first data storage area is specifically described, wherein the data format of byte 0 in the first data storage area is shown in Table 3.

[0179] Table 3

[0180]

[0181] Among them, bit 0 and bit 1 represent the first data storage unit, that is, the position information of the turnout. For a detailed description of the turnout position information, please refer to Table 4:

[0182] Table 4

[0183]

[0184] Bit 2 represents the second data storage unit, that is, the locking state of the turnout. When the value corresponding to bit 2 is 1, it means that the turnout is locked individually, and when the value corresponding to bit 2 is 0, it means that the turnout is locked overall.

[0185] Bit 3 represents the third data storage unit, that is, the locking state of the turnout. When the value corresponding to bit 2 is 1, it means that the turnout is locked, and when the value corresponding to bit 2 is 0, it means that the turnout is not locked;

[0186] Bit 4 represents the fourth data storage unit, that is, the side protection state of the turnout. When the value corresponding to bit 4 is 1, it means that the side protection state of the turnout meets the requirements; when the value corresponding to bit 4 is 0, it means that the side protection state of the turnout does not meet the requirements;

[0187] Bit 5 represents the fifth data storage unit, i.e., reserved data;

[0188] Bit 6 represents the sixth data storage unit, that is, the driving state of the turnout. When the value corresponding to bit 6 is 1, it means that the turnout is being driven; when the value corresponding to bit 6 is 0, it means that the turnout is not being driven;

[0189] Bit 7 represents the seventh data storage unit, that is, the switch state. When the value corresponding to bit 7 is 1, it indicates that the switch is squeezed. When the value corresponding to bit 7 is 0, it indicates that the switch is not squeezed.

[0190] Obviously, through the technical solution provided in this embodiment, all relevant information about the turnout can be stored in the first data storage area.

[0191] In order to enable those skilled in the art to more clearly understand the implementation principle of the present application, the above disclosed technical content is described in detail here through an application scenario embodiment. Figure 5 , Figure 5 A design architecture diagram of a protocol converter provided in an embodiment of the present invention.

[0192] The protocol converter is provided with a first communication module, a second communication module, a data processing module, a data scheduling module and a data storage module, and each of the first communication module, the second communication module, the data processing module, the data scheduling module and the data storage module is provided with a corresponding thread for starting the module to work. That is, thread 1, thread 2, thread 3 and thread 4 are respectively used to start the first communication module, the second communication module, the data processing module, the data scheduling module and the data storage module.

[0193] In the protocol converter, the data processing module will use a pre-set data conversion format to convert the operating data of the ground target controller into data recognizable by the train automatic monitoring device, and convert the command data of the train automatic monitoring device into operating data recognizable by the ground target controller.

[0194] The first communication module will obtain the operating data from the ground target controller. After obtaining the operating data of the ground target controller, the first communication module will send the operating data of the ground target controller to the data processing module. At the same time, the first communication module will also extract the operating data that can be recognized by the ground target controller from the data processing module. After extracting the operating data that can be recognized by the ground target controller, the ground target controller communication module will send these data to the ground target controller.

[0195] At the same time, the second communication module will obtain command data from the train automatic monitoring device and send the obtained command data of the train automatic monitoring device to the data processing module. At the same time, the second communication module will also obtain command data recognizable by the train automatic monitoring device from the data processing module. After extracting the command data recognizable by the train automatic monitoring device, the second communication module will send these command data to the train automatic monitoring device.

[0196] During the data interaction between the first communication module, the second communication module and the data processing module, the data storage module will also extract the operation data of the ground target controller and the command data of the train automatic monitoring device from the first communication module and the second communication module respectively, and extract the processed operation data recognizable by the ground target controller and the command data recognizable by the train automatic monitoring device from the data processing module. When the data processing module obtains these data, in order to ensure the stability and reliability of data storage, it will also send these data to the hard disk for storage.

[0197] See also Figure 6 , Figure 6 A data processing flow chart of a protocol converter provided by an embodiment of the present invention. When using a protocol for protocol conversion, the data scheduling module triggers the first communication module, the data storage module, the second communication module and the data storage module to work together. The data processing flow includes:

[0198] Step S1: Initialize the data scheduling module to start the first communication module, the second communication module, the data storage module and the data processing module to work;

[0199] Step S2: The first communication module determines whether the operation data of the ground target controller is received; if so, step S3 is executed; if not, step S2 is continued:

[0200] Step S3: updating the data processing module so as to use the data processing module to convert the operation data of the ground target controller into command data recognizable by the train automatic monitoring device;

[0201] Step S4: sending the operating data of the ground target controller to the data storage module;

[0202] Step S5: The data storage module determines whether the operation data of the ground target controller is received; if so, step S6 is executed; if not, step S7 is executed;

[0203] Step S6: fetching the operation data of the ground object controller from the first communication module for storage;

[0204] Step S7: The data storage module determines whether the command data of the automatic train monitoring device is received; if so, step S8 is executed; if not, step S5 is executed;

[0205] Step S8: fetching the command data of the automatic train monitoring device from the second communication module for storage;

[0206] Step S9: the second communication module takes out command data recognizable by the automatic train monitoring device from the data processing module and sends it to the automatic train monitoring device;

[0207] Step S10: The automatic train monitoring device determines whether the command data of the automatic train monitoring device is received; if so, step S11 is executed; if not, step S9 is executed;

[0208] Step S11: sending the command data of the automatic train monitoring device to the data processing module, so as to use the data processing module to convert the command data of the automatic train monitoring device into operation data recognizable by the ground target controller;

[0209] Step 12: Store the command data of the automatic train monitoring device into the data storage module.

[0210] It should be noted that there is no order between the above steps S2, step 5 and step S9, and they are three steps executed in parallel. Figure 5 and Figure 6It can be seen that, when the protocol converter obtains the operating data of the ground target controller and the command data of the train automatic monitoring device, it can use the pre-set data conversion format to convert the operating data of the ground target controller into data recognizable by the train automatic monitoring device, and convert the command data of the train automatic monitoring device into data recognizable by the ground target controller. Under this setting, when the ground target controller exchanges data with the train automatic monitoring device, it does not need to pay attention to the model corresponding to the train automatic monitoring device. Therefore, through CVT, the ground target controller can flexibly exchange data with different models of train automatic monitoring devices.

[0211] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements that are not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0212] The above is a detailed introduction to a protocol converter and a data processing method thereof provided by the present invention. Specific examples are used in this article to illustrate the principle and implementation method of the present invention. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A data processing method for a protocol converter, characterized in that: Applied to a data processing module in a protocol converter, the method comprises: Using a preset data conversion format, the operation data of the ground target controller is converted into data recognizable by the automatic train monitoring device to obtain first conversion data, and the command data of the automatic train monitoring device is converted into data recognizable by the ground target controller to obtain second conversion data; The protocol converter comprises: A first communication module is used to send the operation data of the ground object controller to the data processing module, and simultaneously obtain the second conversion data from the data processing module, and send the second conversion data to the ground object controller; a second communication module, used for sending command data of the automatic train monitoring device to the data processing module, and simultaneously obtaining first conversion data from the data processing module, and sending the first conversion data to the automatic train monitoring device; The data processing module is connected to both the first communication module and the second communication module, and is used to convert the operation data of the ground target controller into data recognizable by the automatic train monitoring device using a preset data conversion format to obtain the first conversion data, and convert the command data of the automatic train monitoring device into data recognizable by the ground target controller to obtain the second conversion data; a data scheduling module, connected to the first communication module, the second communication module and the data processing module, and configured to schedule the communication processes of the first communication module, the second communication module and the data processing module; The first communication module comprises: A data sending unit, used for adding a mutex lock to the operation data of the ground target controller, obtaining target adding data, and sending the target adding data to the data processing module; a data extraction unit, configured to obtain the second conversion data from the data processing module, package the second conversion data, and send the packaged second conversion data to the ground target controller; Also includes: a data storage module, connected to the first communication module, the second communication module and the data processing module, and used to obtain the operation data of the ground object controller, the command data of the automatic train monitoring device, the first conversion data and the second conversion data, and store the operation data of the ground object controller, the command data of the automatic train monitoring device, the first conversion data and the second conversion data; The data storage module comprises: A data acquisition unit, used for acquiring the operation data of the ground target controller, the command data of the automatic train monitoring device, the first conversion data and the second conversion data through boost::signal2 or signals and slots in QT; A data storage unit, used for storing the operation data of the ground object controller, the command data of the automatic train monitoring device, the first conversion data and the second conversion data; The process of converting the operation data of the ground target controller into data recognizable by the train automatic monitoring device by using a preset data conversion format to obtain the first conversion data includes: Extracting state information of a designated object from the operation data of the ground object controller to obtain object state information; Creating a byte format recognizable by the automatic train monitoring device according to the target state information to obtain a target byte format; Reconstructing the target state information according to a preset byte format to obtain target reconstructed data; The target reconstructed data is format-converted according to the target byte format to obtain the first converted data; the number of bytes occupied by each storage area in the target byte format and the preset byte format can be adjusted according to actual conditions, and the information content stored in each storage area in the target byte format and the preset byte format can be adjusted according to actual conditions; The process of creating a byte format recognizable by the automatic train monitoring device according to the target state information to obtain a target byte format includes: Based on the communication protocol between the ground target controller and the automatic train monitoring device, and according to the target state information, a byte format recognizable by the automatic train monitoring device is created to obtain the target byte format; When the designated object is a turnout, the target byte format is sequentially provided with a first information storage area for storing the state information of the turnout, a second information storage area for storing the train delay time, a third information storage area for storing the train ID number, and a fourth information storage area for storing reserved information in order of position, and the preset byte format is sequentially provided with a first data storage area for storing the state information of the turnout, a second data storage area for storing the train delay time, and a third data storage area for storing the train ID number in order of position; The number of bytes occupied by the first information storage area is 1 byte, and the first information storage area is sequentially provided with a 2-bit first information storage unit for storing the forward and reverse position state information of the turnout, a 1-bit second information storage unit for storing the fork state information of the turnout, a 2-bit third information storage unit for storing the blocking state information of the turnout, a 1-bit fourth information storage unit for storing the allocation state information of the turnout, a 1-bit fifth information storage unit for storing blank information, and a 1-bit sixth information storage unit for storing the fault state information of the turnout; The number of bytes occupied by the first data storage area is 1 byte, and the first data storage area is sequentially provided with a 2-bit first data storage unit for storing the position information of the turnout, a 1-bit second data storage unit for storing the individual locking status information of the turnout or the guiding total locking status information, a 1-bit third data storage unit for storing the blocking status information of the turnout, a 1-bit fourth data storage unit for storing the side protection status information of the turnout, a 1-bit fifth data storage unit for storing reserved data, a 1-bit sixth data storage unit for storing the driving status information of the turnout, and a 1-bit seventh data storage unit for storing the squeezing status information of the turnout.