Method, device and equipment for upgrading train-mounted software

Retrieve and generate backup software packages through wireless transmission, and automatically update and restore train on-board software, solving the problem of inefficiency in the existing technology, improving the efficiency and reliability of software upgrades, and reducing manual participation and transmission consumption.

CN119271227APending Publication Date: 2025-01-07ZHUZHOU CSR TIMES ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310818479.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing train on-board software upgrade method is inefficient. When the update fails, it requires manual confirmation of historical versions and uploads, resulting in security risks and extended update time.

Method used

Use wireless transmission to obtain the software package to be upgraded, including the historical version of the upgrade script file, generate the backup software package, automatically update and judge the update success, and use the backup package recovery software to reduce manual participation and transmission consumption.

Benefits of technology

Improves the efficiency and reliability of software upgrades, reduces transmission time and traffic consumption, reduces the risk of update failure, and simplifies on-site operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271227A_ABST
    Figure CN119271227A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for upgrading train-mounted software. The method comprises the following steps: acquiring a to-be-upgraded software package from a ground server in a wireless transmission mode; obtaining a target upgrading script file corresponding to the current software version of the train-mounted equipment from upgrading script files of the historical version software included in the to-be-upgraded software package; executing the backup operation commands in the target upgrading script file one by one to obtain the target code file from the local storage path, storing the target code file according to the backup storage path, and generating a backup software package of the current software version of the train-mounted equipment; updating the software of the train-mounted equipment by adopting the to-be-upgraded software package; and judging whether the software of the train-mounted equipment is successfully updated or not, and if the software of the train-mounted equipment fails to be updated, performing software recovery on the train-mounted equipment by adopting the backup software package. The backup software package is automatically generated in the local of the train, manual participation is not needed, transmission time and flow consumption are reduced, and improvement of upgrading efficiency and reliability is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of rail transit vehicle-to-ground wireless transmission, and in particular to a train on-board software upgrade method, device and equipment. Background Art

[0002] With the rapid development of rail transit, higher requirements are placed on the automation level and reliability of train onboard software updates. Due to the large number of onboard subsystems in trains, if manual updates are used, not only will the efficiency be low and the update time be long, but also the different technical qualities of different personnel may easily lead to software update failures or system failures, posing great security risks. In the face of the need for efficient and safe software upgrades, upgrading train onboard software through remote automatic updates has become one of the main methods of train operation and maintenance.

[0003] During the process of remote updating of on-board software, if there are abnormal situations such as power outages and unstable network, the software update may be incomplete or fail, making the train unable to operate normally. At present, in the field of rail transit, if the on-board software update of the train fails, it is necessary to manually upload the historical version for software recovery. However, there may be multiple running software versions on site, and it is necessary to manually confirm the software version or interact with the train to obtain the required historical version. The confirmation process is relatively cumbersome; and uploading historical versions will also increase the traffic consumption between the train and the ground, and prolong the update time. In summary, the existing train on-board software upgrade method is inefficient and needs to be improved. Summary of the invention

[0004] The embodiments of the present invention provide a train onboard software upgrade method, device and equipment, which are used to solve the problem of low efficiency of the existing train onboard software upgrade method.

[0005] In a first aspect, an embodiment of the present invention provides a method for upgrading train onboard software, comprising:

[0006] The software package to be upgraded is obtained from the ground server by wireless transmission. The software package to be upgraded includes upgrade script files of various historical versions of software. The upgrade script files include the local storage path, backup operation command and backup storage path of each file in the corresponding version of software.

[0007] Obtaining a target upgrade script file corresponding to the current software version of the train onboard equipment from the upgrade script files of each historical version of the software included in the software package to be upgraded;

[0008] Execute the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, store it according to the backup storage path, and generate a backup software package for the current software version of the train onboard equipment;

[0009] Using the software package to be upgraded to update the software of the train onboard equipment;

[0010] Determine whether the software of the train onboard equipment is updated successfully. If the update fails, use the backup software package to restore the software of the train onboard equipment.

[0011] In one embodiment, determining whether the software of the train onboard equipment is successfully updated includes:

[0012] Obtain the software version information of the updated train onboard equipment and the software version information of the software package to be upgraded;

[0013] If the software version information of the train onboard device after the update is inconsistent with the software version information of the software package to be upgraded, it is determined that the software update of the train onboard device has failed.

[0014] In one embodiment, if the software version information of the train onboard device after the update is consistent with the software version information of the software package to be upgraded, determining whether the software of the train onboard device is successfully updated also includes:

[0015] Compare the file size and file check code value of each file in the updated train onboard equipment software one by one with the file size and file check code value of the file in the software package to be upgraded to see if they are consistent;

[0016] If they are consistent, it is determined that the software update of the train onboard equipment is successful; otherwise, it is determined that the software update of the train onboard equipment has failed.

[0017] In one embodiment, the software of the train onboard equipment is updated using the software package to be upgraded, including:

[0018] For each file to be updated, determine whether the file size and file checksum value of the current software of the train onboard equipment are consistent with those of the file in the software package to be upgraded;

[0019] If they are consistent, the file will not be updated; if they are inconsistent, the file will be updated.

[0020] In one embodiment, before executing the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, the method further includes:

[0021] Determine whether the software version information of the current software of the train onboard equipment is consistent with the software version information of the software package to be upgraded;

[0022] If they are consistent, the software upgrade process is terminated.

[0023] In one embodiment, after terminating the software upgrade process, the method further includes:

[0024] Delete the software package to be upgraded stored in the train onboard equipment.

[0025] In one embodiment, the upgrade script file also includes update commands for each file in the corresponding version of the software, and the software of the train onboard equipment is restored using the backup software package, including:

[0026] Execute the update commands in the target upgrade script file one by one to implement the rollback operation of each file in the backup software package.

[0027] In a second aspect, an embodiment of the present invention provides a train onboard software upgrade device, comprising:

[0028] An acquisition module is used to acquire the software package to be upgraded from the ground server by wireless transmission. The software package to be upgraded includes upgrade script files of various historical versions of software. The upgrade script files include the local storage path, backup operation command and backup storage path of each file in the corresponding version of software;

[0029] A matching module, used to obtain a target upgrade script file corresponding to the current software version of the train on-board equipment from the upgrade script files of each historical version of the software included in the software package to be upgraded;

[0030] The backup module is used to execute the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, store it according to the backup storage path, and generate a backup software package of the current software version of the train on-board equipment;

[0031] An upgrade module, used to update the software of the train onboard equipment using the software package to be upgraded;

[0032] The rollback module is used to determine whether the software of the train onboard equipment has been successfully updated. If the update fails, the backup software package is used to restore the software of the train onboard equipment.

[0033] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0034] at least one processor and memory;

[0035] Memory stores computer-executable instructions;

[0036] At least one processor executes computer-executable instructions stored in the memory, so that at least one processor executes the train on-board software upgrade method as described in any one of the first aspects.

[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions, which, when executed by a processor, are used to implement the train on-board software upgrade method as described in any one of the first aspects.

[0038] The train on-board software upgrade method, device and equipment provided by the embodiment of the present invention obtain the software package to be upgraded from the ground server by wireless transmission, the software package to be upgraded includes the upgrade script files of each historical version of the software, and the upgrade script files include the local storage path, backup operation command and backup storage path of each file in the corresponding version of the software; obtain the target upgrade script file corresponding to the current software version of the train on-board device from the upgrade script files of each historical version of the software included in the software package to be upgraded; execute the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, and store it according to the backup storage path to generate a backup software package of the current software version of the train on-board device; use the software package to be upgraded to update the software of the train on-board device; judge whether the software of the train on-board device is successfully updated, and if the update fails, use the backup software package to restore the software of the train on-board device. Automatically generate the backup software package locally in the train without manual participation, reduce the transmission time and traffic consumption, and help improve the upgrade efficiency and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0040] Figure 1 A flow chart of a train onboard software upgrade method provided by an embodiment of the present invention;

