Remote upgrading method for mining substation

By dividing the Flash memory into different regions and using AES encryption algorithm, remote upgrades the applications of the mining sub-station, solving the problems of time-consuming and low security in traditional update methods, and achieving efficient and secure online upgrades and multi-device automatic upgrade functions.

CN119806567APending Publication Date: 2025-04-11CHINA COAL TECH & ENG GRP CHONGQING RES INST CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411671501.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The application update of traditional mining sub-stations relies on fixed-point writing on-site, which takes a long time and is inefficient. There is a risk that the program content is illegally acquired or tampered with, making it difficult to meet the needs of modern coal mines for efficient operation and maintenance.

Method used

By dividing the Flash memory into a boot code area, an application area and an identification discovery area, and using the AES symmetric encryption algorithm to encrypt the application file, the ciphertext file format app.f16 is generated. The remotely compiled application files are converted into ciphertext files through encryption algorithms, and are transferred to the BootLoader firmware program of the mining sub-site for ciphertext decryption, stored in the application area, and added Identify information and program entry address in the identification discovery area.

Benefits of technology

It effectively prevents the risks of program leakage and tampering, improves the security and integrity of the software, optimizes the storage structure and data management, realizes personalized management and protection of the Flash area, improves the upgrade efficiency, and supports automatic online upgrade of multiple devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806567A_ABST
    Figure CN119806567A_ABST
Patent Text Reader

Abstract

The invention relates to a remote upgrading method for a mining substation, and belongs to the technical field of coal mine equipment. The method comprises the following steps: firstly, dividing a Flash memory of the mining substation into a boot code area, an application program area and an identifier discovery area, and respectively storing BootLoader firmware program, application program and Identify information; and the remotely compiled application program file is encrypted and then transmitted to the mining substation, the BootLoader firmware program decrypts the remotely compiled application program file and stores the remotely compiled application program file in the application program area, and the identifier discovery area is updated at the same time. The upper computer software supports multi-task multi-IP automatic upgrading, the upgrading efficiency is improved, a statistical function and a speed regulation upgrading function are provided, and controllability and reliability of the upgrading process are ensured. According to the method, program leakage and illegal copying and tampering are effectively prevented, the storage structure is optimized, and the upgrading efficiency and safety are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of coal mine equipment and relates to a remote upgrading method for a mine substation. Background Art

[0002] The underground working environment of coal mines is complex and dangerous. Therefore, efficient, stable, and flexibly adjustable control equipment is essential to ensure production safety and efficiency. As the core component of the coal mine safety monitoring system, the mining substation is not only responsible for data collection, real-time processing, and precise control, but also undertakes the collaborative operation tasks between various systems. Its importance is self-evident. Given the large demand for such equipment in coal mines and the special functional requirements that may exist on different working surfaces, how to quickly respond to these requirements and perform on-site maintenance has become a key issue in coal mine automation management.

[0003] Traditionally, the application update of mining substations relies on fixed-point programming on site with a fixed programmer. This process is not only time-consuming and inefficient, but also has many inconveniences in actual operation, making it difficult to meet the pursuit of efficient operation and maintenance in modern coal mines. Therefore, it is particularly important to explore and implement a simpler and faster online upgrade solution.

[0004] Ethernet interface is widely used in online upgrade of mine equipment due to its fast transmission speed, high stability and strong compatibility, and has gradually become the mainstream choice. The new program data is sent to the substation through the host computer software and directly stored in the Flash memory to complete the upgrade. This method greatly improves the upgrade efficiency. However, in actual application, this solution also exposes some problems that need to be solved:

[0005] First, compiled application files (such as app.bin) often lack effective protection measures, which may lead to illegal acquisition or tampering of program contents, thus threatening the safe production of coal mines.

[0006] Secondly, the Flash memory partition coding design is not flexible enough and lacks identification area coding, making it difficult to accurately identify data in different areas during the upgrade process. At the same time, the Flash partition area is not protected, increasing the risk of data damage.

[0007] Finally, the current online upgrade method faces challenges in achieving automatic and rapid upgrades of multiple devices. It often requires manual monitoring and is difficult to achieve batch upgrades, which undoubtedly limits upgrade efficiency and increases maintenance costs. Summary of the invention

