A train starting method, device and equipment and readable storage medium

CN122877173APending Publication Date: 2026-10-09ZHUZHOU ELECTRIC LOCOMOTIVE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611356548.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0003]当存储单元因长期使用、电磁干扰或电源波动等原因发生损坏时,系统难以有效识别,可能导致启动时加载到错误的车号、里程等关键参数,进而影响列车通信身份的正确建立及运维基准数据的准确性,对列车运行安全构成隐患

Benefits of technology

[0017]通过分别读取多个存储区的数据包,并借助完整性校验码完成数据包校验,可区分出数据完好与数据损坏的存储区,防止损坏数据参与列车启动逻辑,从数据源头上保证后续处理所用数据完整。当存在校验合格的数据包时,选取其中写入时间戳最新的数据包作为目标数据包。即便多个存储区内的数据本身完好,但受写入中断等异常影响,各存储区保存的数据版本不一致,也可依靠时间戳筛选出最新版本数据,防止列车错误加载过期历史数据。若全部存储区的数据包校验均不通过,则调用预设安全默认值作为目标断电保持变量数据。即便出现全部存储区数据损坏的极端故障场景,系统依然可以获取可用的基础运行参数,避免因缺少有效数据造成列车启动失败。最后,依据目标断电保持变量数据解析得到列车身份信息与运行参数信息,驱动列车进入相应运行状态。列车启动阶段加载的数据直接决定列车身份标识与运行基准,以此保障列车使用正确身份、合规的参数投入运行,规避因身份异常引发的网络通信紊乱,及参数错误带来的运维基准失效问题,可有效保障列车运行安全与设备管控可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122877173A_ABST
    Figure CN122877173A_ABST
Patent Text Reader

Abstract

The application discloses a train starting method, device and equipment and a readable storage medium. The method reads data packets from a storage area in response to a train starting instruction. The data packets are subjected to integrity detection. If there is at least one data packet passing the integrity detection, a target data packet with the latest write time stamp is selected from the data packets passing the integrity detection, and target power-off holding variable data is obtained from the target data packet. If no data packet passes the integrity detection, a preset safety default value is used as the target power-off holding variable data. Train identity information and running parameter information are determined by using the target power-off holding variable data, and a corresponding train running state is entered. The application ensures the integrity and correctness of the power-off holding variable data loaded when the train starts by multiple safeguards such as multi-area redundant reading, integrity checking, time stamp arbitration and safety default value, and finally realizes safe online running of the train with accurate identity and running parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of rail transit technology, and in particular to a train starting method, apparatus, device, and readable storage medium. Background Technology

[0002] In the central control unit (CCU) of existing rail transit vehicles, in order to ensure that critical operating parameters can be restored when the train is powered on again after a power outage, non-volatile memory is usually used to save the power-off retained variables.

[0003] When a storage unit is damaged due to long-term use, electromagnetic interference, or power fluctuations, the system may have difficulty identifying it effectively. This could lead to the loading of incorrect car numbers, mileage, or other critical parameters during startup, thereby affecting the correct establishment of train communication identity and the accuracy of maintenance baseline data, posing a potential threat to train operation safety.

[0004] In summary, how to ensure reliable power-off retention of variable data during train startup is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a train starting method, device, equipment, and readable storage medium. Through multiple safeguards such as multi-zone redundant reading, integrity verification, timestamp arbitration, and safe default values, the integrity and correctness of the power-off retention variable data loaded during train startup are ensured, ultimately enabling the train to safely start operation with accurate identity and operating parameters.

[0006] To solve the above-mentioned technical problems, this application provides the following technical solution: A train starting method, comprising: In response to the train start command, data packets are read from multiple storage areas in non-volatile memory used to store power-off retained variable data; wherein, the data packets include power-off retained variable data, write timestamps, and integrity check codes; Integrity checks are performed on each data packet based on the integrity check code in the data packet. If at least one data packet passes the integrity check, then select the target data packet with the latest timestamp from the data packets that passed the integrity check, and obtain the target power failure retention variable data from the target data packet; If no data packet passes the integrity check, the preset security default value will be used as the target power-off retention variable data. The train's identity information and operating parameter information are determined using the target power failure retention variable data, and the corresponding train operating state is entered using the train's identity information and operating parameter information.

[0007] Preferably, it further includes: If there is a storage area that fails the integrity check, then the target data packet is written to the storage area that fails the integrity check. If there exists a storage area that passes the integrity check but whose write timestamp is not the latest, then the target data packet is written to the storage area whose timestamp is not the latest.

[0008] Preferably, after entering the corresponding train operation state using the train identity information and operation parameter information, the method further includes: Retrieve the latest power-off retention variable data and store it in the cache; In response to a power outage or hibernation command, read the current new power-out retained variable data from the buffer; Get the current system time as the new write timestamp; Calculate a new integrity check code based on the new power failure retention variable data and the new write timestamp; The new power-off retention variable data, the new write timestamp, and the new integrity check code are used to generate a new data packet; The new data packet is synchronously written to each of the multiple storage areas.

[0009] Preferably, after performing integrity checks on each data packet based on the integrity check code in the data packet, the method further includes: If there is a storage area that fails the integrity check, the error count for that storage area is updated. Accordingly, the new data packet is synchronously written to each of the plurality of storage areas, including: Obtain the error counts corresponding to the multiple storage areas respectively; If the error count is greater than a preset threshold, the corresponding storage area is marked as no longer in use, and a free storage area is selected from non-volatile memory to replace the storage area. If the error count is less than or equal to a preset threshold, the new data packet is synchronously written to each of the multiple storage areas.

