Data writing method for lineside electronic unit and lineside electronic unit

By employing a dual microcontroller architecture in the ground electronic unit to store and compare the original data and the inverted data separately, the interference problem in the data writing process is solved, the accuracy and reliability of data writing are achieved, and the security of the transponder system is improved.

WO2026031404A1PCT designated stage Publication Date: 2026-02-12CRSC RESEARCH & DESIGN INSTITUTE GROUP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/134649
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-08
Filing Date
2024-11-26
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

In existing technologies, the data writing process of ground electronic units is easily affected by external factors, leading to message reading errors and low system security and reliability.

Method used

A dual microcontroller architecture is adopted, with the original data and the inverted data stored in different storage areas of the storage module. The data consistency is confirmed by comparing the two microcontrollers, ensuring the accuracy of data writing.

Benefits of technology

It improves the accuracy and reliability of data writing to ground electronic units, prevents errors caused by external factors, and enhances the security of the transponder system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024134649_12022026_PF_FP_ABST
    Figure CN2024134649_12022026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a data writing method for a lineside electronic unit and a lineside electronic unit. The data writing method for the lineside electronic unit comprises: a storage module receives and stores data information sent by an external device, the data information comprising first data information and second data information; a first microcontroller unit reads the first data information, and stores first packet data in a first memory; a second microcontroller unit reads the second data information, obtains third packet data by inverting second packet data, and stores the third packet data in a second memory; and the first microcontroller unit or the second microcontroller unit compares the first packet data with the third packet data, and determines, when the first packet data is the same as the third packet data, that data writing of the lineside electronic unit has been completed. The technical solution of embodiments of the present invention can improve the accuracy and reliability of data writing of the lineside electronic unit, thereby improving the security of a transponder system.
Need to check novelty before this filing date? Find Prior Art

Description

Data writing method of ground electronic unit and ground electronic unit TECHNICAL FIELD

[0001] The present application relates to the field of railway signal transmission, and in particular to a data writing method of a ground electronic unit and the ground electronic unit. BACKGROUND

[0002] The ground electronic unit is an important part of the balise transmission system, which is a safety transmission system based on point information transmission, and realizes the safety information transmission between the wayside device or the ground device and the on-board device. The data information that can be provided includes signal data, control data, position and geographic information, train target running information, route information, line speed and temporary speed limit, etc. Because the number information of each active balise is different, the ground electronic unit needs to be individually programmed with the corresponding message and related configuration information before leaving the factory. Because the message contains line, temporary speed limit and other information, it is crucial to correctly program the message information.

[0003] In the prior art, an external device is usually used to connect with the ground electronic unit through an interface to program the message into the memory of the ground electronic unit. The MCU in the ground electronic unit can read the message from the memory to realize the message writing of itself. However, due to the external interference in the process of reading the message from the memory by the MCU or the process of message transmission, the message read by the MCU may be incorrect, and the safety and reliability of the system are low. SUMMARY

[0004] The present application provides a data writing method of a ground electronic unit and the ground electronic unit to improve the safety and reliability of the data writing of the ground electronic unit.

[0005] According to an aspect of the present application, a data writing method of a ground electronic unit is provided, the ground electronic unit comprising a storage module, a first micro control unit and a second micro control unit, the writing method comprising:

[0006] The storage module receives and stores the data information sent by the external device; the data information comprises first data information and second data information, the storage module comprises a first storage area and a second storage area, the first storage area is used for storing the first data information, and the second storage area is used for storing the second data information; the second message data in the second data information is equal to the negation of the first message data of the first data information;

[0007] The first micro control unit reads the first data information stored in the first storage area, and stores the first message data into the first memory of the first micro control unit;

[0008] The second micro control unit reads the second data information stored in the second storage area, obtains third message data by taking the second message data, and stores the third message data in the second memory of the second micro control unit;

[0009] The first micro control unit or the second micro control unit compares the first message data and the third message data, and determines that the ground electronic unit data is written completely when the first message data and the third message data are the same.

[0010] Optionally, the first data information further comprises a first check code;

[0011] After the first micro control unit reads the first data information stored in the first storage area and stores the first message data in the first memory of the first micro control unit, the method further comprises:

[0012] The first micro control unit determines whether the first micro control unit reads successfully according to the first check code;

[0013] If yes, the first micro control unit sends reading success information to the second micro control unit;

[0014] The second micro control unit reads the second data information stored in the second storage area, obtains third message data by taking the second message data, and stores the third message data in the second memory of the second micro control unit.

[0015] The second micro control unit reads the second message data stored in the second storage area after receiving the reading success information, obtains third message data by taking the second message data, and stores the third message data in the second memory of the second micro control unit.

[0016] Optionally, the first micro control unit determines whether the first micro control unit reads successfully according to the first check code, comprising:

[0017] The first micro control unit stores a first preset algorithm corresponding to the first check code;

[0018] When the first micro control unit reads the first message data and the first check code stored in the first storage area, the first preset algorithm is used to determine a third check code;

[0019] If the first check code is the same as the third check code, the first micro control unit determines that the first micro control unit reads successfully according to the first check code.

[0020] If the first check code is different from the third check code, the first micro control unit determines that the first micro control unit does not read successfully according to the first check code.

[0021] Optionally, the second data information further comprises a second check code.

[0022] The second micro control unit reads the second packet data stored in the second storage area after receiving the reading success information, obtains third packet data by taking the second packet data as complement, and stores the third packet data in the second memory of the second micro control unit, comprising:

[0023] The second micro control unit reads the second packet data and the second check code of the second storage area after receiving the reading success information.

[0024] The second micro control unit determines whether the second micro control unit reads successfully according to the second check code.

[0025] If yes, the second micro control unit obtains third packet data by taking the second packet data as complement, and stores the third packet data in the second memory of the second micro control unit.

[0026] Optionally, the second micro control unit determines whether the second micro control unit reads successfully according to the second check code, comprising:

