Search

CN-121973832-A - Train-ground wireless message encoding and decoding method of train control system based on reflection principle

CN121973832ACN 121973832 ACN121973832 ACN 121973832ACN-121973832-A

Abstract

The invention provides a train-ground wireless message encoding and decoding method of a train control system based on a reflection principle. The method comprises the steps of setting a message structure of a train-ground wireless message in a train control system, designing a parameter configuration table and a unpacking package control word table when the train-ground wireless message in the train control system is encoded and decoded, calling the parameter configuration table and the unpacking package control word table to assign values of variables, numerical types and arrays in the train-ground wireless message of the train control system through a reflection principle when the train-ground wireless message of the train control system is encoded and decoded, resolving the train-ground wireless message of the train control system into a structured message object, and carrying out visual processing on the structured message object. The invention enables the train-ground wireless message of the train control system to have expandability and breaks the limitation of message modification of the traditional encoding and decoding technology. The reusability of train-ground wireless messages of the train control system is improved. The separation of the encoding and decoding method and the message data structure is realized, and the method can be seamlessly transplanted to the analysis of the transponder message and the adjacent RBC message.

Inventors

  • FU QIANG
  • LI KAICHENG
  • QIN SHUZENG
  • YUAN LEI
  • WEI GUODONG
  • LIU YU

Assignees

  • 北京交通大学
  • 中国国家铁路集团有限公司

Dates

Publication Date
20260505
Application Date
20260107

Claims (6)

  1. 1. A train-ground wireless message encoding and decoding method of a train control system based on a reflection principle is characterized by comprising the following steps: setting a message structure of a train-ground wireless message in a train control system; Designing a parameter configuration table and a unpacking package control word table when encoding and decoding the train-ground wireless message in the train-ground wireless message based on the message structure of the train-ground wireless message; When the train-ground wireless information of the train-ground system is encoded and decoded, the parameter configuration table and the unpacking package control word table are called through a reflection principle to assign variables, numerical types and arrays in the train-ground wireless information of the train-ground system, and the train-ground wireless information of the train-ground system is analyzed into a structured information object; And carrying out visualization processing on the structured message object.
  2. 2. The method of claim 1, wherein the setting the message structure of the train-ground wireless message in the train control system comprises: Setting a message structure of a train-ground wireless message in an ETCS (electronic toll collection) system according to an ETCS language, wherein the message structure is a Tree structure Tree, the Tree structure Tree comprises 4 types of nodes, namely a root node, a basic variable node, an information packet node and a sub-structure node in the information packet, wherein the root node is a 1-level node, the basic variable node and the information packet node are 2-level root nodes, the sub-structure node in the information packet is a 3-level node, and the sub-structure node in the information packet comprises two types of control type and circulating type; The variable name FieldInfo. Name is set to indicate the type of packet, which includes a single packet and a nested packet defined with four fields, sequence number, variable name, number of bits and description.
  3. 3. The method of claim 2, wherein the parameter configuration table comprises 4 fields: Variable name, which represents the variable name defined according to ETCS language; The variable bit number is expressed as the bit number occupied by the variable; the variable description indicates the physical meaning or logic function corresponding to the variable name; and the value description represents the supplementary description of the variable digit.
  4. 4. The method of claim 2, wherein the unpacking group control word table comprises 7 fields: the controlled variable name represents the unique variable name in the message definition, and the variable name is determined by the corresponding control variable and is used as a key value of the control word dictionary; a control variable for dynamically controlling the existence, quantity or substructure of the controlled variable; the control type comprises switch control and circulation control; the control value is a specific value of a control variable and is an instruction signal for triggering the controlled variable processing logic; index offset, set to-1, the Count representing the controlled List is controlled by the previous variable; the cycle value deficit represents the newly added parameter value; node level, which is used for identifying the hierarchical division of the nodes of different hierarchies in the message.
  5. 5. The method of claim 4, wherein when the train-ground wireless message of the train control system is encoded and decoded, the parameter configuration table and the unpacking package control word table are called by a reflection principle to assign values to variables, numerical types and arrays in the train-ground wireless message of the train control system, and the train-ground wireless message of the train control system is parsed into a structured message object, which comprises: When the train-ground wireless information of the train control system is coded, firstly reading a parameter configuration table and a unpacking package control word table after software is started, traversing each node to the most basic leaf node through a traversing algorithm of a tree structure during coding to obtain a corresponding list of variable-variable values, and then writing the variable values into an array aligned by bits according to variable bits; When the train-ground wireless message of the train control system is decoded, a message class is generated according to the message ID, then the basic variable, the single information packet, the nested information packet and the nested sub-packet structure in the message class, the control node and the circulating node in the information packet are analyzed through the unpacking control word, and different reflection methods are called for the basic variable, the array and the generalized data structure of different types to obtain the value of the corresponding object.
  6. 6. The method of claim 5, wherein the step of determining the position of the probe is performed, the visualization processing for the structured message object comprises the following steps: the decoded train-ground wireless message of the train control system is displayed as a tree structure by using a Treeview control, different node types are displayed by using different levels, nodes are dynamically added in the tree structure by using an Add/AddRange method collected by operation Nodes, when the message is displayed as the tree structure, the wireless message name is displayed as a first-level node, the basic variable and the information packet in the message are displayed as a second-level node, the basic variable and the control structure in the information packet are displayed as a third-level node, and the basic variable and the sub-packet in the control structure are displayed as a fourth-level node.