[0010] Preferably, the train identification information and operating parameter information are determined using the target power failure retention variable data, and the corresponding train operating state is entered using the train identification information and operating parameter information, including: The train number is obtained from the target power failure retention variable data to determine the train's identity information; The operating parameter information is determined by obtaining the travel mileage, main circuit breaker closure count, and compressor running time from the target power outage holding variable data; Using the train identification information, the train's identity is reported to the ground system via the vehicle network to establish road network communication; The maintenance baseline data of the train is updated using the travel mileage to trigger the determination of the equipment operation and maintenance cycle; The remaining lifespan of critical equipment is assessed using the number of main circuit closures and the compressor operating time.

[0011] Preferably, the integrity check of each data packet is performed based on the integrity check code in the data packet, including: The power-off retention variable data and the write timestamp in the data packet are calculated using a cyclic redundancy check code to obtain the calculated check code; If the calculated checksum matches the integrity checksum in the data packet, then the data packet is determined to have passed the integrity check. If the calculated checksum does not match the integrity checksum in the data packet, then the data packet is determined to have failed the integrity check.

[0012] Preferably, data packets are read from multiple storage areas in non-volatile memory used to store power-off retained variable data, including: The data packets are read from the first and second storage areas of the ferroelectric memory, which are physically independent of each other.

[0013] A train starting device, comprising: The data packet reading module is used to read data packets from multiple storage areas in non-volatile memory that store power-off retained variable data in response to the train start command; wherein, the data packet includes power-off retained variable data, a write timestamp, and an integrity check code; The integrity detection module is used to perform integrity detection on each of the data packets based on the integrity check code in the data packets; The target data determination module is used to select the data packet with the latest written timestamp from the data packets that have passed the integrity test as the target data packet when there is at least one data packet that has passed the integrity test, and to use the preset security default value as the target power failure retention variable data when no data packet has passed the integrity test. The variable data acquisition module is used to acquire target power-off retention variable data from the target data packet; The operation control module is used to determine the train identity information and operation parameter information using the target power failure retention variable data, and to enter the corresponding train operation state using the train identity information and operation parameter information.

[0014] An electronic device, comprising: Memory, used to store computer programs; A processor is used to implement the steps of the above-described train starting method when executing the computer program.

[0015] A readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the train starting method described above.

[0016] The method provided in this application includes: in response to a train start command, reading data packets from multiple storage areas in non-volatile memory used for storing power-off retention variable data; wherein the data packets include power-off retention variable data, a write timestamp, and an integrity check code; performing integrity checks on each data packet based on the integrity check code in the data packet; if at least one data packet passes the integrity check, selecting the target data packet with the latest write timestamp from the data packets that passed the integrity check, and obtaining the target power-off retention variable data from the target data packet; if no data packet passes the integrity check, using a preset security default value as the target power-off retention variable data; determining train identity information and operating parameter information using the target power-off retention variable data, and entering the corresponding train operating state using the train identity information and operating parameter information.

[0017] By reading data packets from multiple storage areas and verifying them using integrity check codes, the system can distinguish between storage areas with intact and corrupted data, preventing corrupted data from participating in the train startup logic and ensuring the integrity of data used in subsequent processing from the data source. When a valid data packet is found, the data packet with the latest timestamp is selected as the target data packet. Even if the data in multiple storage areas is intact, but due to write interruptions or other anomalies, the data versions stored in each storage area are inconsistent, the latest version data can be filtered out using timestamps to prevent the train from incorrectly loading expired historical data. If the data packet verification fails in all storage areas, a preset safety default value is used as the target power-off retention variable data. Even in extreme failure scenarios where all storage areas are corrupted, the system can still obtain usable basic operating parameters, avoiding train startup failure due to lack of valid data. Finally, the train's identity information and operating parameter information are parsed from the target power-off retention variable data, driving the train into the corresponding operating state. The data loaded during the train startup phase directly determines the train's identity and operating baseline, thereby ensuring that the train is put into operation with the correct identity and compliant parameters, avoiding network communication disorder caused by abnormal identity and failure of operation and maintenance baseline caused by incorrect parameters, and effectively ensuring the safety of train operation and the reliability of equipment management.

[0018] This application ensures the integrity and correctness of the power-off retention variable data loaded when the train starts through multiple safeguards such as multi-zone redundant reading, integrity verification, timestamp arbitration, and security default values, ultimately enabling the train to safely start operation with accurate identity and operating parameters.

[0019] Accordingly, embodiments of this application also provide a train starting device, equipment, and readable storage medium corresponding to the above-described train starting method, which have the aforementioned technical effects, and will not be elaborated further here. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating the implementation of a train starting method according to an embodiment of this application; Figure 2 This is a flowchart illustrating a data writing process in one embodiment of this application; Figure 3 This is a flowchart illustrating a data reading and verification process in one embodiment of this application. Figure 4 This is a schematic diagram of the structure of a train starting device according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application; Figure 6 This is a schematic diagram of the specific structure of an electronic device in an embodiment of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] This application provides a train starting method, which is mainly applied to the Central Control Unit (CCU) of rail transit vehicles. The CCU is the core of the vehicle's control system, responsible for managing train status, control logic, and key operating parameters. During train operation, some critical data needs to be retained even after the CCU is powered off, so that operation can resume upon power restoration. This type of data is called power-off retained variables, such as train number, travel distance, number of times important components actuated, and operating time of critical equipment. For details, please refer to... Figure 1 , Figure 1 This is a flowchart of a train starting method according to an embodiment of this application, which includes the following steps.

