Nothing Special   »   [go: up one dir, main page]

CN113515747B - Equipment upgrading method, device, equipment and storage medium - Google Patents

Equipment upgrading method, device, equipment and storage medium Download PDF

Info

Publication number
CN113515747B
CN113515747B CN202110532698.1A CN202110532698A CN113515747B CN 113515747 B CN113515747 B CN 113515747B CN 202110532698 A CN202110532698 A CN 202110532698A CN 113515747 B CN113515747 B CN 113515747B
Authority
CN
China
Prior art keywords
file
hash value
interface
upgrade
firmware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110532698.1A
Other languages
Chinese (zh)
Other versions
CN113515747A (en
Inventor
邹正外
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Youhua Technology Co ltd
Original Assignee
Shenzhen Youhua Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Youhua Technology Co ltd filed Critical Shenzhen Youhua Technology Co ltd
Priority to CN202110532698.1A priority Critical patent/CN113515747B/en
Publication of CN113515747A publication Critical patent/CN113515747A/en
Application granted granted Critical
Publication of CN113515747B publication Critical patent/CN113515747B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/572Secure firmware programming, e.g. of basic input output system [BIOS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a device upgrading method, a device, equipment and a storage medium. Comprising the following steps: generating an original firmware file, and acquiring a password hash value, a check interface and a firmware acquisition interface according to the original firmware file; compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file; sequentially verifying the validity and the integrity of the upgrade file; if the validity verification and the integrity verification of the upgrade file pass, upgrading the equipment based on the upgrade file. According to the equipment upgrading method provided by the embodiment of the invention, the password hash value, the check value, the checking interface and the firmware obtaining interface are compiled to obtain the upgrading file, and the legitimacy and the integrity of the upgrading file are verified in sequence, so that the smooth upgrading of the embedded equipment can be ensured, and the reliability of equipment upgrading is improved.

Description

Equipment upgrading method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for upgrading equipment.
Background
The embedded device upgrade requires the use of an upgrade firmware package. In the upgrading process, the problem that equipment cannot work normally after upgrading due to incomplete obtained upgrading package, non-corresponding version, tampered upgrading package and the like may exist. There is also a problem of upgrading the unofficial release version.
Disclosure of Invention
The embodiment of the invention provides a device upgrading method, a device, equipment and a storage medium, which are used for ensuring the smooth upgrading of embedded equipment and improving the reliability of equipment upgrading.
In a first aspect, an embodiment of the present invention provides an apparatus upgrade method, including:
generating an original firmware file, and acquiring a password hash value, a check interface and a firmware acquisition interface according to the original firmware file;
compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file;
sequentially verifying the validity and the integrity of the upgrade file;
if the validity verification and the integrity verification of the upgrade file pass, upgrading the equipment based on the upgrade file.
Further, obtaining a check value according to the original firmware file includes:
splicing the password hash value with the custom character string to obtain a spliced character string;
and encrypting the spliced character strings by adopting a set encryption algorithm according to the set secret key to obtain a check value.
Further, obtaining a verification interface according to the original firmware file includes:
acquiring environment parameters required by the original firmware file;
the environmental parameters are packaged as a verification interface.
Further, acquiring a firmware acquisition interface according to the original firmware file includes:
dividing the original firmware file into a plurality of content fragments according to a set rule;
the plurality of content segments are packaged as a firmware acquisition interface.
Further, verifying the validity of the upgrade file includes:
loading the upgrade file, and if the upgrade file is loaded successfully, acquiring a password hash value and a check value in the upgrade file;
decrypting the check value by adopting a set decryption algorithm according to the set secret key to obtain a decrypted hash value;
and comparing the password hash value with the decryption hash value, and if the password hash value is matched with the decryption hash value, passing the validity verification of the upgrade file.
Further, after verifying the validity of the upgrade file, the method further includes:
invoking the checking interface to obtain the environment parameters required by the original firmware file;
and comparing the environment parameters required by the original firmware file with the environment parameters of the current equipment, and if the environment parameters are matched with the environment parameters of the current equipment, supporting the upgrade file by the equipment.
Further, verifying the integrity of the upgrade file includes:
invoking the firmware acquisition interface to obtain a plurality of content segments;
splicing the content fragments according to the set rule, and calculating a verification hash value according to the spliced file;
and comparing the password hash value with the verification hash value, and if the password hash value is matched with the verification hash value, verifying the integrity of the upgrade file.
In a second aspect, an embodiment of the present invention further provides an apparatus upgrade device, including:
the parameter acquisition module is used for generating an original firmware file, and acquiring a password hash value, a check interface and a firmware acquisition interface according to the original firmware file;
the upgrade file acquisition module is used for compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file;
the verification module is used for verifying the validity and the integrity of the upgrade file in sequence;
and the upgrading module is used for upgrading the equipment based on the upgrading file if the validity verification and the integrity verification of the upgrading file are passed.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, including: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which processor implements the device upgrade method according to the embodiments of the present invention when executing the program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processing apparatus implements a device upgrade method according to an embodiment of the present invention.
The embodiment of the invention discloses a device upgrading method, a device, equipment and a storage medium. Generating an original firmware file, and acquiring a password hash value, a check interface and a firmware acquisition interface according to the original firmware file; compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file; sequentially verifying the validity and the integrity of the upgrade file; if the validity verification and the integrity verification of the upgrade file are passed, upgrading the equipment based on the upgrade file. According to the equipment upgrading method provided by the embodiment of the invention, the password hash value, the check value, the checking interface and the firmware obtaining interface are compiled to obtain the upgrading file, and the legitimacy and the integrity of the upgrading file are verified in sequence, so that the smooth upgrading of the embedded equipment can be ensured, and the reliability of equipment upgrading is improved.
Drawings
FIG. 1 is a flow chart of a method for upgrading a device according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus upgrade device according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a device upgrade method according to an embodiment of the present invention, where the method may be applied to upgrade an embedded device, and the method may be performed by a device upgrade apparatus, as shown in fig. 1, and specifically includes the following steps:
step 110, an original firmware file is generated, and a password hash value, a check interface and a firmware acquisition interface are acquired according to the original firmware file.
The cryptographic hash value may be a value calculated using a set cryptographic hash function, for example, a value calculated using an MD5 Message-Digest Algorithm function (MD 5 value). The original firmware file may include write address information, configuration information, a kernel file, and the like. In this embodiment, the manner of generating the original firmware file may be: and compiling by adopting a set compiling tool to obtain an original firmware file.
In this embodiment, the original firmware file may be a string of binary numbers, and the manner of obtaining the cryptographic hash value according to the original firmware file may be that a set cryptographic triple-column function is called to calculate the string of binary numbers, so as to obtain the cryptographic hash value.
Specifically, the method for obtaining the check value according to the original firmware file may be: splicing the password hash value with the custom character string to obtain a spliced character string; and encrypting the spliced character strings by adopting a set encryption algorithm according to the set secret key to obtain a check value.
The set encryption algorithm may be a stream encryption algorithm, such as an RC4 (Rivest Cipher 4) encryption algorithm.
Specifically, the process of obtaining the verification interface according to the original firmware file may be: acquiring environment parameters required by an original firmware file; the environmental parameters are packaged as a verification interface.
Wherein the environmental parameters may be sets of environmental parameters.
Specifically, the method for acquiring the firmware acquisition interface according to the original firmware file may be: dividing an original firmware file into a plurality of content fragments according to a set rule; the plurality of content segments are packaged as a firmware acquisition interface.
The setting rule may be a rule for splitting the original firmware file, for example: the order of the original firmware files may be shuffled according to a certain rule.
And 120, compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file.
Specifically, compiling the password hash value, the check interface and the firmware acquisition interface according to a set mode to obtain an upgrade file. After the upgrade file is obtained, naming the upgrade file according to a set naming rule.
And 130, sequentially verifying the validity and the integrity of the upgrade file.
Specifically, the process of verifying the validity of the upgrade file may be: loading the upgrade file, and if the upgrade file is loaded successfully, acquiring a password hash value and a check value in the upgrade file; decrypting the check value by adopting a set decryption algorithm according to the set secret key to obtain a decrypted hash value; and comparing the password hash value with the decryption hash value, and if the password hash value is matched with the decryption hash value, passing the validity verification of the upgrade file.
Wherein the decrypted hash value may be a decrypted MD5 value.
In this embodiment, after verifying the validity of the upgrade file, the method further includes the following steps: calling a checking interface to obtain environment parameters required by an original firmware file; and comparing the environment parameters required by the original firmware file with the environment parameters of the current equipment, and if the environment parameters are matched with the environment parameters of the current equipment, supporting the upgrade file by the equipment.
And 140, if the validity verification and the integrity verification of the upgrade file are passed, upgrading the equipment based on the upgrade file.
Specifically, the method for verifying the integrity of the upgrade file may be: calling a firmware acquisition interface to acquire a plurality of content fragments; splicing the content fragments according to a set rule, and calculating a verification hash value according to the spliced file; and comparing the password hash value with the verification hash value, and if the password hash value is matched with the verification hash value, verifying the integrity of the upgrade file.
Wherein the verification hash value may be a verification MD5 value.
According to the technical scheme of the embodiment, an original firmware file is generated, and a password hash value, a check interface and a firmware acquisition interface are acquired according to the original firmware file; compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file; sequentially verifying the validity and the integrity of the upgrade file; if the validity verification and the integrity verification of the upgrade file are passed, upgrading the equipment based on the upgrade file. According to the equipment upgrading method provided by the embodiment of the invention, the password hash value, the check value, the checking interface and the firmware obtaining interface are compiled to obtain the upgrading file, and the legitimacy and the integrity of the upgrading file are verified in sequence, so that the smooth upgrading of the embedded equipment can be ensured, and the reliability of equipment upgrading is improved.
The device upgrading method in the embodiment includes two stages, wherein the first stage is a stage of acquiring an upgrade file, and the second stage is a device upgrading stage.
The file upgrading stage comprises the following steps:
and S1, generating an original firmware file.
And S2, calculating an MD5 value of the original firmware file.
And step S3, calculating a check value by using an RC4 encryption algorithm according to the MD5 value of the file, the custom spliced character string and the set key.
And S4, dividing the file content into a plurality of fragments according to a custom rule.
And S5, listing the firmware installation requirement to the environment parameters, and packaging the environment parameters as a checking interface.
And S6, packaging the file content fragments into a firmware acquisition interface.
And S7, compiling the MD5 value, the check value, the checking interface and the firmware acquisition interface into an upgrade file.
And S8, modifying the file name of the upgrade file according to the firmware naming rule, and publishing the upgrade file to the outside.
The equipment upgrading stage comprises the following steps:
and step S1, starting an equipment upgrading process.
And S2, dynamically loading the upgrade file, exiting the upgrade if the loading fails, and entering the following steps if the loading fails.
And step S3, acquiring a check value and an MD5 value, if the acquisition fails, exiting the upgrade, and if the upgrade is successful, entering the following steps.
And S4, decrypting the check value by adopting a set decryption algorithm according to the set secret key to obtain a decryption hash value, verifying whether the upgrade file is legal or not according to the decryption hash value, exiting the upgrade if the file is illegal, and entering the following steps if the upgrade file is legal.
And S5, calling a checking interface in the upgrade file, checking whether the environment parameters of the current equipment support the upgrade file, and if not, exiting the upgrade, otherwise, entering the following steps.
And S6, calling a firmware acquisition interface in the upgrade file to splice the plurality of content fragments to generate an original firmware file.
And S7, checking and generating the integrity of the original firmware file. If the file is incomplete, the upgrade is exited. The file is complete and proceeds to the following steps.
And S8, upgrading the equipment by using the upgrade file.
Example two
Fig. 2 is a schematic structural diagram of an apparatus upgrade device according to a second embodiment of the present invention. As shown in fig. 2, the apparatus includes:
the parameter obtaining module 210 is configured to generate an original firmware file, and obtain a password hash value, a check interface and a firmware obtaining interface according to the original firmware file;
the upgrade file obtaining module 220 is configured to compile the cryptographic hash value, the check value, the inspection interface and the firmware obtaining interface to obtain an upgrade file;
the verification module 230 is configured to sequentially verify validity and integrity of the upgrade file;
and the upgrade module 240 is configured to upgrade the device based on the upgrade file if the validity verification and the integrity verification of the upgrade file are both passed.
Optionally, the parameter obtaining module 210 is further configured to:
splicing the password hash value with the custom character string to obtain a spliced character string;
and encrypting the spliced character strings by adopting a set encryption algorithm according to the set secret key to obtain a check value.
Optionally, the parameter obtaining module 210 is further configured to:
acquiring environment parameters required by an original firmware file;
the environmental parameters are packaged as a verification interface.
Optionally, the parameter obtaining module 210 is further configured to:
dividing an original firmware file into a plurality of content fragments according to a set rule;
the plurality of content segments are packaged as a firmware acquisition interface.
Optionally, the verification module 230 is further configured to:
loading the upgrade file, and if the upgrade file is loaded successfully, acquiring a password hash value and a check value in the upgrade file;
decrypting the check value by adopting a set decryption algorithm according to the set secret key to obtain a decrypted hash value;
and comparing the password hash value with the decryption hash value, and if the password hash value is matched with the decryption hash value, passing the validity verification of the upgrade file.
Optionally, the method further comprises: environmental parameter comparison module for:
calling a checking interface to obtain environment parameters required by an original firmware file;
and comparing the environment parameters required by the original firmware file with the environment parameters of the current equipment, and if the environment parameters are matched with the environment parameters of the current equipment, supporting the upgrade file by the equipment.
Optionally, the verification module 230 is further configured to:
calling a firmware acquisition interface to acquire a plurality of content fragments;
splicing the content fragments according to a set rule, and calculating a verification hash value according to the spliced file;
and comparing the password hash value with the verification hash value, and if the password hash value is matched with the verification hash value, verifying the integrity of the upgrade file.
The device can execute the method provided by all the embodiments of the invention, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the invention.
Example III
Fig. 3 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 3 illustrates a block diagram of a computer device 312 suitable for use in implementing embodiments of the present invention. The computer device 312 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention. Device 312 is a computing device with typical device upgrade functionality.
As shown in FIG. 3, computer device 312 is in the form of a general purpose computing device. Components of computer device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 that connects the different system components (including the storage device 328 and the processor 316).
Bus 318 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry standard architecture (Industry Standard Architecture, ISA) bus, micro channel architecture (Micro Channel Architecture, MCA) bus, enhanced ISA bus, video electronics standards association (Video Electronics Standards Association, VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnect, PCI) bus.
Computer device 312 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 312 and includes both volatile and nonvolatile media, removable and non-removable media.
The storage 328 may include computer system-readable media in the form of volatile memory, such as random access memory (Random Access Memory, RAM) 330 and/or cache memory 332. The computer device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 334 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 3, commonly referred to as a "hard disk drive"). Although not shown in fig. 3, a disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from and writing to a removable nonvolatile optical disk (e.g., a Compact Disc-Read Only Memory (CD-ROM), digital versatile Disc (Digital Video Disc-Read Only Memory, DVD-ROM), or other optical media), may be provided. In such cases, each drive may be coupled to bus 318 through one or more data medium interfaces. Storage 328 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
Programs 336 having a set (at least one) of program modules 326 may be stored, for example, in storage 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 326 generally perform the functions and/or methods in the described embodiments of the invention.
The computer device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), one or more devices that enable a user to interact with the computer device 312, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 312 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 322. Moreover, the computer device 312 may also communicate with one or more networks such as a local area network (Local Area Network, LAN), a wide area network Wide Area Network, a WAN) and/or a public network such as the internet via the network adapter 320. As shown, network adapter 320 communicates with other modules of computer device 312 via bus 318. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with computer device 312, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk array (Redundant Arrays of Independent Disks, RAID) systems, tape drives, data backup storage systems, and the like.
The processor 316 executes various functional applications and data processing by running programs stored in the storage 328, for example, to implement the device upgrade method provided by the above-described embodiments of the present invention.
Example IV
The embodiment of the invention provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the program is executed by a processing device, the method for upgrading equipment is realized. The computer readable medium of the present invention described above may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: generating an original firmware file, and acquiring a password hash value, a check interface and a firmware acquisition interface according to the original firmware file; compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file; sequentially verifying the validity and the integrity of the upgrade file; if the validity verification and the integrity verification of the upgrade file pass, upgrading the equipment based on the upgrade file.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (7)