[0027] The second micro control unit stores a second preset algorithm corresponding to the second check code.

[0028] When the second micro control unit reads the second packet data and the second check code stored in the second storage area, the second preset algorithm is used to determine a fourth check code.

[0029] If the second check code is the same as the fourth check code, the second micro control unit determines that the second micro control unit reads successfully according to the second check code.

[0030] If the second check code is different from the fourth check code, the second micro control unit determines that the second micro control unit does not read successfully according to the second check code.

[0031] Optionally, the calculation method of the first check code and the second check code is different; the first preset algorithm is different from the second preset algorithm.

[0032] Optionally, the first message data comprises configuration parameters and default messages; and the first data information is stored in the form of the configuration parameters, first check code, the default messages and the first check code.

[0033] The second message data comprises negated values of the configuration parameters and the default messages; and the second data information is stored in the form of the negated values of the configuration parameters, second check code, the negated values of the default messages and the second check code.

[0034] Optionally, the data writing method of the ground electronic unit further comprises:

[0035] In the case that the first message data and the third message data are different, the first micro control unit and the second micro control unit are restarted; and the step of reading the first data information stored in the first storage area by the first micro control unit and storing the first message data into the first memory of the first micro control unit is executed again.

[0036] According to another aspect of the present application, there is provided a ground electronic unit comprising a storage module, a first micro control unit and a second micro control unit.

[0037] The storage module is connected with the first micro control unit and the second micro control unit respectively, and the first micro control unit is connected with the second micro control unit.

[0038] The storage module is configured to receive and store data information sent by an external device; the first micro control unit is configured to read first data information stored in a first storage area and store first message data into a first memory of the first micro control unit; and the second micro control unit is configured to read second data information stored in a second storage area, obtain third message data by negating second message data, and store the third message data into a second memory of the second micro control unit.

[0039] The first micro control unit is further configured to compare the stored first message data with the third message data stored by the second micro control unit, and determine that the data writing of the ground electronic unit is completed in the case that the first message data and the third message data are the same.

[0040] Alternatively, the second micro control unit is further configured to compare the stored third message data with the first message data stored by the first micro control unit, and determine that the data writing of the ground electronic unit is completed in the case that the first message data and the third message data are the same.

[0041] Optionally, the ground electronic unit further comprises an external interface and a protocol conversion module.

[0042] The protocol conversion module is connected with the storage module, the first micro control unit, the second micro control unit and the external interface respectively; the external interface is used for connecting external equipment;

[0043] The protocol conversion module is used for converting the first communication protocol of the external interface into the second communication protocol matched with the storage module, the first micro control unit and the second micro control unit.

[0044] Optionally, the ground electronic unit further comprises a protection circuit; the protection circuit comprises an optical coupling module; a first end of the optical coupling module is connected with a power supply end of the external interface, a second end of the optical coupling module is connected with a grounding end of the external interface, a third end of the optical coupling module is connected with a write protection end of the storage module and accessed to a power supply voltage, and a fourth end of the optical coupling module is grounded.

[0045] The storage module is used for realizing read-write function when the write protection end is high level, and is used for realizing read-only function when the write protection end is low level.

[0046] The technical scheme of the embodiment of the application, the storage module stores the first data information in the first storage area and the second data information in the second storage area, and the second message data in the second data information is the negated value of the first message data in the first data information. The first micro controller stores the first message data and the second micro control unit stores the third message data obtained by negating the second message data, and further compares the first message data and the third message data. When the comparison result is completely consistent, the ground electronic unit data writing is completed, the data error in the transmission process can be quickly detected, and the protection in the message data reading process can be realized, the message data error caused by external factors and the safety hidden danger caused by the message data error cannot be found, the accuracy and reliability of the ground electronic unit data writing are improved, and the safety of the transponder system is improved.

[0047] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0049] Fig. 1 is a structural schematic diagram of a ground electronic unit according to an embodiment of the present application;

[0050] Fig. 2 is a flow chart of a data writing method of a ground electronic unit according to an embodiment of the present application;

[0051] Fig. 3 is a flow chart of a data writing method of a ground electronic unit according to another embodiment of the present application;

[0052] Fig. 4 is a flow chart of a data writing method of a ground electronic unit according to another embodiment of the present application;

[0053] Fig. 5 is a flow chart of a data writing method of a ground electronic unit according to another embodiment of the present application;

[0054] Fig. 6 is a flow chart of a data writing method of a ground electronic unit according to another embodiment of the present application;

[0055] Fig. 7 is a structural schematic diagram of a storage module according to an embodiment of the present application;

[0056] Fig. 8 is a flow chart of a data writing method of a ground electronic unit according to another embodiment of the present application;

[0057] Fig. 9 is a structural schematic diagram of a ground electronic unit according to another embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the personnel in the art without creative labor should belong to the scope of protection of the present application.

[0059] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product, or device.

[0060] The embodiment of the present application provides a data writing method of a ground electronic unit, which can be applied to the ground electronic unit provided with a ground electronic unit including a storage module, a first micro control unit and a second micro control unit. For the convenience of description, the structure of the ground electronic unit is first briefly described in combination with FIG. 1.

[0061] FIG. 1 is a structural schematic diagram of a ground electronic unit provided by the embodiment of the present application. Referring to FIG. 1, the ground electronic unit provided by the embodiment of the present application includes a storage module 10, a first micro control unit 20 and a second micro control unit 30. The ground electronic unit is an important component of a transponder transmission system. Under normal circumstances, the ground electronic unit will transparently transmit the received message data to an external active transponder after security check. When the input channel fails or the ground electronic unit internally fails, the default message stored in the ground electronic unit itself will be selected and transmitted to the external active transponder. The transparent transmission is a communication technology, which allows data to be transmitted without any change or disturbance in the transmission process, so as to ensure that the data received by the receiving end is completely consistent with the data sent by the sending end.