[0024] Step S101: In response to the train start command, read data packets from multiple storage areas in non-volatile memory used to store power-off retained variable data.

[0025] The data packet includes power-off retention variable data, write timestamps, and integrity check codes.

[0026] When the train starts and is powered on, the CCU first executes the initialization process. The most crucial step in this initialization process is reading power-off retained variables from non-volatile memory. The CCU initiates a read operation on the non-volatile memory, completely retrieving data packets from multiple pre-divided storage areas (such as the main storage area and backup storage area). Each data packet corresponds to an independent data structure, which contains at least three fields: power-off retained variable data (i.e., key parameters that need to be retained during power-off, such as train number, travel mileage, number of main circuit breaker closures, and compressor running time), a timestamp generated by the system clock when the data was written (i.e., the write timestamp), and a checksum used for integrity verification. The multiple storage areas are physically independent and do not affect each other.

[0027] In one specific embodiment of this application, data packets are read from multiple storage areas in non-volatile memory used to store power-off retained variable data, including reading data packets from a first storage area and a second storage area in ferroelectric memory with independent physical addresses. That is, the non-volatile memory uses FRAM (ferroelectric memory), which has characteristics such as fast read / write speed, high erase / write cycles, and low power consumption, making it suitable for the real-time and reliability requirements of the CCU in rail transit vehicles. At least two structurally identical but physically address-independent storage areas, such as a first storage area and a second storage area, can be partitioned within this FRAM. These two areas are completely isolated at the physical level; when one area is damaged due to hardware failure, the other area remains unaffected, thus achieving true hardware-level redundancy backup and providing a reliable physical basis for a dual-storage-area backup scheme. When the train starts, data packets can be directly read from the first and second storage areas in the ferroelectric memory with independent physical addresses.

[0028] Step S102: Perform integrity checks on each data packet based on the integrity check code in the data packet.

[0029] If data writing is normal and the storage area is normal, theoretically, the data packets read from different storage areas should all be complete. However, if an anomaly occurs, the data packets may be incomplete. To ensure reliable train operation, in this embodiment, the CCU can perform integrity verification on each data packet read from each storage area. The integrity check code carried by the data packet itself can be used to verify the consistency of the data packet's payload content. The payload in the data packet includes power-off retained variable data and a write timestamp, and the integrity check code is a fixed-length check value calculated based on these two parts. During reading, the CCU uses the same verification algorithm as during writing to recalculate the check value of the read payload and then compares this value with the original check code stored in the data packet. If they match, it means that the data packet has not changed during storage and the data is complete and valid; if they do not match, it means that the data packet has experienced bit transitions or data corruption due to physical aging of the storage unit, electromagnetic interference, or abnormal power supply, and the data in that storage area is unusable. Through this detection mechanism, the system can accurately distinguish between storage areas with intact data and storage areas with corrupted data.

[0030] In one specific embodiment of this application, integrity checks are performed on each data packet based on the integrity check code in the data packet, including: Cyclic redundancy check (CRC) codes are used to calculate the power-off retention variable data and the write timestamp in the data packet to obtain the calculated check code; If the calculated checksum matches the integrity checksum in the data packet, then the data packet has passed the integrity check. If the calculated checksum does not match the integrity checksum in the data packet, the data packet is determined to have failed the integrity check.

[0031] Integrity verification can be implemented using the CRC16 algorithm. During verification, the power-off retention variable data and the write timestamp in the data packet are used as calculation objects. The CRC16 algorithm is run to obtain a calculated checksum, which is then compared with the original integrity checksum stored at the end of the data packet. If they match, it means the data has not changed during storage, and the verification passes; if they do not match, it means the data has been corrupted. The CRC16 algorithm can detect arbitrary bit errors in the data with nearly 100% probability, providing a highly reliable guarantee of data integrity for the system.

[0032] In one specific embodiment of this application, after the integrity check during the startup phase, the method further includes: If any storage area fails the integrity check, its error count is updated. That is, after each integrity check during startup, the system maintains an independent error count for each storage area. When a storage area fails the integrity check in this test, its error count is automatically incremented to record the cumulative number of data errors in that storage area. This error count will be used as the basis for subsequently determining whether the storage area has permanently failed.

[0033] Step S103: If there is at least one data packet that passes the integrity check, select the target data packet with the latest timestamp from the data packets that pass the integrity check, and obtain the target power failure retention variable data from the target data packet.

[0034] Once the integrity check is complete, if at least one data packet in the storage area passes the verification, it indicates that the system possesses usable and valid data. However, power outages or electromagnetic interference may occur during the write process, leading to inconsistencies in data versions between the primary and backup storage areas. For example, some storage areas may have completed the writing of new data, while others may remain in the old data state.