[0008] In view of this, an object of the present invention is to provide a remote upgrading method for a mining substation.

[0009] In order to achieve the above object, the present invention provides the following technical solutions:

[0010] A remote upgrade method for a mining substation, comprising:

[0011] First, according to the Flash memory size of the processor of the mining substation, the Flash memory is divided into a boot code area, an application area and an identification discovery area. The code boot area is used to store the BootLoader firmware program, the application area is used to store different applications, and the identification discovery area is used to store the Identify information of different applications.

[0012] Secondly, the remotely compiled application file is first converted from the app.bin file to the ciphertext file format app.f16 through an encryption algorithm; then it is transmitted to the host computer software of the mining substation, and the host computer software sends the ciphertext file to the BootLoader firmware program of the mining substation. After the BootLoader firmware program decrypts the ciphertext, it stores the program source file in the application area of ​​the Flash memory of the mining substation, and adds the Identify information and program entry address of the corresponding application in the identification discovery area. After receiving the application source file data, the BootLoader firmware program sends feedback information to the host computer software;

[0013] After receiving the feedback information, the host computer software sends a restart command to the BootLoader firmware program. The BootLoader firmware program jumps to the corresponding application area according to the application entry address in the Identify information in the identification discovery area, restarts the application file in the application area, and then clears the application and Identify code to complete the upgrade.

[0014] Furthermore, the BootLoader firmware program in the boot code area is responsible for sending and receiving information of the upgrade program, identifying the Identify code and jumping the application program.

[0015] Furthermore, the Identify code that identifies the discovery zone is bound to the unique coded address of the device, and the unique coded address of the device is encoded into the Identify code through a coding algorithm.

[0016] Furthermore, the encryption process of the source file adopts the AES symmetric encryption algorithm, and the source files in the app.bin and app.hex file formats are encrypted by the AES symmetric encryption algorithm, and the App.f16 format files are obtained by the source code file conversion method;

[0017] Among them, the encryption process of the AES algorithm is:

[0018] Initial round key addition: XOR the plaintext with the initial round key;

[0019] Byte replacement: Use S-box to replace each byte;

[0020] Row shift: shift the rows of the matrix;

[0021] Column mixing: Mixing operations on the columns of a matrix;

[0022] Repeat the above steps until the required number of rounds is reached;

[0023] Final round key addition: XOR the final result with the final round key to obtain the ciphertext.

[0024] Furthermore, the BootLoader firmware decrypts the encrypted file in the App.f16 format using the AES symmetric encryption algorithm to obtain the source file.

[0025] Among them, the decryption process of the AES algorithm:

[0026] Initial round key plus inverse operation: XOR the ciphertext with the initial round key;

[0027] Inverse column mixing operation: perform inverse mixing operation on the columns of the matrix;

[0028] Inverse row shift operation: perform inverse shift operation on the rows of the matrix;

[0029] Inverse byte replacement operation: Use the inverse matrix of the S-box to replace each byte;

[0030] Repeat the above steps until the required number of rounds is reached;

[0031] Final round key plus inverse operation: XOR the final result with the final round key to obtain the plaintext.

[0032] Furthermore, the host computer adopts a multi-task multi-IP automatic upgrade method, which can control multiple devices to automatically upgrade online at the same time according to the IP of the mining substation; the host computer can also collect statistics on the upgrade process and upgrade results.

[0033] When this method performs an upgrade, the process is as follows:

[0034] S1, start the upgrade process, obtain the Flash entry address and boot area address;

[0035] S2, MCU's own program boot area starts;

[0036] S3, MCU built-in Flash application entry address detection;

[0037] S4, determine whether it is the latest application, if not, proceed to step S5; otherwise, proceed to step S9;

[0038] S5. The mining substation displays the ID address, reminding the user to upgrade the program, and the mining substation upgrade program is ready;

[0039] S6. Analyze and determine whether the upgrade conditions are met. If so, the mining substation interacts with the host computer software to obtain the application file. If not, a failure message is fed back to the host computer software.