[0062] The first micro control unit 20 and the second micro control unit 30 are used to read the data needed to be written into the ground electronic unit through the storage module 10. Specifically, the ground electronic unit communicates with an external device storing the data to be written into the ground electronic unit, and stores the pre-written data into the storage module 10. When the ground electronic unit is powered on again, that is, the first micro control unit 20 and the second micro control unit 30 are powered on again, the first micro control unit 20 and the second micro control unit 30 will read the data in the storage module 10 and store them in the memory of the first micro control unit 20 and the second micro control unit 30, respectively. For example, the first micro control unit 20 first reads the data in the storage module 10 and stores them in the memory of the first micro control unit 20. The first micro control unit 20 informs the second micro control unit 30 of the data reading success information through the communication interface between the first micro control unit 20 and the second micro control unit 30. Further, the second micro control unit 30 reads the data in the storage module 10 and stores them in the memory of the second micro control unit 30. Alternatively, the second micro control unit 30 first reads the data in the storage module 10 and stores them in the memory of the second micro control unit 30. The second micro control unit 30 informs the first micro control unit 20 of the data reading success information through the communication interface between the second micro control unit 30 and the first micro control unit 20. Further, the first micro control unit 20 reads the data in the storage module 10 and stores them in the memory of the first micro control unit 20.

[0063] FIG. 2 is a flow chart of a data writing method of a ground electronic unit provided by the embodiment of the present application. Referring to FIG. 2, the data writing method of the ground electronic unit includes the following steps.

[0064] S201, the storage module receives and stores the data information sent by the external device; the data information includes first data information and second data information, the storage module includes a first storage area and a second storage area, the first storage area is used for storing the first data information, and the second storage area is used for storing the second data information; second message data in the second data information is equal to the negation of first message data in the first data information.

[0065] The second data information can be data information obtained by storing the first data information after data processing, for example, the second data information can be data information obtained by negating part of the data in the first data information. Specifically, the ground electronic unit is connected with the external device for writing data information, and then the storage module receives and stores the data information sent by the external device, and stores the first data information to the first storage area and the second data information to the second storage area; at the same time, the first data information includes first message data, and the second data information includes second message data, and the second message data is the negation of the first message data. The first message data can be a default message, and the second message data includes the negation of the default message, wherein the default message includes but is not limited to initialization information and driving information. Exemplarily, the initialization information can be area information, position information, state information, etc.; the driving information can be speed limit information, route information, prompt information, etc.

[0066] S202, the first micro control unit reads the first data information stored in the first storage area, and stores the first message data into the first memory of the first micro control unit.

[0067] The first memory can be at least one of a flash memory (Flash Memory), a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM) and an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM).

[0068] Specifically, the first micro control unit reads the first data information in the first storage area of the storage module, and stores the first message data in the first memory of the first micro control unit. Exemplarily, the first memory can be a RAM, which is used to store temporary data, variables, stacks and other runtime data that need to be frequently read and written, and the data will be lost after power off and will be read again and the first message data will be stored after power on. By storing the first message data in the RAM of the first micro control unit, fast access to data can be realized, and the response speed of the system can be improved. And the first micro control unit will read the first data information in the first storage area again every time the power is on, which can ensure the reliability of data reading each time.

[0069] S203, the second micro control unit reads the second data information stored in the second storage area, takes the second message data to get the third message data, and stores the third message data in the second memory of the second micro control unit.

[0070] Among them, the second memory can be at least one of flash memory (Flash Memory), read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM) and electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM).

[0071] Specifically, the second micro control unit reads the second data information in the second storage area of the storage module, and stores the third message data obtained by taking the second message data in the second memory of the second micro control unit. Exemplarily, the second memory can be a RAM, which is used to store temporary data, variables, stacks and other runtime data that need to be frequently read and written, and the data will be lost after power off and will be read again and the third message data will be stored after power on. By storing the third message data in the RAM of the second micro control unit, fast access to data can be realized, and the response speed of the system can be improved. And the second micro control unit will read the second data information in the second storage area again every time the power is on, which can ensure the reliability of data reading each time.

[0072] S204, the first micro control unit or the second micro control unit compares the first message data and the third message data, and determines that the ground electronic unit data is written in the case that the first message data and the third message data are the same.

[0073] The first micro control unit and the second micro control unit are connected through a communication interface, can exchange information, and implement a two-out-of-two safety architecture.

[0074] Specifically, the first message data is stored in the first memory of the first micro control unit, and the third message data is stored in the second memory of the second micro control unit. The first micro controller and the second micro controller compare the first message data and the third message data bit by bit. When the first message data and the third message data are completely consistent, it is determined that the data writing of the ground electronic unit is completed.

[0075] Optionally, the data writing method of the ground electronic unit further comprises:

[0076] In the case that the first message data and the third message data are different, the first micro control unit and the second micro control unit are restarted; and the step of reading the first data information stored in the first storage area by the first micro control unit and storing the first message data into the first memory of the first micro control unit is returned to be executed.

[0077] Specifically, the case that the first message data and the third message data are different can include: when the operation of reading the first data information in the first storage area by the first micro control unit is not successful, the first micro control unit informs the second micro control unit through the communication interface between the first micro control unit and the second micro control unit, at this time, the first micro control unit is restarted and the second micro control unit is also restarted; or when the operation of reading the first data information in the first storage area by the first micro control unit is successful, the first micro control unit informs the second micro control unit through the communication interface between the first micro control unit and the second micro control unit, at this time, the second micro control unit reads the second data information in the second storage area. When the second micro control unit does not read successfully, the second micro control unit informs the first micro control unit through the communication interface between the first micro control unit and the second micro control unit, at this time, the second micro control unit is restarted and the first micro control unit is also restarted. After the first micro control unit and the second micro control unit are restarted, the step of reading the first data information stored in the first storage area by the first micro control unit and storing the first message data into the first memory of the first micro control unit is returned to be executed.

