Software upgrading method, computing equipment and mining equipment

By responding to write authorization and preset policies in intelligent mechanical devices, we ensure read-only control of mobile storage devices, and solve the risks of malicious code implantation and firmware tampering during software upgrades, and achieve a safe and controllable software upgrade.

CN119622778APending Publication Date: 2025-03-14ZOOMLION HEAVY INDUSTRY SCIENCE AND TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411764025.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the process of software upgrade, smart mechanical devices have the risk of malicious code implantation and firmware tampering, and lack an effective protection mechanism.

Method used

By responding to write authorization, the target upgrade object is determined according to the preset policy, and the permission to write the target upgrade package is opened to the mobile storage device in the read-only control state, ensuring the security and controllability of the software upgrade process.

Benefits of technology

It realizes a safe and controllable software upgrade to intelligent mechanical devices, avoids the implantation of malicious code and firmware tampering, and ensures the security and stability of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622778A_ABST
    Figure CN119622778A_ABST
Patent Text Reader

Abstract

The invention discloses a software upgrading method, computing equipment and mining equipment, and the software upgrading method comprises the following steps: determining a target upgrading object according to a preset strategy in response to writing authorization passing; when a target upgrade package corresponding to the target upgrade object is determined from the external mobile storage device, opening a write-in permission for writing in the target upgrade package for the mobile storage device in the read-only management and control state; and performing software upgrading control according to the written target upgrading package. According to the technical scheme, write authorization verification can be carried out on the external mobile storage device so as to realize access supervision on the mobile storage device, and read-only management and control can be carried out on the mobile storage device when the write authorization is passed; therefore, when the target upgrade object is subsequently determined and the target upgrade package corresponding to the target upgrade object is determined from the external mobile storage device, only the write-in permission for writing in the target upgrade package can be opened to ensure that all operations are carried out within an expected range, and the purpose of avoiding implantation of malicious codes is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a software upgrading method, a computing device and a mining device. Background Art

[0002] Smart mechanical equipment generally needs to iterate and optimize its functions, and software upgrades are essential. Among the software upgrade methods for smart mechanical equipment on the current market, the most common method is to directly write the software upgrade package into a USB flash drive (a USB flash drive is a micro high-capacity mobile storage product with a USB interface that does not require a physical drive and can achieve data transmission through a USB interface, making it plug-and-play).

[0003] However, when upgrading by directly writing the software upgrade package into a USB flash drive, the write permission is not controlled when the USB flash drive is inserted into the intelligent mechanical device, which makes the intelligent mechanical device at risk of being implanted with malicious code and causing the firmware to be tampered with. Therefore, how to provide a protection mechanism to ensure that the intelligent mechanical device can be upgraded safely and controllably is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0004] The purpose of this application is to provide a software upgrade method, computing equipment and mining equipment, which can provide a protection mechanism to ensure that intelligent mechanical equipment can be upgraded safely and controllably.

[0005] To achieve the above objectives: In a first aspect, an embodiment of the present application provides a software upgrade method, including: in response to the write authorization being approved, determining a target upgrade object according to a preset strategy; when determining a target upgrade package corresponding to the target upgrade object from an external mobile storage device, opening the write permission for the target upgrade package for the mobile storage device in a read-only control state; and controlling the software upgrade according to the written target upgrade package.

[0006] In one embodiment, the conditions for determining whether the write authorization is passed include at least one of the following: Perform identity authentication on the received user authentication information, and the identity authentication passes; The verification time of the detected write authorization is within the preset time range; It is detected that the device state of the device is the preset state; The device is detected as being in the preset position.

[0007] In one embodiment, the preset strategy includes at least one of the following: receiving a selection operation from a user to determine the selected firmware as a target upgrade object; The currently operated firmware is determined as a target upgrade object; The associated firmware that has an associated relationship with the currently operated firmware is determined as a target upgrade object.

[0008] In one embodiment, the step of controlling the software upgrade according to the written target upgrade package further includes: after determining that the writing of the target upgrade package is completed, restoring the read-only control of the mobile storage device.

[0009] In one embodiment, the target upgrade package includes encrypted software data.

[0010] In one embodiment, the step of controlling the software upgrade according to the written target upgrade package includes: performing a decryption operation and / or digital verification to obtain software data; and upgrading the target upgrade object according to the software data.

[0011] In one embodiment, the steps of performing decryption operation and / or digital verification to obtain software data include: using a public key to decrypt the key encapsulation of the written target upgrade package to obtain a session key; using digital signature data to digitally verify the target upgrade package; after the digital verification passes, using the session key to decrypt the target upgrade package to obtain the software data.

[0012] In one embodiment, the encryption processing includes: compressing the software data to obtain compressed software data and its corresponding hash summary; encrypting the compressed software data using a symmetric encryption algorithm to obtain a session key and its corresponding ciphertext; digitally signing the session key and hash summary corresponding to the software data using a private key to generate digital signature data; encapsulating the session key using a public key to obtain a key encapsulation; and obtaining an upgrade package based on the ciphertext corresponding to the software data, the digital signature data, and the key encapsulation.

[0013] In one embodiment, the target upgrade package is split into multiple data blocks for writing and / or software upgrade control.

[0014] In one embodiment, the software upgrade method provided in the present application also includes: performing a write self-test, and when the write self-test result indicates a write interruption, determining a breakpoint data block corresponding to the write interruption, and performing write recovery control based on the breakpoint data block.

[0015] In one embodiment, the software upgrade method provided in the present application further includes: performing an upgrade self-check, and when the upgrade self-check result indicates that the upgrade is abnormal, performing recovery processing according to an abnormal recovery strategy.

[0016] In one embodiment, the abnormal recovery strategy includes at least one of the following: When the upgrade self-check result indicates that there is damaged data in the process of software upgrade control, a target data block corresponding to the damaged data is determined from redundant data, and upgrade recovery is performed based on the target data block, wherein the redundant data includes software data corresponding to the stored target upgrade package and / or original software data backed up before performing software upgrade control; When the upgrade self-check result indicates that the upgrade recovery fails, the program is rolled back based on the original software data in the redundant data; When the upgrade self-test results indicate hardware abnormality, alarm control is triggered; In one embodiment, the software upgrade method provided in the present application further includes: recording the execution status of tasks related to software upgrade control in the device in a work log.

[0017] In a second aspect, an embodiment of the present application provides a computing device, comprising: a processor and a memory storing a computer program, and when the processor runs the computer program, the steps of the software upgrade method described in any of the above items are implemented.

[0018] In a third aspect, an embodiment of the present application provides a mining device configured with the above-mentioned computing device.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the software upgrade method described in any of the above items are implemented.

[0020] The embodiment of the present application provides a software upgrade method, a computing device and a mining device, and the software upgrade method includes: in response to the passing of the write authorization, determining the target upgrade object according to the preset strategy; when determining the target upgrade package corresponding to the target upgrade object from the external mobile storage device, opening the write permission of writing the target upgrade package for the mobile storage device in the read-only control state; and performing software upgrade control according to the written target upgrade package. In this way, the technical solution of the present application can perform write authorization verification on the external mobile storage device to realize the access supervision of the mobile storage device, and can perform read-only control on the mobile storage device when the write authorization is passed, so that when the target upgrade object (such as the firmware to be upgraded) is subsequently determined and the target upgrade package corresponding to the target upgrade object is determined from the external mobile storage device, only the write permission of writing the target upgrade package can be opened to ensure that all operations are performed within the expected range, so as to achieve the purpose of avoiding the implantation of malicious code. Therefore, the technical solution of the present application can provide a protection mechanism to ensure that the intelligent mechanical equipment can be upgraded safely and controllably. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.

[0022] Figure 1 It is a flowchart of the software upgrade method provided in the embodiment of the present application.

[0023] Figure 2 It is a schematic diagram of the hardware system of the software upgrade system of the present application example.

[0024] Figure 3 It is a schematic diagram of the framework of the software system of the software upgrade system of the example of this application.

[0025] Figure 4 It is a schematic diagram of the operation flow of the dynamic permission module in the software upgrade system of the example of this application.

[0026] Figure 5 It is a schematic diagram of the operation flow of the encryption self-verification module in the software upgrade system of the present application example.

[0027] Figure 6 It is a schematic diagram of the operation flow of the intelligent recovery module in the software upgrade system of the present application example.

[0028] Figure 7 It is a schematic diagram of the structure of the computing device provided in an embodiment of the present application.

[0029] The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings have shown clear embodiments of this application, which will be described in more detail later. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0031] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.

[0032] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.

[0033] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0034] It should be noted that in this article, step codes such as S11 and S12 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S12 first and then S13, etc., but these should all be within the scope of protection of this application.

[0035] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.

[0037] See also Figure 1 , is a software upgrade method provided in an embodiment of the present application. The method can be executed by a computing device provided in an embodiment of the present application. The computing device can be implemented in software and / or hardware.

[0038] This embodiment provides a software upgrade method, including the following steps (for example, step S11 to step S13): Step S11: In response to the write authorization being passed, determining a target upgrade object according to a preset strategy.

[0039] In one implementation, the conditions for determining whether the write authorization is passed may represent the means of access supervision of the mobile storage device, and the supervision result may represent the scenario that meets the conditions for triggering a security upgrade.

[0040] In one embodiment, the conditions for determining whether the write authorization is passed can be adjusted based on user authority factors such as the tasks performed by the user who has passed the identity authentication, the time when the tasks are performed, and the location where the tasks are performed to ensure that the scenario that triggers the security upgrade is met.

[0041] In one embodiment, the conditions for determining whether the write authorization is passed include, but are not limited to, a combination of one or more of the following: Perform identity authentication on the received user authentication information, and the identity authentication passes; The verification time of the detected write authorization is within the preset time range; It is detected that the device state of the device is the preset state; The device is detected to be at a preset position; It is detected that the task performed by the user who has passed the identity authentication is a specific task within the scope of the user's authority.

[0042] In one embodiment, the user authentication information includes but is not limited to a password, a PIN code and / or biometric information, etc., which can identify the identity of the current operating user (such as role information) to prove that the current operating user has the right to use the mobile storage device to upgrade the software of this device.

[0043] In one embodiment, the received user authentication information is authenticated, and if the authentication is passed, it can be directly determined that the write authorization is passed. In this way, the technical solution of this embodiment can ensure that only specific personnel have the right to use the mobile storage device to upgrade the software of the device, so as to improve the security of the device software upgrade. In addition, after or at the same time as the user's identity authentication is passed, the technical solution of this embodiment can also combine other user authority factors (such as device status, the location of the device (the location of the task execution), the verification time of the write authorization (the time of the task execution), the task executed, etc.) to determine whether the write authorization is passed. In this way, it can be ensured that specific personnel have the right to use the mobile storage device to upgrade the software of the device only in specific scenarios. In this way, the authority of specific personnel can be further restricted to further improve the device security and personnel security of the device software upgrade.

[0044] For example, after the identity authentication of the current operating user is passed, if the verification time of the detected write authorization is within the working hours corresponding to the current operating user, the write authorization is determined to be passed to ensure that the specific user has the right to use the mobile storage device to upgrade the software of this device during his working hours.

[0045] For another example, after the current operating user's identity authentication is passed, if the detected verification time of the write authorization is within the idle time period corresponding to the device, the write authorization is determined to be passed, so as to ensure that the specific user has the right to use the mobile storage device to upgrade the software of the device only when the device is not performing work tasks (such as production work tasks).

[0046] For example, after the current operating user's identity authentication is passed, if it is detected that the device status of the device is a non-working state after power-on, the write authorization is determined to be passed to ensure that when a specific user subsequently triggers a software upgrade of the device, it will not cause the device to interrupt its work tasks, thereby ensuring the safety of the device and personnel.