[0041] Figure 2 This is a diagram of the architecture of a train onboard software remote upgrade system provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of the structure of a train onboard software upgrade device provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0044] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0045] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.

[0046] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.

[0047] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).

[0048] Figure 1 The following is a flow chart of a train onboard software upgrade method provided by an embodiment of the present invention. Figure 1 As shown, the train onboard software upgrade method provided in this embodiment can be applied to the train onboard terminal, and specifically may include:

[0049] S101. Obtain the software package to be upgraded from the ground server by wireless transmission. The software package to be upgraded includes upgrade script files of various historical versions of software. The upgrade script files include the local storage path, backup operation commands and backup storage path of each file in the corresponding version of software.

[0050] In this embodiment, the vehicle-mounted host can be used as follows Figure 2 The remote upgrade system shown is from the ground server, i.e. Figure 2 Obtain the software package to be upgraded from the software update server shown in . Figure 2 As shown, the train onboard software remote upgrade system may include a ground server (i.e. Figure 2The software update server shown in the figure), the vehicle host, the display and the vehicle subsystem, where the vehicle host includes RU300, WL300, SA300 and CN300. RU300 is the vehicle upgrade server, which is used to complete the automatic software update operation, including vehicle-ground identity authentication, secure connection, data interaction, security monitoring and security audit, etc.; WL300 is the wireless main control board, and the ground accesses the WIFI environment through WL300 after the train enters the depot; SA300 is the security protection board, which is configured with the vehicle-ground whitelist and protection strategy for the boundary security protection between the vehicle and the ground; CN300 is an Ethernet board, which is used for the host and external Ethernet communication and Ethernet communication between the boards in the chassis; the ground server deploys software upgrade monitoring software to monitor the connection, interaction and software upgrade process status of the vehicle-mounted equipment in real time, and supports the management of vehicle-mounted equipment software version and ground operator authority, etc.

[0051] When the software needs to be upgraded, the maintenance personnel clicks on the display interface and selects the specific subsystem software upgrade operation. The display sends the software upgrade command to RU300. After receiving the upgrade command, RU300 initiates identity authentication to the ground server through WIFI or 4G channel. After the identity authentication is successful, the vehicle-ground connection is established, and the vehicle-ground heartbeat state becomes idle. Then the software upgrade command is sent to the ground server. During the entire software upgrade process, RU300 will monitor the vehicle-ground communication content in real time by parsing the vehicle-ground protocol. For illegal connections or illegal operations in the connection, it will promptly warn and block the operation and record the log for analysis. The heartbeat state of the ground server and the vehicle host becomes the target code acquisition state. The ground server finds the specified target code file package according to the upgrade command and transfers the file package to the specified directory of RU300. After the transmission is completed, RU300 parses the software package, which contains a checksum file, and the checksum information in the file is encrypted using an asymmetric cipher. The checksum information in the checksum file is a summary value calculated by the device private key after the target code file is calculated by the SM3 algorithm. RU300 first uses the device public key to obtain the digest value plaintext, and then uses the SM3 algorithm to calculate the digest value of the target code file. If the two values ​​are equal, the target code is complete, otherwise it needs to be re-downloaded or the subsequent update process needs to be interrupted. The target code file in this embodiment is the software to be upgraded. After the software package to be upgraded is successfully obtained from the ground server, the heartbeat status of the ground server and the vehicle-mounted host changes to the subsystem update status. RU300 transmits the target code to the subsystem device. After the transmission is completed, RU300 sends the target code verification code to the subsystem, and the subsystem needs to return the verification result. If the verification fails, RU300 returns that the update failed.

[0052] It should be noted that although the train includes multiple on-board subsystem devices, in this embodiment, a communication connection is established only through the on-board host and the ground server, thereby avoiding security risks caused by communication between each on-board subsystem device and the ground server.