[0078] Specifically, in the case that the reading process of the first micro control unit and the second micro control unit and the transmission process of the data information are correct, the third message data and the first message data should be the same; if the third message data and the first message data are different, it indicates that there is an error in the reading process of the first micro control unit or the second micro control unit or the transmission process of the data information, thus, by comparing the third message data and the first message data, the error in the reading process of the first micro control unit or the second micro control unit or the transmission process of the data information can be found in time, and the security risk caused by the fact that the message data error caused by external factors cannot be found is avoided, the protection in the message data reading process is realized, the accuracy and reliability of the data writing of the ground electronic unit are improved, and the safety of the transponder system is further improved.

[0079] The technical scheme of the embodiment of the application, the storage module stores the first data information in the first storage area and the second data information in the second storage area, and the second message data in the second data information is the complement of the first message data in the first data information. The first micro controller stores the first message data and the second micro control unit stores the third message data obtained by taking the complement of the second message data, and further compares the first message data and the third message data, when the comparison result is completely consistent, it is determined that the data writing of the ground electronic unit is completed, whether a data error occurs in the transmission process can be quickly detected, the protection in the message data reading process can be realized, the message data error caused by external factors and the security risk caused by the fact that the message data error cannot be found are avoided, the accuracy and reliability of the data writing of the ground electronic unit are improved, and the safety of the transponder system is further improved.

[0080] Fig. 3 is a flow chart of another data writing method of a ground electronic unit provided by the embodiment of the application, referring to Fig. 3, on the basis of the above-mentioned embodiments, the first data information further includes a first check code, and the data writing method of the ground electronic unit includes:

[0081] S301, the storage module receives and stores the data information sent by the external device; the data information includes first data information and second data information, the storage module includes a first storage area and a second storage area, the first storage area is used for storing the first data information, and the second storage area is used for storing the second data information; the second message data in the second data information is equal to the complement of the first message data of the first data information.

[0082] S302, the first micro control unit reads the first data information stored in the first storage area, and stores the first message data into the first memory of the first micro control unit.

[0083] S303, the first micro control unit determines whether the first micro control unit reads successfully according to the first check code. If yes, S304 is executed; if no, the first micro control unit and the second micro control unit restart and then S302 is executed.

[0084] The check code is used to check the integrity and accuracy of the message data. The check code can be calculated by an external device through different check methods. For example, the check method can include: parity check, which sets the number of "1" in the data bit number to be odd or even, and ensures the number of "1" in the transmitted data to comply with the parity check bit setting through the setting of the check bit. Alternatively, cyclic redundancy check (CRC), which generates a set of redundancy check codes through division operation, and appends to the original data, and the receiver also performs the same division operation to verify the integrity of the data. Alternatively, checksum, which adds data according to certain rules, and then appends the result to the data, and the receiver performs the same calculation on the received data to verify the correctness of the data. For example, the line or temporary speed limit information and the storage form of the default message of the first data information and the second data information are different, for example, zero padding or negation is performed. For example, the first data information can be 00101011, and after zero padding operation, the second data information can be 0010101100000000. Alternatively, the first data information can be 00101011, and after negation operation, the second data information can be 11010100. And / or, the check information for error detection is different, for example, the first data information and the second data information use the same check information, but the check method is different. The first message data and the second message data both include line or temporary speed limit information and default message, and the second message data is equal to the negation value of the first message data, and the data information form stored in the first storage area and the second storage area is different, and both are used to improve the security and reliability of the data. For example, the first message data can be 00111011, and the second message data can be 11000100.

[0085] Optionally, the first check code is used to check the integrity and accuracy of the first message data in the first data information. For example, a data is calculated (for example, by CRC) as the first check code by the external device, and then the first check code is transmitted or stored together with the first message data. When the receiver or the reader (i.e. the first micro control unit) reads the first message data, the same algorithm is used to calculate the check code again, and it is compared with the received check code. If the two check codes are consistent, it means that the message data has not been error during transmission or storage; if not, it means that the data may have been damaged. By setting the first check code, the first micro control unit can find out whether the first message data is incorrect in time, and the integrity and reliability of data transmission can be ensured.

[0086] S304, sending the reading success information to the second micro control unit.

[0087] Specifically, the first micro control unit and the second micro control unit are connected and communicate through the communication interface, and when the first micro control unit determines that the read first message data is correct, the reading success information is sent to the second micro control unit.

[0088] S305, after receiving the reading success information, the second micro control unit reads the second message data stored in the second storage area, and obtains the third message data by taking the complement of the second message data, and stores the third message data in the second storage of the second micro control unit.

[0089] S306, the first micro control unit or the second micro control unit compares the first message data and the third message data, and determines that the ground electronic unit data is written when the first message data and the third message data are the same.

[0090] Fig. 4 is a flow chart of another data writing method of the ground electronic unit provided by the embodiment of the application, referring to Fig. 4, on the basis of the above embodiments, the data writing method of the ground electronic unit comprises:

[0091] S401, the storage module receives and stores the data information sent by the external device; the data information comprises first data information and second data information, the storage module comprises a first storage area and a second storage area, the first storage area is used to store the first data information, and the second storage area is used to store the second data information; the second message data in the second data information is equal to the complement of the first message data of the first data information.

[0092] S402, the first micro control unit reads the first data information stored in the first storage area, and stores the first message data into the first storage of the first micro control unit.

[0093] S403, when the first micro control unit reads the first message data and the first check code stored in the first storage area, determining a third check code through a first preset algorithm.

[0094] Specifically, when the first micro control unit reads the first message data and the first check code, the first micro control unit recalculates the check code through the first preset algorithm, that is, obtains the third check code.

[0095] Optionally, the first micro control unit stores a first preset algorithm used to determine the first check code.

[0096] Specifically, the first preset algorithm can be understood as an algorithm identical to the algorithm used by the external device to obtain the first check code.

[0097] Specifically, the first preset algorithm is stored in the first micro control unit.

[0098] S404, if the first check code is identical to the third check code, the first micro control unit determines that the first micro control unit reads successfully according to the first check code. If the reading is successful, S406 is executed.