[0035] To address this issue, the write timestamps of all valid data packets that have passed verification can be compared, and the data packet with the latest write timestamp can be selected as the target data packet. The write timestamp is an absolute time stamp generated by the system clock when data is written; a larger value indicates a later write time. Therefore, the data packet with the latest timestamp is the last data written to the storage area, representing the latest data state. After determining the target data packet, the system parses and extracts the power-off retention variable data from it for use when the train starts. This ensures that the train loads the latest and verified valid data under all circumstances.

[0036] In one specific embodiment of this application, if at least one data packet passes the integrity check, the method further includes selecting the data packet with the latest written timestamp from the data packets that passed the integrity check as the target data packet, and obtaining the target power-off retention variable data from the target data packet: If a storage area fails the integrity check, the target data packet is written to that storage area. If a storage area exists that passes the integrity check but whose write timestamp is not the latest, then the target data packet is written to that storage area.

[0037] After identifying the target data packet and extracting the variable data, the system can further perform dual-zone synchronization repair. For storage zones that fail the integrity check, it indicates that the data in that zone is corrupted. The system will write the entire target data packet into that zone to overwrite and restore it, allowing the corrupted zone to regain a complete and valid data copy. For storage zones that pass the integrity check but whose timestamps are not up-to-date, it indicates that the data in that zone is intact but the version is outdated. The system will also write the entire target data packet into that zone for version synchronization.

[0038] In other words, the same write operation is performed in both cases, completely writing the target data packet to the corresponding storage area, but the object and reason for repair are different. The former targets the storage area with corrupted data, while the latter targets the storage area with intact data but outdated versions. After synchronous repair, the data in all storage areas is eventually restored to the latest version that is completely consistent, ensuring that multiple storage areas hold usable and valid data upon the next startup, thus maintaining the long-term effectiveness of the dual-backup architecture.

[0039] Step S104: If no data packet passes the integrity check, the preset security default value is used as the target power-off retention variable data.

[0040] When all data packets in all storage areas fail the integrity check, it indicates that all backup copies are corrupted, and the system cannot obtain valid data from any storage area. In this case, pre-installed safety default values ​​can be used as the target power-off retention variable data. Safety default values ​​are a set of basic parameters preset at the factory or during system configuration. While their values ​​may not be the latest values ​​from actual train operation, they ensure that the train can complete startup and basic functions with the most basic parameter support, preventing system startup failure or an uncontrollable state due to complete data loss. This ensures that the train retains basic availability even in extreme abnormal situations.

[0041] Step S105: Use the target power failure retention variable data to determine the train identity information and operating parameter information, and use the train identity information and operating parameter information to enter the corresponding train operating state.

[0042] The CCU parses the acquired target power-off retention variable data to extract train identification information and operating parameter information. Train identification information uniquely identifies the train within the network, while operating parameter information reflects the train's cumulative usage and the wear and tear status of key components. Based on this, the system establishes a complete train operating environment. This involves reporting the train's identity to the ground system via the vehicle network to complete network communication registration and access. Simultaneously, the loaded operating parameters serve as baseline data for current operation, used in subsequent maintenance cycle calculations and equipment health assessments. Ultimately, the train enters a normal operating mode matching its current state with the correct identification and accurate operating parameters.

[0043] In one specific embodiment of this application, train identity information and operating parameter information are determined using target power failure retention variable data, including: The train number is obtained from the target power failure retention variable data to determine the train's identity information; The operating parameter information is determined by obtaining the travel mileage, main circuit breaker closure count, and compressor running time from the target power failure holding variable data; Using train identification information, the train reports its identity to the ground system through the vehicle network to establish road network communication; The maintenance baseline data of the train is updated using the mileage traveled, which triggers the determination of the equipment maintenance cycle; The remaining lifespan of critical equipment is assessed by using the number of main circuit breaker closures and compressor operating time.

[0044] The target power outage retention variable data is specifically parsed into multiple independent parameters, including train number, travel mileage, main circuit breaker closure count, and compressor operating time. The train number is used to identify the train; the CCU reports this number to the ground system via vehicle networks such as MVB or Ethernet to complete identity registration and establish a road network communication link. Travel mileage is used to update the train's maintenance baseline database, which the system uses to determine whether a preset maintenance cycle threshold has been reached, thereby triggering corresponding maintenance reminders or maintenance plans. The main circuit breaker closure count and compressor operating time are used to assess the mechanical wear and remaining life of critical equipment such as high-voltage circuit breakers and air compressors, providing data support for predictive maintenance and preventing sudden equipment failures during operation. Each parameter serves three different application needs: train identification, maintenance planning, and equipment health management.

[0045] The method provided in this application includes, in response to a train start command, reading data packets from multiple storage areas in non-volatile memory used for storing power-off retention variable data; wherein, the data packets include power-off retention variable data, a write timestamp, and an integrity check code; performing integrity checks on each data packet based on the integrity check code in the data packet; if at least one data packet passes the integrity check, selecting the target data packet with the latest write timestamp from the data packets that passed the integrity check, and obtaining the target power-off retention variable data from the target data packet; if no data packet passes the integrity check, using a preset security default value as the target power-off retention variable data; using the target power-off retention variable data to determine train identity information and operating parameter information, and using the train identity information and operating parameter information to enter the corresponding train operating state.