[0053] The software package to be upgraded includes upgrade script files of each historical version of the software, and the upgrade script file includes the local storage path, backup operation command and backup storage path of each file in the corresponding version of the software. For example, if the software version of the software package to be upgraded is V5, and there are 4 historical versions of V1, V2, V3 and V4 before, the upgrade script files corresponding to V1, V2, V3 and V4 can be included in the software package to be upgraded of V5. Optionally, the upgrade script file can contain information such as the local storage path, backup operation command, backup storage path, version information, file checksum value, file size and update command of all files of this version of the software. Local storage path: indicates the storage path of the target code file on the board; backup operation command: indicates the operation command when making the target code file rollback software package; backup storage path: indicates the storage path of the target code file when it is used for rollback backup; version information: indicates the version information of the target code file; file checksum value: indicates the checksum value calculated by the SM3 algorithm for the target code file; file size: indicates the size value of the target code file; update command: indicates the operation command when making the target code file update.

[0054] S102: Obtain a target upgrade script file corresponding to the current software version of the train on-board device from the upgrade script files of each historical version of the software included in the software package to be upgraded.

[0055] The subsystem device parses the obtained software package to be upgraded, and obtains the target upgrade script file corresponding to the current software version of the train onboard device from the upgrade script files of each historical version of the software package to be upgraded. For example, the matching upgrade script file can be obtained according to the software version information.

[0056] S103, executing the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, and storing it according to the backup storage path to generate a backup software package of the current software version of the train onboard equipment.

[0057] The software of train on-board equipment is generally composed of multiple files such as the main program, library files and configuration files. Therefore, by executing the backup operation commands in the target upgrade script file one by one, obtaining the target code file from the local storage path and storing it according to the backup storage path, a backup software package of the current software version of the train on-board equipment can be generated.

[0058] There may be multiple software versions at the on-board software update site of the train. In the prior art, the ground server needs to prepare the corresponding backup software version, and needs to query in advance or interact with the train to obtain the specific version on site, and upload the software to the on-board device. When the software is updated remotely, it is necessary to obtain the new version and the backup version at the same time, which takes a long time to transmit and increases the risk of target code abnormality. Compared with the prior art, this embodiment compiles an upgrade script file for each historical version of the software, and before upgrading the on-board software of the train, first finds the upgrade script file of the corresponding version according to the current software version information, and then automatically backs up the current software version according to the script. The ground server does not need to prepare all software versions, which reduces the process of uploading backup version files. The risk of target code damage during transmission is reduced by automatically packaging and generating backup versions locally, and the traffic consumption and overall update time of vehicle-to-ground transmission are reduced.

[0059] S104: using the software package to be upgraded to update the software of the train onboard equipment.

[0060] After completing the automatic backup of the current software version, the software package to be upgraded can be used to update the software of the train onboard equipment. Specifically, the subsystem equipment can find the new version script file and execute the update commands in the upgrade script file one by one to update each target code file. After the update is completed, the board reset is automatically triggered or the on-site personnel are promoted to reset the board, and the heartbeat status of the ground server and the onboard host is changed to the version confirmation status.

[0061] S105, determining whether the software of the train onboard equipment is updated successfully, and if the update fails, using the backup software package to restore the software of the train onboard equipment.

[0062] In an optional implementation, the upgrade script file also includes update commands for each file in the corresponding version of the software. Using the backup software package to perform software recovery on the train onboard equipment may specifically include: executing the update commands in the target upgrade script file one by one to implement the rollback operation of each file in the backup software package.

[0063] The train on-board software upgrade method provided in this embodiment obtains the software package to be upgraded from the ground server by wireless transmission, the software package to be upgraded includes the upgrade script files of each historical version of the software, and the upgrade script files include the local storage path, backup operation command and backup storage path of each file in the corresponding version of the software; obtains the target upgrade script file corresponding to the current software version of the train on-board device from the upgrade script files of each historical version of the software included in the software package to be upgraded; executes the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, and stores it according to the backup storage path to generate a backup software package of the current software version of the train on-board device; uses the software package to be upgraded to update the software of the train on-board device; determines whether the software of the train on-board device is successfully updated, and if the update fails, uses the backup software package to restore the software of the train on-board device. Automatically generating a backup software package locally in the train without manual participation reduces the transmission time and traffic consumption, and helps to improve the upgrade efficiency and reliability.