[0047] For another example, for a movable device (such as a mining vehicle), after the current operating user's identity authentication is passed, when it is detected that the device is located at a preset safe parking location, the write authorization is determined to be passed, to ensure that specific users are only authorized to use mobile storage devices to upgrade the device's software in a safe location, thereby ensuring the safety of the equipment and personnel.

[0048] For example, after the identity authentication of the current operating user is passed, when it is detected that the task performed by the current operating user is a task corresponding to the user's work skills or the user's functional role, the write authorization is determined to be passed to ensure that a specific user has specific capabilities or operating permissions and is entitled to use a mobile storage device to upgrade the software of this device, thereby ensuring the professional match between personnel and the upgrade task of this device.

[0049] In one embodiment, when the verification time of the detected write authorization meets the preset time range, it can be directly determined that the write authorization is passed. In this way, the technical solution of this embodiment can ensure that the mobile storage device can be used to upgrade the software of the device only within a specific time range to reduce the impact on the execution of work tasks by the device. In addition, the technical solution of this embodiment can also combine other user authority factors (such as device status, location of the device (location for executing tasks), tasks executed, etc.) to determine whether the write authorization is passed after or at the same time when the verification time of the detected write authorization meets the preset time range. In this way, it can ensure that only in specific scenarios within a specific time range can the mobile storage device be used to upgrade the software of the device, so as to further improve the device security and personnel safety of the device software upgrade.

[0050] In one embodiment, when it is detected that the device state of the device is a preset state, it can be directly determined that the write authorization is passed. In this way, the technical solution of this embodiment can ensure that the mobile storage device can be used to upgrade the software of the device only in a specific device state, so as to reduce the impact on the execution of work tasks by the device or ensure the safety of the device. In addition, after or at the same time when the device state of the device is detected to be a preset state, the technical solution of this embodiment can also combine other user authority factors (such as the location of the device (the location of the task execution), the task executed, the verification time of the write authorization (the time of the task execution), etc.) to determine whether the write authorization is passed. In this way, it can ensure that only in a specific scenario of a specific device state can the mobile storage device be used to upgrade the software of the device, so as to further improve the device safety and personnel safety of the device software upgrade.

[0051] In one embodiment, when it is detected that the location of the device is a preset location, it can be directly determined that the write authorization is passed. In this way, the technical solution of this embodiment can ensure that only when the device is at a specific location can the mobile storage device be used to upgrade the software of the device, so as to reduce the impact on the performance of work tasks by the device or to ensure the safety of the device and personnel. In addition, after or at the same time when the location of the device is detected to be a preset location, the technical solution of this embodiment can also combine other user authority factors (such as the task performed, the verification time of the write authorization (the time to perform the task), etc.) to determine whether the write authorization is passed. In this way, it can ensure that the device is authorized to use the mobile storage device to upgrade the software of the device in a specific scenario at a specific location, so as to further improve the device security and personnel safety of the device software upgrade.

[0052] In one embodiment, the preset strategy includes, but is not limited to, a combination of one or more of the following: receiving a selection operation from a user to determine the selected firmware as a target upgrade object; The currently operated firmware is determined as a target upgrade object; The associated firmware that has an associated relationship with the currently operated firmware is determined as a target upgrade object.

[0053] In one embodiment, a user selection operation is received to determine the selected firmware as a target upgrade object. For example, the user selects a displayed firmware identifier on a human-computer interaction interface (or UI interface) to determine the target upgrade object.

[0054] In one implementation, the currently operating firmware is determined as the target upgrade object. For example, if the instrument panel of the device is currently operated, the instrument panel is determined as the target upgrade object.

[0055] In one implementation, the association relationship between a firmware and other firmware may be set based on actual needs, or may be automatically associated based on the sequential use records of multiple firmware within a time period.

[0056] In one embodiment, step S11: in response to the write authorization being passed, before determining the target upgrade object according to the preset strategy, may include: after detecting the external signal of the mobile storage device, performing read-only control on the external mobile storage device. In this way, the technical solution of this embodiment can prevent the firmware from being secretly tampered with or malicious software from invading after the mobile storage device is connected. Therefore, the technical solution of this embodiment can also ensure the security of the firmware upgrade process and effectively prevent unauthorized data from being written. Step S12: when determining the target upgrade package corresponding to the target upgrade object from the external mobile storage device, for the mobile storage device in a read-only control state, the write permission for writing the target upgrade package is opened.

[0057] In this way, the technical solution of this embodiment can grant limited write permissions to the mobile storage device, which can be limited to specific files and directories required for upgrading the target upgrade object in the mobile storage device, thereby ensuring that all operations are performed within the expected range and achieving the purpose of avoiding the implantation of malicious code.

[0058] Step S13: Perform software upgrade control according to the written target upgrade package.

[0059] In this way, the technical solution of this embodiment can perform a series of upgrade actions on the target upgrade object according to the written target upgrade package, so that the intelligent mechanical equipment can achieve a safe and controllable upgrade.

[0060] In one embodiment, the step of controlling the software upgrade according to the written target upgrade package further includes: after determining that the writing of the target upgrade package is completed, restoring the read-only control of the mobile storage device.

[0061] In one embodiment, a mobile storage device refers to a storage device that can be easily carried and is generally used to store and transmit data. The following are some examples of mobile storage device types: USB flash drive: This is the most common mobile storage device, which is small in size and connected to the computer via the USB interface; Mobile hard disk: It has a larger capacity than a USB flash drive, but is also relatively larger in size, and is usually connected via a USB interface; SD card (Secure Digital card): commonly used in digital cameras, mobile phones and other devices, and can be used as mobile storage through a card reader; microSD card: A smaller SD card, commonly used in smartphones and some portable devices; CF card (CompactFlash card): an older memory card format; SSD mobile hard drive: a mobile version of a solid-state drive, fast and durable, but relatively expensive; CDs, tapes, etc.