[0040] S7, the host computer software and the mining substation interact with the file information package, file data package and file receiving package. After receiving the file, the mining substation identifies the Identify code and feeds back the Identify code identification completion information to the host computer software;

[0041] S8. After receiving the Identify code identification completion feedback information, the host computer software sends a restart device command package to the mining substation, and the mining substation restarts;

[0042] S9, jump to the application area according to the application entry address, and restart the upgrade;

[0043] S10. Clear the application and the identification discovery area address, and the upgrade is completed.

[0044] The beneficial effects of the present invention are:

[0045] The present invention effectively prevents the risk of program leakage by planning the encryption algorithm of the application program app.bin file and encrypting it into the app.f16 file. This exclusive file format not only increases the difficulty of the program being illegally copied or tampered with, but also ensures the security and integrity of the software in the mine equipment.

[0046] The present invention divides the Flash area into a boot code area (BootLoader firmware), an application area (app.f16) and an identification discovery area (Identify). This innovative design not only optimizes the storage structure, but also realizes personalized management and protection of the Flash area by binding the identification discovery area with the unique coding address of the device. This binding mechanism effectively prevents the Flash content from being illegally read out and applied to other products of the same model, thereby maintaining the uniqueness and legitimacy of the device, and also provides technical support for combating counterfeit and shoddy products.

[0047] The SubStationUpdate.exe software used in the host computer of the present invention integrates the search and upgrade functions, and supports the automatic upgrade module defined by multiple tasks and multiple IPs. This design greatly improves the upgrade efficiency, making it possible to upgrade multiple devices at the same time without the need for personnel to guard them one by one. In addition, the statistical function and speed adjustment upgrade function during the upgrade process provide administrators with more sophisticated control means, ensuring the controllability and reliability of the upgrade process.

[0048] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0050] Figure 1 This is a schematic diagram of a remote upgrade method for a mining substation;

[0051] Figure 2 This is a schematic diagram of the ciphertext encryption and transmission process;

[0052] Figure 3 This is a schematic diagram of Flash partition;

[0053] Figure 4 This is a schematic diagram of the host computer software. DETAILED DESCRIPTION

[0054] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0055] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0056] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0057] See also Figure 1 to Figure 4 , which is a remote upgrade method for a mining substation.

[0058] Example

[0059] This embodiment provides a remote upgrade method for a mining substation. Figure 1 As shown, the method comprises the following steps:

[0060] First, according to the Flash memory size of the processor of the mining substation, the Flash memory is divided into a boot code area, an application area and an identification discovery area. The code boot area is used to store the BootLoader firmware program, the application area is used to store different applications, and the identification discovery area is used to store the Identify information of different applications.

[0061] Secondly, if Figure 2 As shown, the remotely compiled application file is first converted from the app.bin file to the ciphertext file format app.f16 through an encryption algorithm; and then transmitted to the host computer software SubStationUpdate.exe of the mining substation, the host computer software SubStationUpdate.exe sends the ciphertext file to the BootLoader firmware program of the mining substation, the BootLoader firmware program decrypts the ciphertext and stores the program source file in the application area of ​​the Flash memory of the mining substation, and adds the Identify information and program entry address of the corresponding application in the identification discovery area, and the BootLoader firmware program sends feedback information to the host computer software SubStationUpdate.exe after receiving the application source file data;

[0062] After receiving the feedback information, the host computer software SubStationUpdate.exe sends a restart command to the BootLoader firmware program. The BootLoader firmware program jumps to the corresponding application area according to the application entry address in the Identify information in the identification discovery area, restarts the application file in the application area, and then clears the application and Identify code to complete this upgrade.

[0063] In this embodiment, if Figure 3 As shown in the figure, the BootLoader firmware program in the boot code area is mainly responsible for sending and receiving information of the upgrade program, identifying the Identify code and jumping the application program. The identification code of the Flash identification area is bound to the unique coding address of the device to prevent the Flash area from being read out and leaked to other products of the same model. The Flash of the fuselage and the MCU are bound to prevent counterfeit products. The host computer uses SubStationUpdate.exe software and adopts a multi-task multi-IP automatic upgrade module design to realize the automatic online upgrade function of multiple devices. At the same time, the host computer software has the functions of upgrading process statistics, upgrading result statistics and speed adjustment upgrade. It solves the problem that it is difficult to upgrade multiple devices automatically and quickly, and it needs personnel to guard and cannot upgrade in batches.