[0099] Specifically, when the first check code and the third check code are identical, it indicates that the message data does not occur error in the transmission process, and then the first micro control unit stores the first message data in the first storage, and the first micro control unit determines that the first message data reads successfully. Through this setting, the accuracy and reliability of data transmission can be ensured.

[0100] S405, if the first check code is different from the third check code, the first micro control unit determines that the first micro control unit does not read successfully according to the first check code. If the reading is not successful, the first micro control unit and the second micro control unit are restarted, and S402 is executed.

[0101] Specifically, when the first check code and the third check code are different, it indicates that the message data occurs error in the transmission process, and then the first micro control unit cannot store the first message data in the first storage, and the first micro control unit determines that the first message data does not read successfully.

[0102] S406, sending reading success information to the second micro control unit.

[0103] S407, after receiving the reading success information, the second micro control unit reads the second message data stored in the second storage area, and obtains the third message data by taking the complement of the second message data, and stores the third message data in the second storage of the second micro control unit.

[0104] S408, the first micro control unit or the second micro control unit compares the first message data and the third message data, and determines that the ground electronic unit data is written completely in the case that the first message data and the third message data are same.

[0105] Fig. 5 is a flow chart of another data writing method of the ground electronic unit according to an embodiment of the present application. Referring to Fig. 5, on the basis of the above embodiments, the second data information further comprises a second check code, and the data writing method of the ground electronic unit comprises:

[0106] S501, the storage module receives and stores the data information sent by the external device; the data information comprises first data information and second data information, the storage module comprises a first storage area and a second storage area, the first storage area is used for storing the first data information, and the second storage area is used for storing the second data information; the second message data in the second data information is equal to the negated value of the first message data of the first data information.

[0107] S502, the first micro control unit reads the first data information stored in the first storage area, and stores the first message data into the first memory of the first micro control unit.

[0108] S503, the first micro control unit determines whether the first micro control unit reads successfully according to the first check code. If yes, S504 is executed; if not, the first micro control unit and the second micro control unit are restarted, and then S502 is executed.

[0109] S504, the read success information is sent to the second micro control unit.

[0110] S505, the second micro control unit reads the second message data and the second check code of the second storage area after receiving the read success information.

[0111] The second check code is used for checking the integrity and accuracy of the second message data in the second data information. For example, a data is calculated (for example, the calculation can be performed by CRC) by the external device as the second check code, and then the second check code is transmitted or stored together with the second message data. When the receiver or the reader (i.e. the second micro control unit) reads the second message data, the check code is calculated again by using the same algorithm, and is compared with the received check code. If the two check codes are consistent, it is indicated that the message data has no error in the transmission or storage process; if the two check codes are inconsistent, it is indicated that the data may be damaged. By setting the second check code, the second micro control unit can find whether the second message data is incorrect in time, and the integrity and reliability of the data transmission can be ensured.

[0112] S506, the second micro control unit determines whether the second micro control unit reads successfully according to the second check code. If yes, S507 is executed; if no, the first micro control unit and the second micro control unit restart and S502 is executed.

[0113] S507, the second message data is inverted to obtain third message data, and the third message data is stored in the second memory of the second micro control unit.

[0114] Specifically, after the second micro control unit reads the second message data, the same algorithm is used to calculate the check code again, and the calculated check code is compared with the received check code. If the two check codes are consistent, it indicates that the message data has not occurred error in the transmission or storage process, and then the second message data is inverted to obtain the third message data, and the third message data is further stored in the second memory.

[0115] S508, the first micro control unit or the second micro control unit compares the first message data and the third message data, and determines that the data of the ground electronic unit is written completely in the case that the first message data and the third message data are the same.

[0116] Fig. 6 is a flow chart of another data writing method of a ground electronic unit provided by an embodiment of the application. Referring to Fig. 6, on the basis of the above embodiments, the data writing method of the ground electronic unit comprises:

[0117] S601, a storage module receives and stores data information sent by an external device; the data information comprises first data information and second data information, the storage module comprises a first storage area and a second storage area, the first storage area is used for storing the first data information, and the second storage area is used for storing the second data information; second message data in the second data information is equal to an inverted value of first message data of the first data information.

[0118] Optionally, the first message data comprises configuration parameters and a default message; and the storage form of the first data information is the configuration parameters, a first check code, the default message and the first check code.

[0119] The configuration parameters can comprise line and temporary speed limit information.

[0120] Fig. 7 is a structural schematic view of a storage module provided by an embodiment of the application. Referring to Fig. 7, the data form in the first storage area 110 is configuration parameters, a first check code CRC1, a default message and the first check code CRC1.

[0121] The second message data comprises an inverted value of the configuration parameters and an inverted value of the default message; and the storage form of the second data information is the inverted value of the configuration parameters, a second check code CRC2, the inverted value of the default message and the second check code CRC2.

[0122] Continuing to refer to FIG. 7, the data in the second storage area 120 is in the form of the inverted value of the configuration parameter, the second check code, the inverted value of the default message and the second check code.

[0123] Optionally, continuing to refer to FIG. 7, the storage module further comprises a third storage area 130 for storing third data information, the third data information comprising third message data and a fifth check code CRC5.

[0124] The third message data can comprise production information and manufacturer information, etc. The fifth check code is calculated in a different manner from the first check code and the second check code.

[0125] S602, the first micro control unit reads the first data information stored in the first storage area and stores the first message data into the first memory of the first micro control unit.

[0126] S603, the first micro control unit determines whether the first micro control unit reads successfully according to the first check code. If yes, S604 is executed; if no, the first micro control unit and the second micro control unit are restarted and then S602 is executed.

[0127] S604, the read success information is sent to the second micro control unit.

[0128] S605, the second micro control unit reads the second message data and the second check code of the second storage area after receiving the read success information.

[0129] S606, when the second micro control unit reads the second message data and the second check code stored in the second storage area, the fourth check code is determined through a second preset algorithm.

[0130] Specifically, when the second micro control unit reads the second message data and the second check code, the second preset algorithm is used to recalculate the check code, i.e. the fourth check code is obtained.

[0131] Optionally, the second micro control unit stores the second preset algorithm used to determine the second check code.

[0132] The second preset algorithm can be understood as the same algorithm as that used by the external device to obtain the second check code.

[0133] Specifically, the second preset algorithm is stored in the second micro control unit.

[0134] Optionally, the first check code and the second check code are calculated in different manners; the first preset algorithm is different from the second preset algorithm.

[0135] Specifically, the first check code is obtained through a first preset algorithm, and the second check code is obtained through a second preset algorithm. The first preset algorithm is different from the second preset algorithm. For example, the first preset algorithm can be to use a CRC-8 algorithm to check the first message data to obtain the first check code; and the second preset algorithm can be to use a CRC-32 algorithm to check the second message data to obtain the second check code. Exemplarily, the first preset algorithm can be a CRC-8 algorithm, when the CRC-8 algorithm is used, the CRC polynomial can be 0x07, and the initial value can be 0x00. The second preset algorithm can be a CRC-32 algorithm, when the CRC-32 algorithm is used, the CRC polynomial can be 4C11DB7, and the initial value can be FFFFFFFF.

[0136] S607, if the second check code is the same as the fourth check code, the second micro control unit determines that the second micro control unit reads successfully according to the second check code. If the reading is successful, S609 is executed.

[0137] Specifically, when the second check code and the fourth check code are the same, it indicates that the message data does not occur error in the transmission process, and then the second micro control unit stores the second message data in the second memory, and the second micro control unit determines that the second message data is read successfully. Through this setting, the accuracy and reliability of data transmission can be ensured.

[0138] S608, if the second check code is different from the fourth check code, the second micro control unit determines that the second micro control unit does not read successfully according to the second check code. If the reading is not successful, the first micro control unit and the second micro control unit are restarted, and S602 is executed.

[0139] Specifically, when the second check code and the fourth check code are the same, it indicates that the message data does not occur error in the transmission process, and then the second micro control unit cannot store the second message data in the second memory, and the second micro control unit determines that the second message data is not read successfully.

[0140] S609, the second message data is inverted to obtain third message data, and the third message data is stored in the second memory of the second micro control unit.

[0141] S610, the first micro control unit or the second micro control unit compares the first message data and the third message data, and in the case that the first message data and the third message data are the same, it is determined that the ground electronic unit data is written.

[0142] FIG. 8 is a flow chart of another data writing method of a ground electronic unit provided by an embodiment of the application. With reference to FIG. 8, on the basis of the above embodiments, the data writing method of the ground electronic unit comprises:

[0143] S801, the storage module receives and stores data information sent by an external device; the data information includes first data information and second data information, the storage module includes a first storage area and a second storage area, the first storage area is used for storing the first data information, and the second storage area is used for storing the second data information; second packet data in the second data information is equal to the negation of first packet data in the first data information.

[0144] S802, the first micro control unit reads the first data information stored in the first storage area, and stores the first packet data into a first memory of the first micro control unit.

[0145] S803, when the first micro control unit reads the first packet data and the first check code stored in the first storage area, a third check code is determined through a first preset algorithm.

[0146] S804, if the first check code is the same as the third check code, the first micro control unit determines that the first micro control unit reads successfully according to the first check code. If the reading is successful, S806 is executed.

[0147] S805, if the first check code is different from the third check code, the first micro control unit determines that the first micro control unit does not read successfully according to the first check code. If the reading is not successful, the first micro control unit and the second micro control unit are restarted, and then S802 is executed.

[0148] S806, the reading success information is sent to the second micro control unit.

[0149] S807, the second micro control unit reads the second packet data and the second check code of the second storage area after receiving the reading success information.

[0150] S808, when the second micro control unit reads the second packet data and the second check code stored in the second storage area, a fourth check code is determined through a second preset algorithm.

[0151] S809, if the second check code is the same as the fourth check code, the second micro control unit determines that the second micro control unit reads successfully according to the second check code. If the reading is successful, S811 is executed.

[0152] S810, if the second check code is different from the fourth check code, the second micro control unit determines that the second micro control unit does not read successfully according to the second check code. If the reading is not successful, the first micro control unit and the second micro control unit are restarted, and then S802 is executed.

[0153] S811, the second packet data is negated to obtain third packet data, and the third packet data is stored in a second memory of the second micro control unit.

[0154] S812, the first micro control unit or the second micro control unit compares the first message data and the third message data, and in the case that the first message data and the third message data are the same, it is determined that the ground electronic unit data is written completely.

[0155] The embodiment of the present application also provides a ground electronic unit, which can refer to Fig. 1. The ground electronic unit comprises a storage module 10, a first micro control unit 20 and a second micro control unit 30; the storage module 10 is connected with the first micro control unit 20 and the second micro control unit 30 respectively, and the first micro control unit 20 is connected with the second micro control unit 30; the storage module 10 is used for receiving and storing data information sent by an external device, the first micro control unit 20 is used for reading first data information stored in a first storage area and storing first message data into a first memory of the first micro control unit 20, and the second micro control unit 30 is used for reading second data information stored in a second storage area, obtaining third message data by taking inverse of second message data, and storing the third message data into a second memory of the second micro control unit 30; the first micro control unit 20 is also used for comparing the stored first message data with the third message data stored by the second micro control unit 30, and in the case that the first message data and the third message data are the same, it is determined that the ground electronic unit data is written completely; or, the second micro control unit 30 is also used for comparing the stored third message data with the first message data stored by the first micro control unit 20, and in the case that the first message data and the third message data are the same, it is determined that the ground electronic unit data is written completely.