[0062] In one embodiment, the target upgrade package includes encrypted software data.

[0063] In one embodiment, firmware (or internal program) may be software embedded in the hardware of the device, which controls the basic functions and operations of the hardware. Firmware is the core software part of the device and needs to be updated regularly to fix vulnerabilities, add new features or improve performance. During the software upgrade control process, new software data will be written to the storage space of the device, replacing the original firmware version.

[0064] In one embodiment, the software data may be data used to update or iterate firmware.

[0065] In one embodiment, the encryption process can be any technical means that can protect the software data from unauthorized access or leakage during transmission. In addition, the encryption process can ensure the confidentiality, integrity and non-repudiation of the software data.

[0066] In one embodiment, the encryption processing may include: compressing the software data to obtain compressed software data and its corresponding hash summary; encrypting the compressed software data using a symmetric encryption algorithm to obtain a session key and its corresponding ciphertext; using a private key to digitally sign the session key and hash summary corresponding to the software data to generate digital signature data; using a public key to encapsulate the session key to obtain a key encapsulation; obtaining an upgrade package based on the ciphertext corresponding to the software data, the digital signature data and the key encapsulation.

[0067] In one implementation, compressing software data can reduce the time and resource consumption of subsequent encryption and transmission.

[0068] In one embodiment, the hash digest may be subsequently verified by the user for integrity.

[0069] In one embodiment, a symmetric encryption algorithm is an encryption method that uses a single key for encryption and decryption. Symmetric encryption algorithms include DES (Data Encryption Standard) algorithm, AES (Advanced Encryption Standard) algorithm, etc. AES algorithm has the advantages of high efficiency, security and reliability, and can be used to protect the confidentiality and integrity of software data.

[0070] In one embodiment, the core points of the AES algorithm may include: (1) Block encryption: The AES algorithm is a block encryption method that divides the plaintext into 128-bit data blocks (i.e. 16 bytes) and encrypts a group of data blocks at a time until the entire plaintext is encrypted.

[0071] (2) Key length: The AES algorithm supports key lengths of 128 bits, 192 bits, and 256 bits. These three key lengths provide different levels of security strength.

[0072] (3) Encryption process: The encryption process of the AES algorithm includes multiple rounds of iterations, each of which includes the following four steps: 3.1 Byte Replacement (SubBytes): Use S-Box to perform nonlinear replacement on each byte.

[0073] 3.2 ShiftRows: Circularly shift the rows of the state matrix to the left.

[0074] 3.3 Mix Columns: Perform a specific linear transformation on the columns of the state matrix.

[0075] 3.4 Add Round Key (AddRoundKey): XOR the round key with the state matrix.

[0076] (4) Key expansion: The key expansion algorithm of the AES algorithm expands the input key into multiple round keys. These round keys are used in subsequent encryption rounds to ensure that each round of encryption uses a different key, thereby enhancing the security of the algorithm.

[0077] (5) Security: The security of the AES algorithm is reflected in its key length, algorithm strength, randomness, and diffusibility. It can effectively resist differential cryptanalysis and other cryptanalysis attacks.

[0078] In one implementation, the digital signature data may be used to prove the source of the firmware package and ensure its integrity during transmission.

[0079] In one embodiment, the step of controlling the software upgrade according to the written target upgrade package includes: performing a decryption operation and / or digital verification to obtain software data; and upgrading the target upgrade object according to the software data.

[0080] In one embodiment, the step of performing a decryption operation and / or digital verification to obtain software data may include: using a public key to decrypt the key encapsulation of a written target upgrade package to obtain a session key; using digital signature data to digitally verify the target upgrade package; after the digital verification passes, using the session key to decrypt the target upgrade package to obtain the software data.

[0081] In this way, the technical solution of this embodiment can encrypt, decrypt and verify the data integrity of the transmitted software data, thereby ensuring the security and mixed integrity of the software data during transmission and storage, and preventing man-in-the-middle attacks, data tampering and unauthorized access.

[0082] In one embodiment, the target upgrade package is split into multiple data blocks for writing and / or software upgrade control.

[0083] In one implementation, the software upgrade method provided in this embodiment further includes: performing a write self-check, and when the write self-check result indicates a write interruption, determining a breakpoint data block corresponding to the write interruption, and performing write recovery control based on the breakpoint data block.

[0084] In one embodiment, when a power outage or loose connection occurs during data writing, making it impossible to continue writing, after power is restored or the connection is fixed, the write self-test result obtained by the device through a write self-test can characterize the write interruption. In this way, the technical method of the present application can determine the breakpoint data block corresponding to the write interruption, continue writing or rewriting the breakpoint data block, and continue writing subsequent data blocks of the breakpoint data block until it is determined that all data blocks corresponding to the target upgrade package have been written, so as to realize the point-to-point resume transmission function, thereby ensuring that problems that occur during the data writing process can be automatically recovered.

[0085] In one implementation, step S13: before performing software upgrade control according to the written target upgrade package, may include: backing up original software data of the target upgrade object to obtain redundant data.

[0086] In one implementation, the software upgrade method provided in this embodiment further includes: performing an upgrade self-check, and when the upgrade self-check result indicates an upgrade abnormality, performing recovery processing according to an abnormality recovery strategy. In this way, the technical solution of this embodiment has an upgrade self-check function and an abnormality recovery function, and can handle many common device abnormalities or failures without human intervention, so as to reduce downtime and operation and maintenance costs caused by abnormalities, and improve the reliability and availability of the equipment.

[0087] In one embodiment, the abnormal recovery strategy includes at least one of the following: When the upgrade self-check result indicates that there is damaged data in the process of software upgrade control, a target data block corresponding to the damaged data is determined from redundant data, and upgrade recovery is performed based on the target data block, wherein the redundant data includes software data corresponding to the stored target upgrade package and / or original software data backed up before performing software upgrade control; When the upgrade self-check result indicates that the upgrade recovery fails, the program is rolled back based on the original software data in the redundant data; When the upgrade self-test results indicate hardware abnormality, alarm control is triggered.