[0064] Embedded applications are mainly composed of two formats, one is app.bin file and the other is app.hex file. When these two files are released to users, program information leakage is easy to occur, which affects the interests of the enterprise. Therefore, the source file of the application needs to be encrypted, and the encrypted file is generated into a special format file App.f16. The remote upgrade software (SubStationUpdate.exe) recognizes the app.f16 file, and the substation BootLoader firmware parses the encryption algorithm and converts it into the source file data and stores it in the application area.

[0065] Among them, the encryption process of the source file adopts the AES symmetric encryption algorithm. The source files in the app.bin and app.hex file formats are encrypted by the AES symmetric encryption algorithm, and the App.f16 format file is obtained by the source code file conversion method. The encryption process of the AES algorithm: Initial round key addition: XOR the plaintext with the initial round key. Byte replacement: Use the S box to replace each byte. Row shift: Shift the rows of the matrix. Column mixing: Mix the columns of the matrix. Repeat the above steps until the required number of rounds is reached. No column mixing operation is performed in the last round. Final round key addition: XOR the final result with the final round key to obtain the ciphertext.

[0066] The BootLoader firmware decrypts the encrypted file in the App.f16 format using the AES symmetric encryption algorithm to obtain the source file. The decryption process of the AES algorithm: Initial round key addition: XOR the ciphertext with the initial round key. Column mixing inverse operation: Perform an inverse mixing operation on the columns of the matrix. Row shift inverse operation: Perform an inverse shift operation on the rows of the matrix. Byte substitution inverse operation: Replace each byte using the inverse matrix of the S-box. Repeat the above steps until the required number of rounds is reached. Final round key addition inverse operation: XOR the final result with the final round key to obtain the plaintext.

[0067] In this embodiment, the unique coded address of the device is used as the key to synchronize the device information, and a coding algorithm is added to realize the automatic binding of the search and upgrade functions to the ciphertext transmission of the unique code. Figure 4 As shown, the host computer adopts a multi-task multi-IP automatic upgrade module design to realize the automatic online upgrade function of multiple devices. At the same time, the host computer software has functions such as upgrade process statistics, upgrade result statistics and speed adjustment upgrade.

[0068] This embodiment also provides a specific implementation process of a remote upgrade method for a mining substation, which mainly includes the following stages:

[0069] S1, start the upgrade process, obtain the Flash entry address and boot area address;

[0070] S2, MCU's own program boot area starts;

[0071] S3, MCU built-in Flash application entry address detection;

[0072] S4, determine whether it is the latest application, if not, proceed to step S5; otherwise, proceed to step S9;

[0073] S5. The mining substation displays the ID address, reminding the user to upgrade the program, and the mining substation upgrade program is ready;

[0074] S6. Analyze and determine whether the upgrade conditions are met. If so, the mining substation interacts with the host computer software to obtain the application file. If not, a failure message is fed back to the host computer software.

[0075] S7, the host computer software and the mining substation interact with the file information package, file data package and file receiving package. After receiving the file, the mining substation identifies the Identify code and feeds back the Identify code identification completion information to the host computer software;

[0076] S8. After receiving the Identify code identification completion feedback information, the host computer software sends a restart device command package to the mining substation, and the mining substation restarts;

[0077] S9, jump to the application area according to the application entry address, and restart the upgrade;