[0046] By reading data packets from multiple storage areas and verifying them using integrity check codes, the system can distinguish between storage areas with intact and corrupted data, preventing corrupted data from participating in the train startup logic and ensuring the integrity of data used in subsequent processing from the data source. When a valid data packet is found, the data packet with the latest timestamp is selected as the target data packet. Even if the data in multiple storage areas is intact, but due to write interruptions or other anomalies, the data versions stored in each storage area are inconsistent, the latest version data can be filtered out using timestamps to prevent the train from incorrectly loading expired historical data. If the data packet verification fails in all storage areas, a preset safety default value is used as the target power-off retention variable data. Even in extreme failure scenarios where all storage areas are corrupted, the system can still obtain usable basic operating parameters, avoiding train startup failure due to lack of valid data. Finally, the train's identity information and operating parameter information are parsed from the target power-off retention variable data, driving the train into the corresponding operating state. The data loaded during the train startup phase directly determines the train's identity and operating baseline, thereby ensuring that the train is put into operation with the correct identity and compliant parameters, avoiding network communication disorder caused by abnormal identity and failure of operation and maintenance baseline caused by incorrect parameters, and effectively ensuring the safety of train operation and the reliability of equipment management.

[0047] This application ensures the integrity and correctness of the power-off retention variable data loaded when the train starts through multiple safeguards such as multi-zone redundant reading, integrity verification, timestamp arbitration, and security default values, ultimately enabling the train to safely start operation with accurate identity and operating parameters.

[0048] It should be noted that, based on the above embodiments, the embodiments of this application also provide corresponding improvement schemes. In the preferred / improved embodiments, the same or corresponding steps as in the above embodiments can be referred to each other, and the corresponding beneficial effects can also be referred to each other; however, these will not be elaborated upon in the preferred / improved embodiments herein.

[0049] In one specific embodiment of this application, during train operation, continuously acquiring and storing updated power outage retention variable data in a buffer, the method further includes: In response to a power outage or hibernation command, read the latest power-out retained variable data from the buffer; Get the current system time as the write timestamp; Calculate the integrity check code based on the latest power failure retention variable data and the written timestamp; The latest power failure retention variable data, the timestamp, and the integrity check code are combined to form a new data packet; New data packets are synchronously written to each of the multiple storage areas.

[0050] In other words, during train operation, some power-off retained variable data will continuously change. The CCU tracks these changes in real time and continuously stores the latest values ​​in the buffer. However, the buffer will lose data after the train loses power. Therefore, the system does not trigger a write to the non-volatile memory every time a variable is updated, as writing to the non-volatile memory too frequently would affect its lifespan. The actual write timing can be chosen to be in response to a power-off command or a hibernation command. In the last moments before the train is about to lose power or enter a low-power mode, the latest power-off retained variable data is read from the buffer, the current system time is obtained as the timestamp for this write, and an integrity check code is calculated using this data and the timestamp. After the three together form a complete data packet, it is synchronously written to each storage area. Each storage area is written with the exact same data packet, ensuring that the data packets in each storage area are completely consistent.

[0051] For example, the Central Control Unit (CCU) has a processor and Ferroelectric RAM (FRAM). The FRAM is divided into two identical but physically independent storage areas: the main storage area and the backup storage area. Each storage area is 128 bytes in size (in practical applications, this can be flexibly adjusted according to the amount of data to be retained after a power outage, and the dual areas can be expanded to three or more). Its internal structure is defined as follows: Data area (bytes 1-122): Used to store actual power outage holding variable values ​​(such as train number, travel distance, number of main circuit breaker closures, compressor running time, etc.). Timestamp area (bytes 123-126, 4 bytes): Used to store a unique timestamp of this write (such as UNIX time). Check area (bytes 127-128, 2 bytes): Used to store the 16-bit Cyclic Redundancy Check (CRC16) code calculated based on the contents of the data area and timestamp area.

[0052] like Figure 2 As shown, the data writing process includes the following steps.

[0053] Power-off triggered write: During normal CCU operation, the current power-off retained variable data is stored in the memory cache and updated at fixed intervals (e.g., 1 second); timestamps and CRC checksums are not generated at this time. The write process is triggered only when the system detects a power outage or the device shuts down normally. That is, the current UNIX time is obtained as the timestamp, and the CRC checksum is calculated based on the latest data in the cache. The complete data packet (data + timestamp + CRC checksum) is then written to the dual storage areas of the ferroelectric memory in one go. This strategy avoids frequent writes to non-volatile memory, significantly extending the lifespan of the ferroelectric memory.

[0054] Among them, the generation of timestamps: when the system triggers a write operation, the current UNIX time is obtained as a unique timestamp (4 bytes). UNIX time has the characteristics of being globally unique and naturally increasing, so there is no need to maintain an increasing state. Preparation and calculation: Combine the new data and the timestamp into a data block to be verified (bytes 1 to 126, where bytes 1 to 122 are data and bytes 123 to 126 are timestamps). Use the selected CRC16 algorithm (such as CCITT-FALSE) to calculate and obtain a 2-byte checksum, which is then padded to the end of the data block (bytes 127 to 128). Dual-zone synchronous write: Write the complete data packet, consisting of data, timestamp, and checksum, sequentially to the primary storage area and the backup storage area.

[0055] By concentrating write operations to be performed at the last moment before power failure or hibernation, the timeliness of written data is ensured, and the problem of partial or incomplete data writing caused by sudden power failure during the writing process is effectively avoided.