Description

Train-ground wireless message encoding and decoding method of train control system based on reflection principle Technical Field The invention relates to the technical field of train operation control, in particular to a train-ground wireless message encoding and decoding method of a train control system based on a reflection principle. Background The train operation control system is an important component of railway technical equipment, and is a safety system for guaranteeing safe, orderly and efficient operation of trains. The existing advanced train control system adopts a GSM-R wireless communication system to realize safe data transmission between the vehicle-mounted equipment and the ground equipment, the ground equipment generates driving permission for each train according to the front driving condition and sends the driving permission to the vehicle-mounted equipment through vehicle-ground communication, and the vehicle-mounted equipment generates allowable speed according to the driving permission to prevent the train from overspeed overtaking or rear-end collision with the front train. Since 1980, europe developed CBTC (Communication Based Train Control System, communication-based train automatic control system) by using train high-precision positioning technology and wireless communication technology first, which has a high degree of automation, and realizes automatic train driving. Meanwhile, the system can realize mobile blocking, the train tracking interval can reach 90s, and the limit of the theoretical minimum interval is already approached. In the aspect of railway trunk lines, european train control systems (European Train Control System, ETCS) succeed in technical universality, functional standardization and the like, so that the technical standards of ETCS-0 to ETCS-3 are formed, and the comprehensive interconnection and intercommunication of train-ground signal systems are realized. The European country develops own high-speed railway train control systems by combining national conditions successively, and the most fundamental difference of the systems is that the control mode after overspeed of the high-speed train and the train-ground information transmission mode are different. At present, one wireless message encoding and decoding method in the prior art comprises a train-ground wireless message encoding and decoding method based on hard coding, wherein the hard coding refers to that specific numerical values, paths, parameters and the like are directly written into program codes and are not represented by variables or configuration files. This makes the values and parameters in the program fixed, not easy to modify, and lacks flexibility. Hard-coded values are often referred to as "magic numbers" or "magic strings" because they have no intuitive meaning and can only be understood by looking at the code. In parsing the packet, eightBitFromByte is used to first read the complete one byte, and then SevenBitFromByte, sixBitFromByte or another function is used to further subdivide the byte according to the requirements of the different fields. For fields that do not occupy the entire byte, such as only 2 or 3 bits, the bits are accurately extracted using TwoBitFromByte, threeBitFromByte or other functions and converted accordingly. Finally, through these bit operations and byte conversion, the original bit stream can be parsed into message fields with well-defined meanings, such as direction indication (q_dir), SCALE (q_scale), text category (q_ TEXTCLASS), and so on. The type of MESSAGE is first identified (via nid_message), which determines how the MESSAGE is subsequently processed. The length of the MESSAGE (l_message) is parsed to know how much data needs to be read. Depending on the different values of nid_packet, the program will execute different logic to parse the specific PACKET content. A bit manipulation function is used to extract the specific value of each field from the byte stream and assign it to the corresponding data member. Finally, if all the fields are successfully resolved, the internal state is updated or the corresponding business logic is triggered, otherwise, the error is recorded and the error code is returned. Drawbacks of the above-described wireless message encoding and decoding method in the prior art include: Complexity and maintenance difficulties as the number of supported packet types and fields increases, the complexity of the code also increases significantly. Different packets have different structures and parsing logic, which can cause the code to become difficult to understand and maintain. The extensibility is inadequate because the parsing logic is implemented by hard coding, which means that code must be manually updated when new types of packages are added or existing package definitions are modified, rather than through a configuration file or other more flexible means. Existing architectures require extensive modification to accommodate if