[0078] S10. Clear the application and the identification discovery area address, and the upgrade is completed.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A remote upgrade method for a mining substation, characterized in that: The method comprises: First, according to the Flash memory size of the processor of the mining substation, the Flash memory is divided into a boot code area, an application area and an identification discovery area. The code boot area is used to store the BootLoader firmware program, the application area is used to store different applications, and the identification discovery area is used to store the Identify information of different applications. Secondly, the remotely compiled application file is first converted from the app.bin file to the ciphertext file format app.f16 through an encryption algorithm; then it is transmitted to the host computer software of the mining substation, and the host computer software sends the ciphertext file to the BootLoader firmware program of the mining substation. After the BootLoader firmware program decrypts the ciphertext, it stores the program source file in the application area of ​​the Flash memory of the mining substation, and adds the Identify information and program entry address of the corresponding application in the identification discovery area. After receiving the application source file data, the BootLoader firmware program sends feedback information to the host computer software; After receiving the feedback information, the host computer software sends a restart command to the BootLoader firmware program. The BootLoader firmware program jumps to the corresponding application area according to the application entry address in the Identify information in the identification discovery area, restarts the application file in the application area, and then clears the application and Identify code to complete the upgrade.

2. A mining substation remote upgrade method according to claim 1, characterized in that: The BootLoader firmware program in the boot code area is responsible for sending and receiving information of the upgrade program, identifying the Identify code and jumping the application program.

3. A remote upgrade method for a mining substation according to claim 1, characterized in that: The Identify code that identifies the discovery zone is bound to the unique coding address of the device, and the unique coding address of the device is encoded into the Identify code through a coding algorithm.

4. A mining substation remote upgrade method according to claim 1, characterized in that: The encryption of the source files adopts the AES symmetric encryption algorithm. The source files in the app.bin and app.hex file formats are encrypted by the AES symmetric encryption algorithm, and the files in the App.f16 format are obtained by converting the source code files. Among them, the encryption process of the AES algorithm is: Initial round key addition: XOR the plaintext with the initial round key; Byte replacement: Use S-box to replace each byte; Row shift: shift the rows of the matrix; Column mixing: Mixing operations on the columns of a matrix; Repeat the above steps until the required number of rounds is reached; Final round key addition: XOR the final result with the final round key to obtain the ciphertext.

5. A mining substation remote upgrade method according to claim 1, characterized in that: The BootLoader firmware decrypts the encrypted file in the App.f16 format using the AES symmetric encryption algorithm to obtain the source file. Among them, the decryption process of the AES algorithm: Initial round key plus inverse operation: XOR the ciphertext with the initial round key; Inverse column mixing operation: perform inverse mixing operation on the columns of the matrix; Inverse row shift operation: perform inverse shift operation on the rows of the matrix; Inverse byte replacement operation: Use the inverse matrix of the S-box to replace each byte; Repeat the above steps until the required number of rounds is reached; Final round key plus inverse operation: XOR the final result with the final round key to obtain the plaintext.

6. A mine substation remote upgrade method according to claim 1, characterized in that: The host computer adopts a multi-task multi-IP automatic upgrade method, which can control multiple devices to automatically upgrade online at the same time according to the IP of the mining substation; the host computer can also collect statistics on the upgrade process and upgrade results.

7. A mining substation remote upgrade method according to claim 1, characterized in that: When the method performs an upgrade, the process is as follows: S1, start the upgrade process, obtain the Flash entry address and boot area address; S2, the MCU's own program boot area starts; S3, MCU built-in Flash application entry address detection; S4, determine whether it is the latest application, if not, proceed to step S5; Otherwise, go to step S9; S5. The mining substation displays the ID address, reminding the user to upgrade the program, and the mining substation upgrade program is ready; S6. Analyze and determine whether the upgrade conditions are met. If so, the mining substation interacts with the host computer software to obtain the application file. If not, a failure message is fed back to the host computer software. S7, the host computer software and the mining substation interact with the file information package, file data package and file receiving package. After receiving the file, the mining substation identifies the Identify code and feeds back the Identify code identification completion information to the host computer software; S8. After receiving the Identify code identification completion feedback information, the host computer software sends a restart device command package to the mining substation, and the mining substation restarts; S9, jump to the application area according to the application entry address, and restart the upgrade; S10. Clear the application and the identification discovery area address, and the upgrade is completed.

Citation Information

Patent Citations

  • Equipment remote upgrade method based on certificateless system

    CN109560931A

  • Lower computer software updating method and system and computer readable storage medium

    CN110780910A

  • Method for flexibly storing and upgrading bootstrap and application programs

    CN114860291A

  • Software upgrading method and system

    CN116795411A