[0156] The technical scheme of the embodiment of the present application, the storage module stores first data information in a first storage area and stores second data information in a second storage area, and the second message data in the second data information is the inverse value of the first message data in the first data information. The first micro controller stores the first message data and the second micro control unit stores the third message data obtained by taking inverse of the second message data, and further compares the first message data and the third message data, and when the comparison result is completely consistent, it is determined that the ground electronic unit data is written completely, which can quickly detect whether data error occurs in the transmission process, and can realize protection in the process of reading message data, avoid message data error caused by external factors and safety hidden danger caused by message data error which cannot be found, improve the accuracy and reliability of data writing of the ground electronic unit, and further improve the safety of the transponder system.

[0157] Optionally, FIG. 9 is a structural schematic diagram of another ground electronic unit according to an embodiment of the present application. Based on the above embodiments, the ground electronic unit further comprises an external interface 40 and a protocol conversion module 50; the protocol conversion module 50 is connected with the storage module 10, the first micro control unit 20, the second micro control unit 30 and the external interface 40 respectively; the external interface 40 is used for connecting external devices; and the protocol conversion module 50 is used for converting the first communication protocol of the external interface into the second communication protocol matched with the storage module 10, the first micro control unit 20 and the second micro control unit 30.

[0158] The external interface 40 can be a USB interface, which is used for connecting the ground electronic unit with the external device 60 (for example, a PC) through a USB serial line. The protocol conversion module 50 can comprise a USB-to-IIC (Inter-Integrated Circuit, integrated circuit bus) chip, which is used for converting the USB protocol into the IIC protocol, and is used for realizing the pre-rewrite of the data information in the storage module 10, and is used for the first micro control unit 20 to read the data information in the storage module 10 through the IIC bus, and is used for the second micro control unit 30 to read the data information in the storage module 10 through the IIC bus.

[0159] Specifically, when the ground electronic unit is connected with the external device 60 through the external interface 40, the external device 60 pre-rewrites the data information in the ground electronic unit, and at this time, the data information is stored in the first storage area and the second storage area of the storage module 10 respectively. When the ground electronic unit is powered on, the first micro control unit 20 reads the first data information in the first storage area through the IIC bus, the first data information comprises the first message data and the first check code, when the first micro control unit obtains the third check code through the first preset algorithm and the first check code is the same as the third check code, the first micro control unit 20 stores the first message data into the RAM. Then, the first micro control unit 20 and the second micro control unit 30 communicate through the communication interface, when the second micro control unit 30 receives the message of the first micro control unit 20 writing successfully, the second micro control unit 30 reads the second data information in the second storage area through the IIC bus, the second data information comprises the second message data and the second check code, when the second micro control unit obtains the fourth check code through the second preset algorithm and the second check code is the same as the fourth check code, the second micro control unit 30 stores the second message data into the RAM. Further, the data writing of the ground electronic unit is successful. In this process, if at least one of the first micro control unit 20 and the second micro control unit 30 fails to read the data information in the storage module 30 through the IIC bus, the first micro control unit 20 and the second micro control unit 30 restart.

[0160] Optionally, with reference to Figure 9, on the basis of the above embodiments, the ground electronic unit further comprises a protection circuit 70; the protection circuit 70 comprises an optical coupling module U1; a first end of the optical coupling module U1 is connected with a power supply end VCC_1 of the external interface 40, a second end of the optical coupling module U1 is connected with a ground end of the external interface 40, a third end of the optical coupling module U1 is connected with a power supply voltage VCC and a write protection end 11 of the storage module 10, and a fourth end of the optical coupling module U1 is grounded; the storage module 10 is configured to realize read-write function when the write protection end 11 is high, and realize read-only function when the write protection end 11 is low.

[0161] Specifically, when the ground electronic unit is connected with the external device through the external interface 40, the first end of the optical coupling module U1 is connected with VCC_1 which is high, at this time the optical coupling module U1 is turned on, and then the write protection end 11 of the storage module 10 is grounded, at this time the storage module 10 enters the read-write mode and can be read and written at will. When the ground electronic unit is disconnected with the external device, the power supply end VCC_1 of the external interface 40 is powered off, at this time the optical coupling module U1 is turned off, and then the write protection end 11 of the storage module 10 is pulled up to high, at this time the storage module 10 enters the read-only mode and cannot be written.

[0162] The technical scheme of the embodiment of the application realizes that when connected with the external device, the configuration can be normally written, and after the external device is disconnected, the read-only mode is entered and the content of the storage module cannot be modified, thereby realizing the safe setting of the write protection.

[0163] Optionally, with reference to Figure 9, on the basis of the above embodiments, the protection circuit 70 further comprises a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5 and a filter capacitor C1; the storage module 10 further comprises a serial data end 12 and a serial clock end 13.

[0164] A first end of the first resistor R1 is connected with the power supply end VCC_1 of the external interface 40, a second end of the first resistor R1 is connected with the first end of the optical coupling module U1, a first end of the second resistor R2 is connected with the power supply voltage VCC, a second end of the second resistor R2 is connected with a first end of the third resistor R3 and the write protection end 11 of the storage module 10, a second end of the third resistor R3 is grounded, a first end of the fourth resistor R4 and a first end of the fifth resistor R5 are connected with the power supply voltage VCC, a second end of the fourth resistor R4 is connected with the serial data end 12 of the storage module 10, a second end of the fifth resistor R5 is connected with the serial clock end 13 of the storage module 10, a first end of the filter capacitor C1 is grounded, and a second end of the filter capacitor C2 is connected with the power supply voltage VCC.

[0165] Among them, the first resistor R1 is used for current limiting; the second resistor R2, the fourth resistor R4 and the fifth resistor R5 are all pull-up resistors, the second resistor R2 is used for protecting the optical coupling module U1, and is usually in a non-connected state; and the filter capacitor C1 is used for filtering. The serial data end 12 and the serial clock end 13 of the storage module 10 are connected with the protocol conversion module 50.

[0166] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, the steps described in the present application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.

[0167] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data write method of a ground electronic unit, characterized by, The ground electronic unit comprises a storage module, a first micro control unit and a second micro control unit, and the writing method comprises: The storage module receives and stores data information sent by an external device; the data information comprises first data information and second data information, the storage module comprises a first storage area and a second storage area, the first storage area is used for storing the first data information, and the second storage area is used for storing the second data information; second packet data in the second data information is equal to an inverse value of first packet data of the first data information; The first micro control unit reads the first data information stored in the first storage area and stores the first packet data into a first memory of the first micro control unit; The second micro control unit reads the second data information stored in the second storage area, obtains third packet data by inversing the second packet data, and stores the third packet data in a second memory of the second micro control unit; The first micro control unit or the second micro control unit compares the first packet data and the third packet data, and determines that the ground electronic unit data is written completely in a case where the first packet data and the third packet data are the same.

2. The data write method of the ground electronic unit according to claim 1, characterized in that, The first data information further comprises a first check code; After the first micro control unit reads the first data information stored in the first storage area and stores the first packet data into a first memory of the first micro control unit, the method further comprises: The first micro control unit determines whether the first micro control unit reads successfully according to the first check code; If yes, sends reading success information to the second micro control unit; The second micro control unit reads the second data information stored in the second storage area, obtains third packet data by inversing the second packet data, and stores the third packet data in a second memory of the second micro control unit, which comprises: The second micro control unit reads the second packet data stored in the second storage area after receiving the reading success information, obtains third packet data by inversing the second packet data, and stores the third packet data in a second memory of the second micro control unit.

3. The data write method of the ground electronic unit according to claim 2, characterized in that, The first micro control unit determines whether the first micro control unit reads successfully according to the first check code, which comprises: The first micro control unit stores a first preset algorithm corresponding to the first check code; When the first micro control unit reads the first packet data and the first check code stored in the first storage area, a third check code is determined through the first preset algorithm; If the first check code is the same as the third check code, the first micro control unit determines that the first micro control unit reads successfully according to the first check code; If the first check code is different from the third check code, the first micro control unit determines that the first micro control unit does not read successfully according to the first check code.

4. The data write method of the ground electronic unit according to claim 2, wherein, The second data information further comprises a second check code; The second micro control unit reads the second message data stored in the second storage area after receiving the reading success information, and obtains third message data by taking the complement of the second message data, and stores the third message data in the second memory of the second micro control unit, comprising: The second micro control unit reads the second message data and the second check code of the second storage area after receiving the reading success information; The second micro control unit determines whether the second micro control unit reads successfully according to the second check code; If yes, the third message data is obtained by taking the complement of the second message data, and the third message data is stored in the second memory of the second micro control unit.

5. The data write method of the ground electronic unit according to claim 4, characterized in that, The second micro control unit determines whether the second micro control unit reads successfully according to the second check code, comprising: The second micro control unit stores a second preset algorithm for determining the second check code; When the second micro control unit reads the second message data and the second check code stored in the second storage area, the fourth check code is determined by the second preset algorithm; If the second check code is the same as the fourth check code, the second micro control unit determines that the second micro control unit reads successfully according to the second check code; If the second check code is different from the fourth check code, the second micro control unit determines that the second micro control unit does not read successfully according to the second check code.

6. The data write method of the ground electronic unit according to claim 5, wherein, The calculation method of the first check code and the second check code is different; the first preset algorithm is different from the second preset algorithm.

7. The data write method of the ground electronic unit according to claim 4, wherein, The first message data includes configuration parameters and default messages; the storage form of the first data information is the configuration parameters, the first check code, the default messages and the first check code; The second message data includes the complement of the configuration parameters and the complement of the default messages; The storage form of the second data information is the complement of the configuration parameters, the second check code, the complement of the default messages and the second check code.

8. The data write method of the ground electronic unit according to any one of claims 1 to 7, characterized in that, Further comprising: In the case that the first message data and the third message data are different, the first micro control unit and the second micro control unit restart; And return to execute the step that the first micro control unit reads the first data information stored in the first storage area, and stores the first message data to the first memory of the first micro control unit.

9. A ground electronic unit, characterized in that Comprising: A storage module, a first micro control unit and a second micro control unit; The storage module is connected with the first micro control unit and the second micro control unit respectively, and the first micro control unit is connected with the second micro control unit; The storage module is used for receiving and storing data information sent by an external device, the first micro control unit is used for reading first data information stored in a first storage area and storing first message data into a first memory of the first micro control unit, and the second micro control unit reads second data information stored in a second storage area, obtains third message data by taking inversion of second message data, and stores the third message data in a second memory of the second micro control unit; The first micro control unit is further used for performing data comparison between the stored first message data and the third message data stored by the second micro control unit, and determining that the ground electronic unit data is written completely in a case that the first message data and the third message data are same. Alternatively, the second micro control unit is further used for performing data comparison between the stored third message data and the first message data stored by the first micro control unit, and determining that the ground electronic unit data is written completely in a case that the first message data and the third message data are same.

10. The ground electronic unit according to claim 9, characterized in that, Further comprising an external interface and a protocol conversion module; The protocol conversion module is connected with the storage module, the first micro control unit, the second micro control unit and the external interface respectively, and the external interface is used for connecting an external device; The protocol conversion module is used for converting a first communication protocol of the external interface into a second communication protocol matched with the storage module, the first micro control unit and the second micro control unit.

11. The ground electronic unit according to claim 10, characterized in that, Further comprising a protection circuit, and the protection circuit comprises an optical coupling module; a first end of the optical coupling module is connected with a power supply end of the external interface, a second end of the optical coupling module is connected with a grounding end of the external interface, a third end of the optical coupling module is connected with a power supply voltage and a write protection end of the storage module, and a fourth end of the optical coupling module is grounded; The storage module is used for realizing read-write function when the write protection end is high level, and realizing read-only function when the write protection end of the optical coupling module is low level.

Citation Information

Patent Citations

  • Safe storage and selection method and device for messages in LEU (Line-side Electronic Unit)

    CN103200130A

  • Transponder test system and method

    CN114421993A

  • Data writing method, storage device and electronic equipment

    CN118113207A