1. A method of upgrading a device, comprising:
generating an original firmware file, and acquiring a password hash value, a check interface and a firmware acquisition interface according to the original firmware file;
compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file;
sequentially verifying the validity and the integrity of the upgrade file;
if the validity verification and the integrity verification of the upgrade file pass, upgrading the equipment based on the upgrade file;
obtaining a check value according to the original firmware file, including:
splicing the password hash value with the custom character string to obtain a spliced character string;
encrypting the spliced character strings by adopting a set encryption algorithm according to a set secret key to obtain a check value;
the obtaining the checking interface according to the original firmware file comprises the following steps:
acquiring environment parameters required by the original firmware file;
packaging the environmental parameters as a test interface;
the obtaining the firmware obtaining interface according to the original firmware file includes:
dividing the original firmware file into a plurality of content fragments according to a set rule;
the plurality of content segments are packaged as a firmware acquisition interface.
2. The method of claim 1, wherein verifying the legitimacy of the upgrade file comprises:
loading the upgrade file, and if the upgrade file is loaded successfully, acquiring a password hash value and a check value in the upgrade file;
decrypting the check value by adopting a set decryption algorithm according to the set secret key to obtain a decrypted hash value;
and comparing the password hash value with the decryption hash value, and if the password hash value is matched with the decryption hash value, passing the validity verification of the upgrade file.
3. The method of claim 1, further comprising, after verifying the legitimacy of the upgrade file:
invoking the checking interface to obtain the environment parameters required by the original firmware file;
and comparing the environment parameters required by the original firmware file with the environment parameters of the current equipment, and if the environment parameters are matched with the environment parameters of the current equipment, supporting the upgrade file by the equipment.
4. The method of claim 1, wherein verifying the integrity of the upgrade file comprises:
invoking the firmware acquisition interface to obtain a plurality of content segments;
splicing the content fragments according to the set rule, and calculating a verification hash value according to the spliced file;
and comparing the password hash value with the verification hash value, and if the password hash value is matched with the verification hash value, verifying the integrity of the upgrade file.
5. An apparatus upgrade device, comprising:
the parameter acquisition module is used for generating an original firmware file, and acquiring a password hash value, a check interface and a firmware acquisition interface according to the original firmware file;
the upgrade file acquisition module is used for compiling the password hash value, the check interface and the firmware acquisition interface to obtain an upgrade file;
the verification module is used for verifying the validity and the integrity of the upgrade file in sequence;
the upgrading module is used for upgrading the equipment based on the upgrading file if the validity verification and the integrity verification of the upgrading file are both passed;
the parameter obtaining module is further configured to:
splicing the password hash value with the custom character string to obtain a spliced character string;
encrypting the spliced character strings by adopting a set encryption algorithm according to the set secret key to obtain a check value;
the parameter obtaining module is further configured to:
acquiring environment parameters required by the original firmware file;
packaging the environmental parameters as a test interface;
the parameter obtaining module is further configured to:
dividing the original firmware file into a plurality of content fragments according to a set rule;
the plurality of content segments are packaged as a firmware acquisition interface.
6. A computer device, comprising: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the device upgrade method according to any of claims 1-4 when said program is executed.
7. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processing device, implements the device upgrade method according to any one of claims 1-4.
CN202110532698.1A 2021-05-17 2021-05-17 Equipment upgrading method, device, equipment and storage medium Active CN113515747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110532698.1A CN113515747B (en) 2021-05-17 2021-05-17 Equipment upgrading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110532698.1A CN113515747B (en) 2021-05-17 2021-05-17 Equipment upgrading method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113515747A CN113515747A (en) 2021-10-19
CN113515747B true CN113515747B (en) 2024-02-09