[0056] In one specific embodiment of this application, after the integrity check during the startup phase, the method further includes: If any storage area fails the integrity check, the error count for that storage area is updated; correspondingly, new data packets are synchronously written to each of the multiple storage areas, including: Get the error counts for each of the multiple storage areas; If the error count exceeds the preset threshold, the corresponding storage area is marked as no longer in use, and a free storage area is selected from non-volatile memory to replace the storage area. If the error count is less than or equal to the preset threshold, the new data packet will be synchronously written to each of the multiple storage areas.

[0057] In this embodiment, after the integrity check in step S102, health status monitoring and dynamic management of the storage areas are introduced. The system maintains an error count for each storage area. When a storage area fails the integrity check during the startup phase, its error count is incremented. When writing a new data packet, the system first checks the error count of each storage area. If the error count of a storage area exceeds a preset threshold, it is determined that the storage area has permanently failed, marked as unusable, and subsequent read / write operations are stopped. At the same time, a free storage area is selected from non-volatile memory to replace it. The data in the healthy area is completely copied to the new area to rebuild the dual-backup architecture. If the error count does not exceed the threshold, the write operation is performed normally.

[0058] For example: Figure 3 As shown, the data reading and verification process includes the following steps.

[0059] Step 1: Read and verify the main area: When the CCU is powered on and initialized, it reads all 128 bytes of data from the main storage area, uses the same CRC16 algorithm to calculate bytes 1 to 126, generates a 2-byte check code, and then compares the check code with the original bytes 127 to 128 to obtain the main area verification result. Step 2: Read and verify the backup area: The specific method is similar to that of the primary area, and the backup area verification result can be obtained; Step 3, Timestamp Acquisition: Extract the timestamp (bytes 123-126) from the verified storage area. Step 4, Judgment and Switching: Scenario 1 (Both zones are valid and consistent): If both the primary and backup zones pass the verification and their data content and timestamps are consistent, the data is considered valid and loaded into the primary zone for use.

[0060] Scenario 2 (Both zones are valid but inconsistent): If both the primary and backup zones pass verification, but their timestamps are inconsistent, it indicates that the two storage zones store different versions of data (possibly due to a power outage or interference during the last write operation, resulting in only one zone completing the update). In this case, compare the two timestamp values, select the newer timestamp as the correct data for loading, and use this data to completely overwrite the older timestamp, restoring consistency between the two zones. This arbitration mechanism ensures that in the event of an unexpected power outage causing incomplete writes, the system can always select the latest and most complete data copy.

[0061] Scenario 3 (Single Area Valid): If only the primary area or only the backup area passes verification, the data in the verified storage area is considered valid, and this data is loaded and used. Simultaneously, the data is written to the storage area that failed verification for repair. In this case, the error count of the storage area that failed verification is incremented by 1. If the error count does not reach the preset threshold (e.g., 2 times), the storage area will continue to be used; If the error count reaches a preset threshold (e.g., 2 times), the storage area is determined to be permanently invalid, marked as unavailable, and subsequent read / write operations are stopped.

[0062] The threshold selection criteria are as follows: if it is 1 time, a single sporadic interference (such as lightning strikes or electromagnetic pulses caused by the start-up and shutdown of high-power equipment) will result in the permanent isolation of the storage area, causing unnecessary waste of resources; if the threshold is too high (such as 5 times or more), the permanently physically damaged storage area may be repeatedly and ineffectively used, affecting startup efficiency. Engineering practice has verified that 2 times is the optimal balance point.

[0063] The CCU automatically selects a new area from the reserved free storage area (prioritizing unused storage areas that have not been marked as invalid), performs a simple write test and readback confirmation on the new area, and after confirming that the function is normal, completely copies the data of the current healthy area to the new area, rebuilds the dual backup architecture, and at the same time reports a warning signal that some storage areas have been permanently invalidated through the vehicle network (such as MVB, Ethernet).

[0064] Scenario 4 (Both Zones Invalid): If both the primary and backup zones fail to verify, the data in both zones is deemed corrupted. The CCU will activate the pre-set security default value and report a fault signal indicating data loss due to power failure via the vehicle network (such as MVB or Ethernet) with the highest priority to notify maintenance personnel to intervene.

[0065] This enables intelligent identification and automatic isolation of repeatedly faulty storage areas, preventing the system from performing unnecessary repeated reads and writes to physically damaged storage areas. It prevents the waste of CPU resources from ineffective repairs and avoids system anomalies that might be caused by continuous access to damaged areas. Furthermore, dynamic reconstruction maintains the integrity of the backup redundancy architecture, ultimately improving the long-term stability and maintainability of the system.

[0066] Corresponding to the above method embodiments, this application also provides a train starting device, and the train starting device described below can be referred to in correspondence with the train starting method described above.

[0067] See Figure 4 As shown, the device includes the following modules: The data packet reading module 101 is used to read data packets from multiple storage areas in non-volatile memory that store power-off retained variable data in response to the train start command; wherein the data packets include power-off retained variable data, write timestamps and integrity check codes; The integrity detection module 102 is used to perform integrity detection on each data packet based on the integrity check code in the data packet. The target data determination module 103 is used to select the data packet with the latest written timestamp from the data packets that have passed the integrity test as the target data packet when there is at least one data packet that has passed the integrity test, and to use the preset security default value as the target power failure retention variable data when no data packet has passed the integrity test. The variable data acquisition module 104 is used to acquire target power-off retention variable data from the target data packet; The operation control module 105 is used to determine the train identity information and operation parameter information by using the target power failure retention variable data, and to enter the corresponding train operation state by using the train identity information and operation parameter information.