[0088] In one embodiment, when the upgrade self-check result indicates that damaged data exists in the process of software upgrade control, the target data block corresponding to the damaged data is determined from the redundant data, and upgrade recovery is performed based on the target data block. In this way, the technical solution of this embodiment can find the target data block to replace the data block corresponding to the damaged data from the redundant data (for example, the software data corresponding to the target upgrade package stored in the backup, and / or the original software data backed up before the software upgrade control is performed) when damaged data appears in the process of software upgrade control, so as to provide an upgrade recovery function that can quickly restore the software upgrade, thereby improving the efficiency and success rate of the software upgrade.

[0089] In one implementation, the redundant data may also include preset software data of a stable performance state.

[0090] In one embodiment, when the upgrade self-check result indicates that the upgrade recovery has failed, the program is rolled back based on the original software data in the redundant data. In this way, the technical solution of this embodiment can roll back the software data that has not been upgraded to the preset software data or original software data with a stable performance state after the upgrade recovery fails, so as to ensure that the functions of the device can be used normally, and further can realize the processing of many common device failures or anomalies without human intervention, thereby reducing downtime and operation and maintenance costs, and improving the reliability and availability of the device.

[0091] In one implementation, when the upgrade self-check result indicates that the hardware is abnormal, the alarm control triggered may include: displaying alarm information, requesting manual intervention, etc.

[0092] The software upgrade method provided by the present application also includes: after completing the software upgrade control or software recovery, performing a global firmware health check; and outputting the health check result. In this way, the health check result output by the technical solution of this embodiment can serve as a foundation for subsequent optimization of the upgrade recovery strategy or software upgrade strategy, so as to optimize the future software upgrade method.

[0093] In one embodiment, the software upgrade method provided by the present application further includes: recording the execution status of tasks related to software upgrade control in the device in a work log. In this way, the technical solution of this embodiment can provide a security monitoring function, so that real-time monitoring and problem review can be facilitated based on the work log.

[0094] The software upgrade method provided in this embodiment includes: step S11: in response to the passing of the write authorization, determining the target upgrade object according to the preset strategy; step S12: when determining the target upgrade package corresponding to the target upgrade object from the external mobile storage device, opening the write permission of writing the target upgrade package for the mobile storage device in the read-only control state; step S13: performing software upgrade control according to the written target upgrade package. In this way, the technical solution of this embodiment can perform write authorization verification on the external mobile storage device to realize the access supervision of the mobile storage device, and can perform read-only control on the mobile storage device when the write authorization is passed, so that when the target upgrade object (such as the firmware to be upgraded) is subsequently determined and the target upgrade package corresponding to the target upgrade object is determined from the external mobile storage device, only the write permission of writing the target upgrade package can be opened to ensure that all operations are performed within the expected range, so as to achieve the purpose of avoiding the implantation of malicious code. Therefore, the technical solution of this embodiment can provide a protection mechanism to ensure that the intelligent mechanical device can be upgraded safely and controllably.

[0095] Based on the same inventive concept of the software upgrade method provided in the above-mentioned embodiment, a software upgrade system is exemplified below for reference: The software upgrade system of this embodiment includes a hardware system and a software system; The hardware system includes: an interface module, a conversion module and a control module.

[0096] See also Figure 2 The control module, such as SOC (system-on-chip), is an integrated circuit that contains all components of a computer or other electronic system, usually including a processor core, memory, input / output ports, etc. It can be the main control unit of the system and is responsible for handling all computing tasks. During the upgrade process, the SOC will receive data from the USB interface and parse and process it.

[0097] See also Figure 2 The conversion module is, for example, a Uart / USB conversion IC (hardware device), which is used to convert the UART signal from the SOC into a USB signal so as to communicate with an external device through a USB interface.

[0098] See also Figure 2 The interface module is, for example, a USB interface, which serves as a physical connection point with the outside world. During the upgrade process, the USB interface receives the upgrade package sent by the U disk (i.e., a mobile storage device) and passes it to the SOC for processing.

[0099] See also Figure 2 ,The hardware system can also have SW modules for devices connected to the USB interface, which is responsible for managing the ,drivers and communications of the external devices.

[0100] Among them, see Figure 3 ,The software system can be deployed in the control module of the hardware system, including: encryption ,self-verification module, intelligent recovery module, dynamic permission control module, interface UI module, and ,security monitoring module.

[0101] The hardware system and the software system in the software upgrade system of this example work together to implement a firmware upgrade function for a device configured with the software upgrade system.

[0102] Among them, the permission control module can be used to respond to the approval of write authorization, determine the target firmware according to the preset strategy, and when determining the target upgrade package corresponding to the target firmware from the external U disk, open the write permission to write the target upgrade package for the U disk in the read-only control state.

[0103] Optionally, when the device is powered on and started, the dynamic permission module detects that a USB flash drive has been inserted and takes over the control authority of the USB flash drive. At the same time, a dialog box pops up in the interface UI module to remind the user that a USB flash drive has been inserted and asks whether to accept and upgrade the software. At the same time, the user is required to enter the key in the interface UI module, so that the write authorization is determined to be passed after the key verification is passed.

[0104] The dynamic permission module will assign temporary permissions to the USB flash drive based on the key, and will be granted limited write permissions, limited to specific files and directories required for the target firmware upgrade (corresponding to the target upgrade package). The security monitoring module monitors the entire writing process to ensure that all operations are performed within the expected range, and any abnormal behavior will trigger a security response.

[0105] See also Figure 4 The workflow of the dynamic permission module includes: determining whether the USB flash drive is inserted; if so, performing write authorization verification, and after determining that the write authorization is passed after the key is entered in the interface UI module, activating and monitoring the write permission; determining whether the upgrade is completed, and revoking the write permission after the upgrade is completed.

[0106] Optionally, the Dynamic Permissions module allows access rights to be dynamically assigned and managed based on user roles and context. In other words, a user's permissions can be dynamically adjusted based on factors such as the task they are performing, time and location. This mechanism improves security while maintaining flexibility because all possible access scenarios do not need to be defined in advance.

[0107] Optionally, the specific implementation process and logic ideas of the dynamic permission control mechanism in the dynamic permission module during the firmware upgrade process can be divided into the following steps: (1) Initialization phase Device boot: When the device boots, the secure bootloader confirms the integrity and authenticity of the firmware, ensuring that the device starts running from a trusted state.

[0108] (2) USB access and authentication USB access detection: When a USB flash drive is inserted into the device, the dynamic permission module sends an access signal to the USB flash drive. Write permission initialization: By default, the USB flash drive is read-only controlled so that the USB flash drive is in read-only mode, and any write operation will be rejected. Authentication (i.e., write authorization verification): The user needs to provide authentication information, such as a password, PIN code, or biometrics, to prove that they have the right to perform firmware upgrades.

[0109] (3) Upgrade preparation and authority allocation Permission request: Once the user's identity is verified, the dynamic permission module will request temporary write permission to the USB flash drive, but only for specific files and directories required for firmware upgrade. Permission approval: The permission management module in the secure environment approves this request based on predefined security policies and the current context (such as time, location, device status).

[0110] (4) Firmware upgrade execution Permission activation: After approval, the temporary write permission of the USB flash drive is activated, allowing data to be written to the files and directories involved in the firmware upgrade.

[0111] (5) Upgrade process monitoring: The collaborative security monitoring module monitors the entire writing or upgrading process to ensure that all operations are performed within the expected range and any abnormal behavior will trigger a security response.

[0112] (6) Upgrade completed or write completed and permission revoked Permission revocation: After data writing is completed or firmware upgrade is completed, the dynamic permission module immediately revokes the write permission of the USB flash drive and restores it to read-only status.

[0113] (7) Security check: Perform a final security check to ensure that the upgrade process does not introduce any malicious code or security vulnerabilities.

[0114] The encryption self-verification module may be used to perform a decryption operation and / or digital verification on the target upgrade package to obtain software data.

[0115] Optionally, the encryption self-verification module will encrypt / decrypt and digitally verify the target upgrade package written to the USB flash drive, including an AES encryption engine and RSA signature and verification, to verify the integrity and correctness of the firmware package before upgrading, including hash value verification and digital signature verification.

[0116] Among them, the core AES encryption algorithm is as follows: (1) Encryption preparation: Data grouping: Assume that the plaintext data is P, and its length is n bytes. If n is not a multiple of 16, padding is performed so that the padded data length n′ satisfies n′mod16=0. The padded data is divided into multiple 16-byte blocks P1, P2, …, Pn′ / 16.

[0117] Key expansion: The length of the original key K is k bits (k can be 128, 192, or 256). The key expansion algorithm generates a series of round keys RK1, RK2, …, RKr, where r is the number of rounds (for AES-128, r = 10; AES-192, r = 12; AES-256, r = 14).

[0118] (2) Encryption steps: For each data block Pi (i=1,2,…,n′ / 16), perform the following steps: Initial round key addition (AddRoundKey): B0=Pi⊕RK1. Where ⊕ represents the XOR operation, and B0 is the input of the first round of encryption.

[0119] Byte replacement (SubBytes): For each byte b in B0, use the S-box to replace it: b′=S[b]. Where S is the lookup table of the S-box.

[0120] ShiftRows: Assuming B1 is the replaced matrix (4x4), the row shift operation can be expressed as: B1′=ShiftRows(B1). Specifically, the second row is shifted left by 1 bit, the third row is shifted left by 2 bits, and the fourth row is shifted left by 3 bits.

[0121] Column confusion (MixColumns, except the last round): For each column c (assumed to be a column vector) of B1′, perform column confusion: c′=M·c. Where M is a fixed matrix defined on GF(2^8) and used to mix the bytes in the column. Note: In the last round of encryption, the column confusion step is usually omitted.

[0122] Repeat the round function: for j = 2 to r-1 (or r if the last round did not perform column mixing): Bj = SubBytes(ShiftRows(MixColumns(Bj-1⊕RKj))). Note: If j = r and the last round did not perform column mixing, then MixColumns is omitted.

[0123] Final round (maybe omitting column confusion): Br = SubBytes(ShiftRows(Br-1⊕RKr)).

[0124] Output the ciphertext of the data block: The final Br is the ciphertext Ci of the data block Pi. The ciphertexts C1, C2, ..., Cn' / 16 of all data blocks are connected to form the final ciphertext C of the software data.

[0125] The cryptographic self-verification module plays a vital role in the firmware upgrade process, ensuring the confidentiality, integrity and non-repudiation of data.

[0126] Among them, see Figure 5 The operation process of the upgrade package required for the firmware upgrade in advance can be as follows: (1) Preprocessing stage: First, the initial software data is read and hashed to reduce the time and resource consumption of subsequent encryption and transmission. A hash summary of the upgrade package corresponding to the software data is generated, for example, using the SHA-256 algorithm, which will be used for subsequent integrity verification.

[0127] (2) Encryption stage: Use a symmetric encryption algorithm, such as AES (Advanced Encryption Standard), to encrypt the initial software data and generate a random key (called a "session key"). The encrypted initial software data is called ciphertext, which will replace the initial software data for transmission and storage.

[0128] (3) Digital signature stage: The generated session key and the hash summary of the firmware package will be sent to the private key holder, usually the device manufacturer or maintenance team. The private key holder uses his own private key to perform RSA signing on the random key and hash summary to generate digital signature data. The purpose of the digital signature data is to prove the source of the initial software data and ensure its integrity during transmission.

[0129] (4) Key encapsulation phase: The random key itself also needs to be protected, so it will be encapsulated using public key encryption (such as RSA) to ensure that only the recipient with the corresponding public key can decrypt the random key.