[0064] After the software upgrade fails, a backup software package needs to be used to perform a software rollback operation. So how to quickly determine whether the software of the train onboard equipment has been successfully updated? In an optional implementation, determining whether the software of the train onboard equipment has been successfully updated may specifically include: obtaining the software version information of the train onboard equipment after the update and the software version information of the software package to be upgraded; if the software version information of the train onboard equipment after the update is inconsistent with the software version information of the software package to be upgraded, it is determined that the software update of the train onboard equipment has failed. After the subsystem board is restarted successfully, if it is detected that the program is running, first query the subsystem program for the current software version information, and obtain the new version information from the local new version software package. If the two version information are inconsistent, it means that the update has failed and a software rollback operation is required.

[0065] However, even if the software version information of the train's onboard equipment is consistent with the software version information of the software package to be upgraded after the update, it cannot be 100% certain that the software update of the train's onboard equipment is successful. This is because onboard equipment in the rail transit field generally uses embedded systems, and there are many library files and configuration files in the train's onboard software. When a library file or configuration fails to update or is incomplete, the software may still be able to start, and only when it runs to a specific working condition will an abnormality occur. In other words, if some components or configuration files are incompletely updated or fail to update during the software update process, it will lead to the risk of abnormal software operation under some working conditions. It is impossible to accurately determine whether the software has been updated successfully through existing software process monitoring. In order to solve this problem, on the basis of the above-mentioned embodiments, in the train on-board software upgrade method provided by this embodiment, if the software version information of the train on-board equipment after the update is consistent with the software version information of the software package to be upgraded, it is determined whether the software of the train on-board equipment has been successfully updated, which can also specifically include: comparing the file size and file check code value of each file in the software of the train on-board equipment after the update with the file size and file check code value of the file in the software package to be upgraded one by one to see if they are consistent; if they are consistent, it is determined that the software update of the train on-board equipment is successful; otherwise, it is determined that the software update of the train on-board equipment has failed. In other words, only when each file in the software package to be upgraded is successfully updated can the software update of the train on-board equipment be determined to be successful. The method provided by this embodiment can accurately detect the situation where some files fail to update, and perform software rollback in time, which can effectively avoid the risk of abnormal software operation.

[0066] The train on-board software upgrade not only has high reliability requirements, but also has strict requirements for the upgrade time. This is because the time left for engineers at the upgrade site is often very limited, so reducing the upgrade time is of great significance. On the basis of any of the above embodiments, in order to further reduce the upgrade time, in the train on-board software upgrade method provided in this embodiment, the software of the train on-board equipment is updated using the software package to be upgraded, which can specifically include: for each file to be updated, judging whether the file size and file check code value of the current software of the train on-board equipment are consistent with those of the file in the software package to be upgraded; if they are consistent, the update operation is not performed on the file, and if they are inconsistent, the update operation is performed on the file. The software of the train on-board equipment is generally composed of a main program, a library file and a configuration file, and the library file is generally not updated. If the file size and file check code value of the current software of the train on-board equipment are consistent with those of a file in the software package to be upgraded, it means that the file has not been updated, and there is no need to perform the update operation, which can reduce the update time and reduce the risk of update failure.

[0067] In an optional implementation, before executing the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, the method also includes: determining whether the software version information of the current software of the train onboard equipment is consistent with the software version information of the software package to be upgraded; if they are consistent, terminating the software upgrade process. If they are consistent, it means that the current software of the train onboard equipment is already the latest version and does not need to be updated. Terminate the software update process to avoid invalid updates. Furthermore, after terminating the software upgrade process, delete the software package to be upgraded stored in the train onboard equipment to release storage space.

[0068] To sum up, the train on-board software upgrade method proposed in the present application reduces the risk of target code damage during transmission by automatically packaging and generating backup versions based on the upgrade script files locally on-board, thereby reducing the traffic consumption and overall update time of train-to-ground transmission; the ground server does not need to prepare all software versions, which reduces the backup version file upload process and reduces the complexity of on-site update operations; further, the file size and file verification code value of each file in the train on-board equipment software after the update are compared one by one with the file size and file verification code value of the file in the software package to be upgraded, which can accurately detect the failure of some file updates, perform software rollback in time, effectively avoid the risk of software operation abnormalities, and improve the reliability of automatic software upgrades.

[0069] Figure 3 This is a schematic diagram of the structure of a train onboard software upgrade device provided by an embodiment of the present invention. Figure 3 As shown, the train onboard software upgrade device 30 provided in this embodiment may include:

[0070] The acquisition module 301 is used to obtain the software package to be upgraded from the ground server by wireless transmission. The software package to be upgraded includes the upgrade script files of each historical version of the software. The upgrade script files include the local storage path, backup operation command and backup storage path of each file in the corresponding version of the software;

[0071] A matching module 302 is used to obtain a target upgrade script file corresponding to the current software version of the train on-board device from the upgrade script files of each historical version of the software included in the software package to be upgraded;

[0072] The backup module 303 is used to execute the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, and store it according to the backup storage path to generate a backup software package of the current software version of the train onboard equipment;

[0073] An upgrade module 304 is used to update the software of the train onboard equipment using the software package to be upgraded;

[0074] The rollback module 305 is used to determine whether the software of the train onboard equipment is updated successfully. If the update fails, the backup software package is used to restore the software of the train onboard equipment.

[0075] The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0076] In an optional implementation manner, the rollback module 305 is used to determine whether the software of the train onboard equipment is successfully updated, which may specifically include:

[0077] Obtain the software version information of the updated train onboard equipment and the software version information of the software package to be upgraded;

[0078] If the software version information of the train onboard device after the update is inconsistent with the software version information of the software package to be upgraded, it is determined that the software update of the train onboard device has failed.

[0079] In an optional implementation, if the software version information of the train onboard device after the update is consistent with the software version information of the software package to be upgraded, the rollback module 305 is used to determine whether the software of the train onboard device is successfully updated, and may also include:

[0080] Compare the file size and file check code value of each file in the updated train onboard equipment software one by one with the file size and file check code value of the file in the software package to be upgraded to see if they are consistent;

[0081] If they are consistent, it is determined that the software update of the train onboard equipment is successful; otherwise, it is determined that the software update of the train onboard equipment has failed.

[0082] In an optional implementation, the upgrade module 304 is used to update the software of the train onboard equipment using the software package to be upgraded, which may specifically include:

[0083] For each file to be updated, determine whether the file size and file checksum value of the current software of the train onboard equipment are consistent with those of the file in the software package to be upgraded;

[0084] If they are consistent, the file will not be updated; if they are inconsistent, the file will be updated.

[0085] In an optional implementation, the backup module 303 is also used to determine whether the software version information of the current software of the train on-board equipment is consistent with the software version information of the software package to be upgraded before executing the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path; if they are consistent, the software upgrade process is terminated.

[0086] In an optional implementation, the backup module 303 is further configured to delete the software package to be upgraded stored in the train onboard device after the software upgrade process is terminated.

[0087] In an optional implementation, the upgrade script file also includes update commands for each file in the corresponding version of the software. The rollback module 305 is used to restore the software of the train onboard equipment using the backup software package, which may specifically include:

[0088] Execute the update commands in the target upgrade script file one by one to implement the rollback operation of each file in the backup software package.

[0089] The present invention also provides an electronic device, see Figure 4 As shown, the embodiment of the present invention is only Figure 4 This is just an example for explanation, and it does not mean that the present invention is limited to this. Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, the electronic device 40 provided in this embodiment may include: a memory 401, a processor 402 and a bus 403. The bus 403 is used to realize the connection between various components.

[0090] The memory 401 stores a computer program, and when the computer program is executed by the processor 402 , the technical solution of any of the above method embodiments can be implemented.

[0091] The memory 401 and the processor 402 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines, such as through bus 403. The memory 401 stores a computer program for implementing the train onboard software upgrade method, including at least one software function module that can be stored in the memory 401 in the form of software or firmware. The processor 402 executes various functional applications and data processing by running the software program and module stored in the memory 401.

[0092] The memory 401 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 401 is used to store programs, and the processor 402 executes the programs after receiving the execution instruction. Furthermore, the software programs and modules in the above-mentioned memory 401 may also include an operating system, which may include various software components and / or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.

[0093] The processor 402 may be an integrated circuit chip with signal processing capability. The processor 402 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps, and logic diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. It is understood that Figure 4 The structure is only for illustration and may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure may be implemented by hardware and / or software.

[0094] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the technical solution of any of the above method embodiments.

[0095] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0096] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.

Claims

1. A train onboard software upgrade method, characterized in that: include: The software package to be upgraded is obtained from the ground server by wireless transmission, wherein the software package to be upgraded includes upgrade script files of various historical versions of software, and the upgrade script files include local storage paths, backup operation commands and backup storage paths of various files in the corresponding version of software; Obtaining a target upgrade script file corresponding to the current software version of the train on-board device from the upgrade script files of each historical version of the software included in the software package to be upgraded; Execute the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, and store it according to the backup storage path to generate a backup software package of the current software version of the train onboard equipment; Updating the software of the train onboard equipment using the software package to be upgraded; Determine whether the software of the train onboard equipment is updated successfully. If the update fails, use the backup software package to restore the software of the train onboard equipment.

2. The method according to claim 1, characterized in that: The step of determining whether the software of the train onboard equipment is successfully updated includes: Obtaining the software version information of the updated train onboard equipment and the software version information of the software package to be upgraded; If the software version information of the train onboard device after the update is inconsistent with the software version information of the software package to be upgraded, it is determined that the software update of the train onboard device has failed.

3. The method according to claim 2, characterized in that If the software version information of the onboard equipment of the train after the update is consistent with the software version information of the software package to be upgraded, the step of determining whether the software of the onboard equipment of the train is successfully updated also includes: Compare the file size and file check code value of each file in the updated train on-board equipment software one by one with the file size and file check code value of the file in the software package to be upgraded to see if they are consistent; If they are consistent, it is determined that the software update of the train onboard equipment is successful; otherwise, it is determined that the software update of the train onboard equipment has failed.

4. The method according to claim 1, characterized in that: The updating of the software of the train onboard equipment by using the software package to be upgraded comprises: For each file to be updated, determine whether the file size and file checksum value of the current software of the train onboard device are consistent with those of the file in the software package to be upgraded; If they are consistent, the file will not be updated; if they are inconsistent, the file will be updated.

5. The method according to claim 1, characterized in that Before executing the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, the method further includes: Determine whether the software version information of the current software of the train onboard equipment is consistent with the software version information of the software package to be upgraded; If they are consistent, the software upgrade process is terminated.

6. The method according to claim 5, characterized in that After terminating the software upgrade process, the method further includes: Delete the software package to be upgraded stored in the train onboard equipment.

7. The method according to any one of claims 1 to 6, characterized in that: The upgrade script file also includes update commands for each file in the corresponding version of the software. The software recovery of the train onboard equipment using the backup software package includes: The update commands in the target upgrade script file are executed one by one to implement the rollback operation of each file in the backup software package.

8. A train onboard software upgrade device, characterized in that: include: An acquisition module is used to acquire the software package to be upgraded from the ground server by wireless transmission, wherein the software package to be upgraded includes upgrade script files of various historical versions of software, and the upgrade script files include local storage paths, backup operation commands and backup storage paths of various files in the corresponding version of software; A matching module, used to obtain a target upgrade script file corresponding to the current software version of the train on-board equipment from the upgrade script files of each historical version of the software included in the software package to be upgraded; A backup module, used to execute the backup operation commands in the target upgrade script file one by one to obtain the target code file from the local storage path, and store it according to the backup storage path to generate a backup software package of the current software version of the train on-board equipment; An upgrade module, used to update the software of the train onboard equipment using the software package to be upgraded; The rollback module is used to determine whether the software of the train onboard equipment has been successfully updated. If the update fails, the backup software package is used to restore the software of the train onboard equipment.

9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the train on-board software upgrade method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the train on-board software upgrade method as described in any one of claims 1-7.