[0068] The apparatus provided in this application includes, in response to a train start command, reading data packets from multiple storage areas in non-volatile memory used for storing power-off retention variable data; wherein the data packets include power-off retention variable data, a write timestamp, and an integrity check code; performing integrity checks on each data packet based on the integrity check code in the data packet; if at least one data packet passes the integrity check, selecting the target data packet with the latest write timestamp from the data packets that passed the integrity check, and obtaining the target power-off retention variable data from the target data packet; if no data packet passes the integrity check, using a preset security default value as the target power-off retention variable data; using the target power-off retention variable data to determine train identity information and operating parameter information, and using the train identity information and operating parameter information to enter the corresponding train operating state.

[0069] By reading data packets from multiple storage areas and verifying them using integrity check codes, the system can distinguish between storage areas with intact and corrupted data, preventing corrupted data from participating in the train startup logic and ensuring the integrity of data used in subsequent processing from the data source. When a valid data packet is found, the data packet with the latest timestamp is selected as the target data packet. Even if the data in multiple storage areas is intact, but due to write interruptions or other anomalies, the data versions stored in each storage area are inconsistent, the latest version data can be filtered out using timestamps to prevent the train from incorrectly loading expired historical data. If the data packet verification fails in all storage areas, a preset safety default value is used as the target power-off retention variable data. Even in extreme failure scenarios where all storage areas are corrupted, the system can still obtain usable basic operating parameters, avoiding train startup failure due to lack of valid data. Finally, the train's identity information and operating parameter information are parsed from the target power-off retention variable data, driving the train into the corresponding operating state. The data loaded during the train startup phase directly determines the train's identity and operating baseline, thereby ensuring that the train is put into operation with the correct identity and compliant parameters, avoiding network communication disorder caused by abnormal identity and failure of operation and maintenance baseline caused by incorrect parameters, and effectively ensuring the safety of train operation and the reliability of equipment management.

[0070] This application ensures the integrity and correctness of the power-off retention variable data loaded when the train starts through multiple safeguards such as multi-zone redundant reading, integrity verification, timestamp arbitration, and security default values, ultimately enabling the train to safely start operation with accurate identity and operating parameters.

[0071] In one specific embodiment of this application, the apparatus further includes: a data repair and synchronization module, used to write the target data packet into a storage area if there is a storage area that fails the integrity check after the target data determination module determines the target data packet; and to write the target data packet into a storage area if there is a storage area that passes the integrity check but whose write timestamp is not the latest.

[0072] In one specific embodiment of this application, it further includes: a data caching and writing module, used to continuously acquire updated power-off retention variable data and store it in a cache during train operation; in response to a power-off or hibernation command, read the latest power-off retention variable data from the cache; acquire the current system time as a write timestamp; calculate an integrity check code based on the latest power-off retention variable data and the write timestamp; combine the latest power-off retention variable data, the write timestamp, and the integrity check code into a new data packet; and synchronously write the new data packet to each of the multiple storage areas.

[0073] In one specific embodiment of this application, it further includes: a storage area health monitoring and fault isolation module, used to update the error count of a storage area that fails the integrity check after the integrity check during the startup phase; when a new data packet is synchronously written to each of the multiple storage areas, obtain the error counts corresponding to the multiple storage areas respectively; if the error count is greater than a preset threshold, mark the corresponding storage area as no longer in use, and select a free storage area from non-volatile memory to replace the storage area; if the error count is less than or equal to the preset threshold, synchronously write the new data packet to each of the multiple storage areas.

[0074] In one specific embodiment of this application, the operation control module is specifically used to obtain the train number from the target power outage retention variable data to determine the train identity information; obtain the running mileage, main circuit breaker closure count, and compressor running time from the target power outage retention variable data to determine the operation parameter information; use the train identity information to report the train's identity to the ground system through the vehicle network to establish road network communication; use the running mileage to update the train's maintenance baseline data to trigger the determination of the equipment operation and maintenance cycle; and use the main circuit breaker closure count and compressor running time to assess the remaining life of key equipment.

[0075] In one specific embodiment of this application, the integrity detection module is specifically used to: calculate the power-off retention variable data and the write timestamp in the data packet using a cyclic redundancy check code to obtain a calculated check code; if the calculated check code is consistent with the integrity check code in the data packet, then the data packet is determined to have passed the integrity detection; if the calculated check code is inconsistent with the integrity check code in the data packet, then the data packet is determined to have failed the integrity detection.

[0076] In one specific embodiment of this application, the data packet reading module is specifically used to read data packets from a first storage area and a second storage area in the ferroelectric memory that have mutually independent physical addresses.

[0077] Corresponding to the above method embodiments, this application also provides an electronic device. The electronic device described below can be referred to in correspondence with the train starting method described above.

[0078] See Figure 5 As shown, the electronic device includes: Memory 332 is used to store computer programs; The processor 322 is used to implement the steps of the train starting method in the above method embodiment when executing a computer program.

[0079] For details, please refer to Figure 6 , Figure 6 This is a schematic diagram of a specific structure of an electronic device provided in this embodiment. The electronic device can vary significantly due to differences in configuration or performance. It may include one or more central processing units (CPUs) (e.g., one or more processors) and a memory 332. The memory 332 stores one or more computer programs 342 or data 344. The memory 332 can be temporary or permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332 and execute the series of instruction operations stored in the memory 332 on the electronic device 301.

[0080] Electronic device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341.

[0081] The steps in the train starting method described above can be implemented by the structure of electronic equipment.

[0082] Corresponding to the above method embodiments, this application also provides a readable storage medium. The readable storage medium described below can be referred to in conjunction with the train starting method described above.

[0083] A readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the train starting method described in the above method embodiments.

[0084] The readable storage medium can specifically be a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or any other readable storage medium capable of storing program code.

[0085] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0086] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0087] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0088] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "include," "contain," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0089] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A train starting method, characterized in that, include: In response to the train start command, data packets are read from multiple storage areas in non-volatile memory used to store power-off retained variable data; wherein, the data packets include power-off retained variable data, write timestamps, and integrity check codes; Integrity checks are performed on each data packet based on the integrity check code in the data packet. If at least one data packet passes the integrity check, then select the target data packet with the latest timestamp from the data packets that passed the integrity check, and obtain the target power failure retention variable data from the target data packet; If no data packet passes the integrity check, the preset security default value will be used as the target power-off retention variable data. The train's identity information and operating parameter information are determined using the target power failure retention variable data, and the corresponding train operating state is entered using the train's identity information and operating parameter information.

2. The method according to claim 1, characterized in that, Also includes: If there is a storage area that fails the integrity check, then the target data packet is written to the storage area that fails the integrity check. If there exists a storage area that passes the integrity check but whose write timestamp is not the latest, then the target data packet is written to the storage area whose timestamp is not the latest.

3. The method according to claim 1, characterized in that, After entering the corresponding train operation state using the train identity information and operation parameter information, the process also includes: Retrieve the latest power-off retention variable data and store it in the cache; In response to a power outage or hibernation command, read the current new power-out retained variable data from the buffer; Get the current system time as the new write timestamp; Calculate a new integrity check code based on the new power failure retention variable data and the new write timestamp; The new power-off retention variable data, the new write timestamp, and the new integrity check code are used to generate a new data packet; The new data packet is synchronously written to each of the multiple storage areas.

4. The method according to claim 3, characterized in that, After performing integrity checks on each data packet based on the integrity check code in the data packet, the method further includes: If there is a storage area that fails the integrity check, the error count for that storage area is updated. Accordingly, the new data packet is synchronously written to each of the plurality of storage areas, including: Obtain the error counts corresponding to the multiple storage areas respectively; If the error count is greater than a preset threshold, the corresponding storage area is marked as no longer in use, and a free storage area is selected from non-volatile memory to replace the storage area. If the error count is less than or equal to a preset threshold, the new data packet is synchronously written to each of the multiple storage areas.

5. The method according to claim 1, characterized in that, Using the target power-off retention variable data, train identity information and operating parameter information are determined, and the corresponding train operating state is entered using the train identity information and operating parameter information, including: The train number is obtained from the target power failure retention variable data to determine the train's identity information; The operating parameter information is determined by obtaining the travel mileage, main circuit breaker closure count, and compressor running time from the target power outage holding variable data; Using the train identification information, the train's identity is reported to the ground system via the vehicle network to establish road network communication; The maintenance baseline data of the train is updated using the travel mileage to trigger the determination of the equipment operation and maintenance cycle; The remaining lifespan of critical equipment is assessed using the number of main circuit closures and the compressor operating time.

6. The method according to claim 1, characterized in that, Integrity checks are performed on each data packet based on the integrity checksum in the data packet, including: The power-off retention variable data and the write timestamp in the data packet are calculated using a cyclic redundancy check code to obtain the calculated check code; If the calculated checksum matches the integrity checksum in the data packet, then the data packet is determined to have passed the integrity check. If the calculated checksum does not match the integrity checksum in the data packet, then the data packet is determined to have failed the integrity check.

7. The method according to any one of claims 1 to 6, characterized in that, Data packets are read from multiple storage areas in non-volatile memory used to store power-off retained variable data, including: The data packets are read from the first and second storage areas of the ferroelectric memory, which are physically independent of each other.

8. A train starting device, characterized in that, include: The data packet reading module is used to read data packets from multiple storage areas in non-volatile memory that store power-off retained variable data in response to the train start command; wherein, the data packet includes power-off retained variable data, a write timestamp, and an integrity check code; The integrity detection module is used to perform integrity detection on each of the data packets based on the integrity check code in the data packets; The target data determination module is used to select the data packet with the latest written timestamp from the data packets that have passed the integrity test as the target data packet when there is at least one data packet that has passed the integrity test, and to use the preset security default value as the target power failure retention variable data when no data packet has passed the integrity test. The variable data acquisition module is used to acquire target power-off retention variable data from the target data packet; The operation control module is used to determine the train identity information and operation parameter information using the target power failure retention variable data, and to enter the corresponding train operation state using the train identity information and operation parameter information.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the train starting method as described in any one of claims 1 to 7 when executing the computer program.

10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the train starting method as described in any one of claims 1 to 7.