[0130] (5) Packaging and transmission: The encrypted initial software data, digital signature data and key encapsulation data will be packaged together to form the final upgrade package. This upgrade package can be downloaded via the network or stored in a USB flash drive for distribution.

[0131] (6) Verification and decryption phase: When the upgrade package arrives at the target device, the device first uses the public key to decrypt the key package and obtain the random key. Then, it uses the received digital signature data and private key to verify the source and integrity. Finally, it uses the random key to decrypt the ciphertext to obtain the initial software data.

[0132] Through such a process, the security of the upgrade package during transmission and storage can be ensured, preventing man-in-the-middle attacks, data tampering and unauthorized access.

[0133] Among them, the intelligent recovery module is used to control the software upgrade according to the software data obtained by the encryption self-verification module processing the target upgrade package, and perform upgrade self-checking. When the upgrade self-checking result indicates an upgrade abnormality, recovery processing is performed according to the abnormal recovery strategy.

[0134] Optionally, after ensuring that the upgrade file is safe, correct, and from a reliable source, the intelligent recovery module will start transferring the upgrade file and upgrading the software, including a breakpoint resume mechanism and redundant data storage to ensure automatic recovery when problems occur during the upgrade process.

[0135] The breakpoint resume mechanism is designed to solve the problem of being unable to continue transmission due to power outage or looseness during transmission.

[0136] The redundant data storage design is to prevent errors in the new version of the software data and to roll back to the original version, thereby ensuring the minimum availability of the instrument system software.

[0137] The intelligent recovery module will first back up the original program to obtain redundant data as a recovery copy after an error occurs. To prevent power outages during transmission, the software data will be transmitted separately in the form of data blocks, and the data blocks will be verified during the transmission process. When the verification fails, the failed data block is recorded and the update will continue after power is restored. If the update still fails, the program will be rolled back and the first backup copy block will be retrieved and overwritten to ensure that the instrument system can be used. When the transmission is successful, the system program will be updated to achieve the upgrade of the software version.

[0138] The intelligent recovery module plays a key role in the operation and maintenance of the device, especially in the face of hardware failure or data corruption. It can automatically detect the problem and take measures to restore the device to normal operation, or at least to a stable and operational state. Figure 6 ,The following is the basic implementation process of the intelligent recovery module: (1) Initialization phase: Before starting data writing or upgrading, the intelligent recovery module stores redundant copies to initialize the transmission or upgrade strategy, including breakpoint resume settings, redundant storage plan, and fault recovery strategy.

[0139] (2) Data writing or updating: The upgrade package is divided into multiple data blocks with block checksums. Write or install the data blocks one by one. Each data block is checked for integrity before and after writing or installing.

[0140] (3) Anomaly detection and response: If the block check result is abnormal, it can be determined that damaged data exists, and the intelligent recovery module will record breakpoints based on the damaged data.

[0141] In abnormal situations, the intelligent recovery module will try to use the main program copy block (data block) corresponding to the damaged data in the redundant copy for breakpoint resuming. If breakpoint resuming fails, the intelligent recovery module will record the fault and enter the fault recovery process.

[0142] (4) Fault recovery: Depending on the failure type and preset strategies, the intelligent recovery module attempts to roll back to the previous stable state or obtain recovery data from redundant copies.

[0143] If the failure is caused by a hardware problem, the intelligent recovery module can pause the recovery operation and trigger an alarm or request manual intervention.

[0144] (6) If the block verification results are normal and the upgrade package is written, the firmware is updated and the device performs a system refresh.

[0145] (7) System health check and optimization: After the recovery process is complete, the Smart Recovery module performs a comprehensive system health check to ensure that there are no remaining issues.

[0146] Based on the inspection results, the intelligent recovery module can output the inspection results to lay the foundation for subsequent optimization of upgrade recovery strategies or software upgrade strategies, so as to optimize future software upgrade methods.

[0147] Through the above method and logical flow, the intelligent recovery module can effectively handle various abnormal situations encountered during firmware upgrades or data transmission, ensuring data security and system stability.

[0148] Among them, the security monitoring module is used to record the execution status of tasks related to software upgrade control in this device in the work log.

[0149] In addition, the security monitoring module can log the processes of all other modules to obtain a work log, and display it in the interface UI module for users to monitor in real time and review after problems occur.

[0150] The software upgrade system in the above example not only improves the simplicity and security of the upgrade process, but also ensures the device's ability to recover when the upgrade fails through the intelligent recovery module. By selecting appropriate encryption algorithms, designing rigorous self-verification scripts, developing intelligent recovery logic, and implementing strict dynamic permission control, an innovative and reliable method is provided for software upgrades of devices configured with the above software upgrade system.

[0151] When the software upgrade system in this example is configured in mining equipment, it can provide strong support for the intelligentization and automation of mining production, greatly simplify the upgrade process, and reduce the possibility of human error. It improves the security of the upgrade process and prevents firmware tampering or malware intrusion. It ensures the stability of the equipment and can automatically recover even if the upgrade fails, reducing the need for professional maintenance.

[0152] The technical solution of this example not only ensures the security of the firmware upgrade process, but also effectively prevents unauthorized data writing; the use of encrypted self-verification methods ensures the security of the firmware upgrade package during transmission and storage, preventing man-in-the-middle attacks, data tampering and unauthorized access; the use of intelligent recovery methods can handle many common equipment failures without human intervention, thereby reducing downtime and operation and maintenance costs, and improving reliability and availability.

[0153] In addition, the technical solution of this example not only improves the simplicity and security of the upgrade process, but also ensures the device's recovery capability in the event of an upgrade failure through an intelligent recovery module. It also provides an innovative and reliable way to upgrade the device's software by selecting appropriate encryption algorithms, designing rigorous self-verification scripts, developing intelligent recovery logic, and implementing strict dynamic permission control.

[0154] Based on the same inventive concept as the above embodiments, the present application embodiment provides a computing device (eg, a control module in a device), such as Figure 7 As shown, the device includes: a processor 310 and a memory 311 storing a computer program; wherein, Figure 7 The processor 310 shown in the figure is not used to indicate that the number of the processor 310 is one, but is only used to indicate the positional relationship of the processor 310 relative to other devices. In actual applications, the number of the processor 310 may be one or more; similarly, Figure 7 The memory 311 shown in the figure has the same meaning, that is, it is only used to refer to the position relationship of the memory 311 relative to other devices. In practical applications, the number of memories 311 can be one or more. When the processor 310 runs the computer program, the software upgrade method applied to the above device is implemented.

[0155] The device may also include: at least one network interface 312. The various components in the device are coupled together via a bus system 313. It is understood that the bus system 313 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus system 313.

[0156] The memory 311 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 311 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.

[0157] The memory 311 in the embodiment of the present application is used to store various types of data to support the operation of the device. Examples of these data include: any computer program used to operate on the device, such as an operating system and an application program. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program may include various application programs for implementing various application services. Here, the program for implementing the software upgrade method of the embodiment of the present application may be included in the application program.

[0158] Based on the same inventive concept as the aforementioned embodiment, this embodiment further provides a mining device configured with the aforementioned computing device.

[0159] The mining equipment of this embodiment may include engineering machinery. Engineering machinery includes traditional engineering machinery vehicles, and also includes new energy vehicles used in the field of engineering machinery, such as new energy mixer trucks, new energy pump trucks, new energy excavators, etc. In addition, the engineering machinery vehicles of this embodiment also belong to intelligent networked vehicles. The engineering machinery vehicles include sensing / perception systems, communication systems, etc., and the vehicle operation data and vehicle surrounding environment information are collected through the sensing / perception systems in the vehicle, and the network connection with other vehicles and the cloud is realized through the communication system, and the collected vehicle operation data, vehicle surrounding environment information, etc. are shared to the cloud and other authorized vehicles to realize data sharing, remote analysis, intelligent driving and other operations.

[0160] Based on the same inventive concept as the above-mentioned embodiment, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. The computer-readable storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); it may also be various devices including one or any combination of the above-mentioned memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer-readable storage medium is executed by the processor, the above-mentioned software upgrade method is implemented. For the specific steps implemented when the computer program is executed by the processor, please refer to Figure 1 The description of the illustrated embodiment will not be repeated here.

[0161] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0162] In this document, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and may also include additional elements not expressly listed.

[0163] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A software upgrade method, characterized in that: include: In response to the write authorization being passed, determining a target upgrade object according to a preset strategy; When determining the target upgrade package corresponding to the target upgrade object from the external mobile storage device, opening the write permission for writing the target upgrade package to the mobile storage device in a read-only control state; Software upgrade control is performed according to the written target upgrade package.

2. The method according to claim 1, characterized in that The conditions for determining whether the write authorization is passed include at least one of the following: Perform identity authentication on the received user authentication information, and the identity authentication passes; The verification time of the detected write authorization is within the preset time range; It is detected that the device state of the device is the preset state; The device is detected as being in the preset position.

3. The method according to claim 1, characterized in that The preset strategy includes at least one of the following: receiving a selection operation of a user to determine the selected firmware as the target upgrade object; Determine the currently operated firmware as the target upgrade object; The associated firmware that has an associated relationship with the currently operated firmware is determined as the target upgrade object.

4. The method according to claim 1, characterized in that: The step of controlling the software upgrade according to the written target upgrade package further includes: After determining that the writing of the target upgrade package is completed, the read-only control of the mobile storage device is restored.

5. The method according to claim 1, characterized in that: The target upgrade package includes encrypted software data; The step of performing software upgrade control according to the written target upgrade package includes: Performing a decryption operation and / or digital verification to obtain the software data; The target upgrade object is upgraded according to the software data.

6. The method according to claim 5, characterized in that The step of performing a decryption operation and / or digital verification to obtain software data includes: Decrypt the key encapsulation of the written target upgrade package using the public key to obtain the session key; Digitally verify the target upgrade package using digital signature data; After the digital verification is passed, the target upgrade package is decrypted using the session key to obtain the software data.

7. The method according to claim 6, characterized in that The encryption process comprises: Compressing the software data to obtain compressed software data and its corresponding hash summary; Encrypt the compressed software data using a symmetric encryption algorithm to obtain a session key and its corresponding ciphertext; Use the private key to digitally sign the session key and hash summary corresponding to the software data to generate digital signature data; Encapsulating the session key using the public key to obtain a key encapsulation; Obtain the upgrade package based on the ciphertext, digital signature data and key packaging corresponding to the software data.

8. The method according to any one of claims 1 to 7, characterized in that: The target upgrade package is written and / or the software upgrade is controlled in the form of being split into multiple data blocks; The method further comprises: Performing a write self-check, and when the write self-check result indicates that the write is interrupted, determining a breakpoint data block corresponding to the write interruption, and performing write recovery control based on the breakpoint data block; and / or, Perform upgrade self-check, and when the upgrade self-check result indicates that the upgrade is abnormal, perform recovery processing according to the abnormal recovery strategy; wherein the abnormal recovery strategy includes at least one of the following: When the upgrade self-check result indicates that there is damaged data in the process of software upgrade control, a target data block corresponding to the damaged data is determined from redundant data, and upgrade recovery is performed based on the target data block, wherein the redundant data includes the stored software data corresponding to the target upgrade package and / or the original software data backed up before performing the software upgrade control; When the upgrade self-check result indicates that the upgrade recovery fails, performing a program rollback based on the original software data in the redundant data; When the upgrade self-check result indicates that the hardware is abnormal, an alarm control is triggered; The method further comprises: The execution status of tasks related to the software upgrade control in this device shall be recorded in the work log.

9. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the processor runs the computer program, the steps of the software upgrade method according to any one of claims 1 to 8 are implemented.

10. A mining equipment, characterized in that: A computing device as claimed in claim 9 is provided.