Family

ID=78064437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110532698.1A Active CN113515747B (en) 2021-05-17 2021-05-17 Equipment upgrading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113515747B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117170722B (en) * 2023-11-02 2024-03-22 广州三晶电气股份有限公司 Address discontinuity firmware upgrading method, device and system

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436141A (en) * 2008-11-21 2009-05-20 深圳创维数字技术股份有限公司 Firmware upgrading and encapsulating method and device based on digital signing
CN101557308A (en) * 2009-05-06 2009-10-14 成都市华为赛门铁克科技有限公司 File upgrading method and terminal device
CN104732138A (en) * 2014-12-31 2015-06-24 深圳市元征科技股份有限公司 Diagnostic equipment upgrading method and diagnostic equipment
CN105302603A (en) * 2015-10-26 2016-02-03 广州视睿电子科技有限公司 Software upgrading method and device
CN107291497A (en) * 2017-06-08 2017-10-24 Tcl通力电子(惠州)有限公司 Multi-firmware upgrading method and system and readable storage medium
CN107577474A (en) * 2017-09-12 2018-01-12 青岛海信电器股份有限公司 The processing method and processing device of upgrade file, electronic equipment
CN109214168A (en) * 2018-08-27 2019-01-15 阿里巴巴集团控股有限公司 Firmware upgrade method and device
CN109582325A (en) * 2017-09-28 2019-04-05 深圳市优必选科技有限公司 Robot software upgrading method, robot and computer readable storage medium
CN110532735A (en) * 2018-05-23 2019-12-03 霍尼韦尔环境自控产品(天津)有限公司 Firmware upgrade method
CN111279310A (en) * 2017-10-24 2020-06-12 华为国际有限公司 Vehicle-mounted equipment upgrading method and related equipment
CN111880826A (en) * 2020-07-28 2020-11-03 平安科技(深圳)有限公司 Cloud service application upgrading method and device, electronic equipment and storage medium
CN112379901A (en) * 2020-11-04 2021-02-19 深圳市科信通信技术股份有限公司 Singlechip firmware upgrading method and device, computer equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436141A (en) * 2008-11-21 2009-05-20 深圳创维数字技术股份有限公司 Firmware upgrading and encapsulating method and device based on digital signing
CN101557308A (en) * 2009-05-06 2009-10-14 成都市华为赛门铁克科技有限公司 File upgrading method and terminal device
CN104732138A (en) * 2014-12-31 2015-06-24 深圳市元征科技股份有限公司 Diagnostic equipment upgrading method and diagnostic equipment
CN105302603A (en) * 2015-10-26 2016-02-03 广州视睿电子科技有限公司 Software upgrading method and device
CN107291497A (en) * 2017-06-08 2017-10-24 Tcl通力电子(惠州)有限公司 Multi-firmware upgrading method and system and readable storage medium
CN107577474A (en) * 2017-09-12 2018-01-12 青岛海信电器股份有限公司 The processing method and processing device of upgrade file, electronic equipment
CN109582325A (en) * 2017-09-28 2019-04-05 深圳市优必选科技有限公司 Robot software upgrading method, robot and computer readable storage medium
CN111279310A (en) * 2017-10-24 2020-06-12 华为国际有限公司 Vehicle-mounted equipment upgrading method and related equipment
CN110532735A (en) * 2018-05-23 2019-12-03 霍尼韦尔环境自控产品(天津)有限公司 Firmware upgrade method
CN109214168A (en) * 2018-08-27 2019-01-15 阿里巴巴集团控股有限公司 Firmware upgrade method and device
CN111880826A (en) * 2020-07-28 2020-11-03 平安科技(深圳)有限公司 Cloud service application upgrading method and device, electronic equipment and storage medium
CN112379901A (en) * 2020-11-04 2021-02-19 深圳市科信通信技术股份有限公司 Singlechip firmware upgrading method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113515747A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
US8799662B2 (en) Method and apparatus for validating the integrity of installer files prior to installation
US8874922B2 (en) Systems and methods for multi-layered authentication/verification of trusted platform updates
US20130031371A1 (en) Software Run-Time Provenance
US11829479B2 (en) Firmware security verification method and device
US20240086553A1 (en) Software pipeline and release validation
US9733927B2 (en) Detection of software or hardware incompatibilities in software packages
US20140358995A1 (en) Providing access to a resource for a computer from within a restricted network
US9160542B2 (en) Authorizing use of a test key signed build
CN111291339A (en) Processing method, device and equipment of block chain data and storage medium
US7353386B2 (en) Method and device for authenticating digital data by means of an authentication extension module
US20180225470A1 (en) Source authentication of a software product
JP2017146967A (en) Method and system for improving loading speed of intermediate language file
CN113515747B (en) Equipment upgrading method, device, equipment and storage medium
CN111488169A (en) Method and device for hot updating of application program, storage medium and electronic equipment
US7565544B1 (en) Systems and methods for verifying the trustworthiness of a file comprising computer instructions
CN112463184A (en) Method and system for safely upgrading firmware of baseboard management controller
CN112416395A (en) Hot repair updating method and device
CN112883397B (en) Data storage method, data reading method, device, equipment and storage medium
CN111984963B (en) Method and apparatus for bypassing self-signed certificate verification
CN115238249A (en) Application code obfuscation method, apparatus, device and medium
CN113139197B (en) Project label checking method and device and electronic equipment
CN111949738A (en) Block chain-based data storage deduplication method, terminal device and storage medium
CN113407434B (en) Method and device for processing debug file
KR101745821B1 (en) Method and system for secure booting
US12088731B2 (en) Program signing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant