CN113010201A - Firmware file identification method, firmware upgrade pairing method and device - Google Patents
Firmware file identification method, firmware upgrade pairing method and device Download PDFInfo
- Publication number
- CN113010201A CN113010201A CN202110316728.5A CN202110316728A CN113010201A CN 113010201 A CN113010201 A CN 113010201A CN 202110316728 A CN202110316728 A CN 202110316728A CN 113010201 A CN113010201 A CN 113010201A
- Authority
- CN
- China
- Prior art keywords
- firmware file
- target
- information sequence
- firmware
- upgraded
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 100
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005336 cracking Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2107—File encryption
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a firmware file identification method, a firmware upgrade pairing method and a firmware upgrade pairing device, which comprise the following steps: acquiring equipment information of the terminal equipment to be upgraded, and determining the storage position of a target firmware file according to name information in the equipment information; reading a target firmware file of the storage position, and traversing the target firmware file to determine a target information sequence in the target firmware file; and if the target information sequence is matched with the equipment information, determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded. The method for identifying the firmware file can identify and obtain the accurate firmware file for upgrading the terminal equipment to be upgraded, and improves the safety factor of firmware file identification.
Description
Technical Field
The invention relates to the technical field of firmware upgrading, in particular to a firmware file identification method, a firmware upgrading pairing method and a firmware upgrading pairing device.
Background
The firmware update of the existing hardware terminal equipment is basically carried out on site by adopting a special downloader, or carried out on-line by transmitting data by a remote server. There is a need in an upgrade system to identify firmware files for performing an upgrade.
The traditional file identification method is to directly identify the name of a file, but the name of the file has various uncertain factors such as wrong writing of the file name format, difference of the file name formats of different manufacturers, even malicious modification and damage, and the like, so that the upgrading and updating safety of firmware is poor, especially for distributed intelligent electronic devices with remote communication functions, the file can be installed at unattended remote positions (such as mountainous areas or mountaintops, and the like), when the batch upgrading is wrong, disastrous results can be caused, and a large amount of manpower and material resources are needed to support to recover the loss in the later period.
In summary, the existing method for determining the firmware file for upgrading by identifying the file name has the technical problem of poor security.
Disclosure of Invention
In view of the above, the present invention provides a firmware file identification method, a firmware upgrade pairing method and a firmware upgrade pairing device, so as to alleviate the technical problem that the existing method for determining a firmware file for upgrading by identifying a file name is poor in security.
In a first aspect, an embodiment of the present invention provides a firmware file identification method, which is applied to a cloud platform or a dedicated upgrade server, where the cloud platform or the dedicated upgrade server is configured to manage a firmware file with an information sequence, where the firmware file is obtained by compiling a native compiler of each terminal device, and the method includes:
acquiring equipment information of terminal equipment to be upgraded, and determining a storage position of a target firmware file according to name information in the equipment information;
reading the target firmware file of the storage position, and traversing the target firmware file to determine a target information sequence in the target firmware file;
and if the target information sequence is matched with the equipment information, determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded.
Further, the firmware file with the information sequence comprises a firmware file in a binary format.
Further, the information sequence at least comprises: the software generates date, version information, manufacturer information and name information.
Further, after determining that the target firmware file is a firmware file for upgrading the terminal device to be upgraded, the method further includes:
acquiring the target information sequence;
encrypting the target information sequence to obtain an encrypted target information sequence;
and sending the encrypted target information sequence to the terminal equipment to be upgraded so that the terminal equipment to be upgraded decrypts the encrypted target information sequence, and determines whether the decrypted target information sequence is matched with the information sequence of the terminal equipment to be upgraded so as to determine whether to upgrade.
In a second aspect, an embodiment of the present invention further provides a firmware upgrade pairing method, which is applied to a terminal device to be upgraded, and the method includes:
acquiring an encrypted target information sequence sent by a cloud platform or a special upgrading server, wherein the target information sequence is an information sequence in a target firmware file determined by the cloud platform or the special upgrading server according to the firmware file identification method of any one of the first aspect;
decrypting the encrypted target information sequence to obtain a decrypted target information sequence;
determining whether the decrypted target information sequence is matched with the information sequence of the target information sequence;
and if so, acquiring a target firmware file sent by the cloud platform or the special upgrading server, and upgrading according to the target firmware file.
Further, decrypting the encrypted target information sequence includes:
and decrypting the encrypted target information sequence through a secret key to obtain a decrypted target information sequence.
In a third aspect, an embodiment of the present invention further provides an apparatus for identifying a firmware file, where the apparatus is applied to a cloud platform or a dedicated upgrade server, where the cloud platform or the dedicated upgrade server is configured to manage a firmware file with an information sequence and obtained by compiling a native compiler of each terminal device, and the apparatus includes:
the device comprises an acquisition and determination unit, a storage unit and a processing unit, wherein the acquisition and determination unit is used for acquiring the device information of the terminal device to be upgraded and determining the storage position of a target firmware file according to name information in the device information;
the reading and determining unit is used for reading the target firmware file of the storage position and traversing the target firmware file to determine a target information sequence in the target firmware file;
and the first determining unit is used for determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded if the target information sequence is matched with the equipment information.
In a fourth aspect, an embodiment of the present invention further provides a pairing device for firmware upgrade, which is applied to a terminal device to be upgraded, and the device includes:
an obtaining unit, configured to obtain an encrypted target information sequence sent by a cloud platform or a dedicated upgrade server, where the target information sequence is an information sequence in a target firmware file determined by the cloud platform or the dedicated upgrade server according to the firmware file identification method in any one of the first aspects;
the decryption unit is used for decrypting the encrypted target information sequence to obtain a decrypted target information sequence;
a second determining unit, configured to determine whether the decrypted target information sequence matches an information sequence of the second determining unit;
and the upgrading unit is used for acquiring a target firmware file sent by the cloud platform or the special upgrading server and upgrading according to the target firmware file if the target firmware file is matched with the target firmware file.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method for identifying a firmware file according to any one of the above first aspects or implements the steps of the method for pairing a firmware upgrade according to any one of the above second aspects when executing the computer program.
In a sixth aspect, embodiments of the present invention further provide a computer-readable storage medium storing machine executable instructions, which when invoked and executed by a processor, cause the processor to execute the method for identifying a firmware file according to any one of the first aspect or the method for pairing a firmware upgrade according to any one of the second aspect.
In an embodiment of the present invention, a firmware file identification method is provided, which is applied to a cloud platform or a dedicated upgrade server, where the cloud platform or the dedicated upgrade server is used to manage a firmware file with an information sequence, which is obtained by compiling a native compiler of each terminal device, and the method includes: acquiring equipment information of the terminal equipment to be upgraded, and determining the storage position of a target firmware file according to name information in the equipment information; reading a target firmware file of the storage position, and traversing the target firmware file to determine a target information sequence in the target firmware file; and if the target information sequence is matched with the equipment information, determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded. According to the above description, in the method for identifying the firmware file of the present invention, the target firmware file is determined according to the name information of the terminal device to be upgraded, and then it is further determined whether the target information sequence in the target firmware file matches with the device information of the terminal device to be upgraded, so as to determine to obtain the firmware file for upgrading the terminal device to be upgraded.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a firmware file identification method according to an embodiment of the present invention;
fig. 2 is a flowchart of a pairing method for firmware upgrade according to an embodiment of the present invention;
FIG. 3 is a flowchart of another firmware upgrade pairing method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an apparatus for identifying a firmware file according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a pairing device for firmware upgrade according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The traditional firmware file identification method is to directly identify the name of the firmware file, but the name of the firmware file has various uncertain factors such as wrong writing of a file name format, difference of file name formats of different manufacturers, even malicious modification and damage, and the like, so that the upgrading and updating safety of the firmware is poor.
Based on this, the embodiment of the present invention provides a method for identifying a firmware file, where the method determines to obtain a target firmware file according to name information of a terminal device to be upgraded, and then further determines whether a target information sequence in the target firmware file matches with device information of the terminal device to be upgraded, so as to determine to obtain the firmware file for upgrading the terminal device to be upgraded, that is, the method for identifying a firmware file of the present invention can identify to obtain an accurate firmware file for upgrading the terminal device to be upgraded, thereby improving a safety factor of firmware file identification.
Embodiments of the present invention are further described below with reference to the accompanying drawings.
The first embodiment is as follows:
in accordance with an embodiment of the present invention, there is provided an embodiment of a method for identifying a firmware file, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a firmware file identification method according to an embodiment of the present invention, which is applied to a cloud platform or a dedicated upgrade server, where the cloud platform or the dedicated upgrade server is used to manage a firmware file with an information sequence compiled by a native compiler of each terminal device, as shown in fig. 1, the method includes the following steps:
step S102, acquiring equipment information of the terminal equipment to be upgraded, and determining the storage position of a target firmware file according to name information in the equipment information;
in this embodiment of the present invention, the device information may specifically include: the manufacturer information, the name information, the software generation date and version information and the like are obtained by inputting when the terminal equipment to be upgraded is connected with the cloud platform or the special upgrading server.
In addition, the cloud platform or the dedicated upgrade server includes a correspondence between name information of each terminal device and a storage location of a firmware file corresponding to each terminal device. For example, if the terminal device to be upgraded is hua P10, the storage location of the target firmware file corresponding to the terminal device to be upgraded can be determined according to the name information of hua P10.
According to the traditional scheme, the target firmware file is read according to the storage position, and the target firmware file is directly used as a firmware file for upgrading the terminal equipment to be upgraded.
Step S104, reading the target firmware file of the storage position, and traversing the target firmware file to determine a target information sequence therein;
after the target firmware file is obtained, the target firmware file is further traversed to determine the target information sequence in the target firmware file, and the target information sequence is identified.
And step S106, if the target information sequence is matched with the equipment information, determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded.
It should be noted that the firmware file of the present invention includes an information sequence, and the information sequence is compiled into the firmware file by a native compiler of each terminal device, and in the specific implementation, a programmer defines a specific information sequence in a program code, and does not require to store the information sequence in a specific hardware storage address, nor distinguish a programming language and an operating system platform (windows/Linux), and then the native compiler of the terminal device compiles to obtain the firmware file with the information sequence. The firmware file with the information sequence obtained by compiling can not be modified for the second time, the normal format of the firmware file can not be influenced, the original framework can not be broken, and the compatibility is good.
The specific process of writing the information sequence into the firmware file may be as follows: defining a constant type character string in the source program, wherein the character string is a constant which cannot be changed in a later period, and when the character string can be compiled, the compiler can automatically write the information sequence into the firmware file.
Subsequently, when the firmware file is identified, the cloud platform or the special upgrading server traverses the firmware file, the information sequence obtained by traversing can be identified in any mode, for example, the information sequence is identified in a character string mode, for example, the information sequence is identified in a form of a pre-specified information sequence such as Company MNC, Product AAU, ID 666888 and the like, the information sequence is solidified in the firmware file and cannot be modified for the second time, the influence caused by the difference of different terminal equipment manufacturers, chips of different terminal equipment and different operation platforms does not exist, after the information sequence is identified, the information sequence is matched with the equipment information of the terminal equipment to be upgraded, and whether the firmware file is the firmware file for upgrading the terminal equipment to be upgraded is determined according to the matching result.
The method for identifying the firmware file is suitable for a firmware file identification device with high safety coefficient, for example, the wired or wireless firmware upgrading of hardware terminal equipment, such as a CPU (central processing unit) in a common ARM (advanced RISC machine) framework, and the terminal equipment which can be possibly applied comprises a communication module, a monitoring module, a power supply module, a control module and related intelligent or digital equipment. Therefore, the identification method for firmware files proposed by the present invention can provide such a method efficiently and reliably.
In an embodiment of the present invention, a firmware file identification method is provided, which is applied to a cloud platform or a dedicated upgrade server, where the cloud platform or the dedicated upgrade server is used to manage a firmware file with an information sequence, which is obtained by compiling a native compiler of each terminal device, and the method includes: acquiring equipment information of the terminal equipment to be upgraded, and determining the storage position of a target firmware file according to name information in the equipment information; reading a target firmware file of the storage position, and traversing the target firmware file to determine a target information sequence in the target firmware file; and if the target information sequence is matched with the equipment information, determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded. According to the above description, in the method for identifying the firmware file of the present invention, the target firmware file is determined according to the name information of the terminal device to be upgraded, and then it is further determined whether the target information sequence in the target firmware file matches with the device information of the terminal device to be upgraded, so as to determine to obtain the firmware file for upgrading the terminal device to be upgraded.
In an alternative embodiment of the invention, the firmware file with the information sequence comprises a firmware file in binary format.
In an optional embodiment of the invention, the information sequence comprises at least: the software generates date, version information, manufacturer information and name information.
In an optional embodiment of the present invention, referring to fig. 2, after determining that the target firmware file is a firmware file for upgrading the terminal device to be upgraded, the method further includes:
step S201, acquiring a target information sequence;
step S202, encrypting the target information sequence to obtain an encrypted target information sequence;
specifically, the target information sequence is encrypted by using a symmetric or asymmetric encryption algorithm, for example, the symmetric encryption algorithm AES is used for encryption.
The target information sequence is encrypted, so that the leakage of the target information sequence can be avoided, and the safety of firmware upgrading pairing is further improved.
Step S203, the encrypted target information sequence is sent to the terminal equipment to be upgraded, so that the terminal equipment to be upgraded decrypts the encrypted target information sequence, and determines whether the decrypted target information sequence is matched with the information sequence of the terminal equipment to be upgraded, and further determines whether the terminal equipment to be upgraded is upgraded.
In the method for identifying the firmware file, the information sequence is compiled and the interior of the firmware file is suitable for CPU compiled files of all terminal equipment, the information sequence in the firmware file can be read by a cloud platform or a special upgrading server, information such as time information, version information, manufacturer information and the like represented by the information sequence can be read by a method similar to a substring recognition algorithm and then secondarily matched with equipment information of the terminal equipment to be upgraded, the method for compiling the information sequence into the firmware file can effectively avoid artificial errors and malicious modification, can also avoid format differences of compiled files generated by different compiling environments, is a universal identification method, the compiled firmware file cannot be secondarily modified, the possibility of information errors does not exist, the maintenance cost is reduced, and the subsequent cloud platform or the special upgrading server can pair the firmware file and the terminal equipment in a wired or wireless mode according to the information sequence, the pairing can be upgraded after successful pairing, and the safety factor is greatly increased.
The identification method is flexible, is not limited to the size of the firmware file, does not require a storage mode of an absolute address of an information sequence, and is not limited to the CPU chip type and the compiling environment of the terminal equipment for compiling the firmware file, when the firmware file is identified, the information sequence can be flexibly and reliably identified by a cloud platform or a special upgrading server, possible errors are effectively avoided, the information sequence is encrypted and then transmitted, the loss caused by the cracking of lawless persons can be avoided, in addition, the requirement of performing specific technical operation in the firmware file is also avoided, and for example, the need of embedding specific information by other tools is avoided. The information sequence is not required to be stored by adopting absolute addresses, so that the difference of functions of CPU chips of different terminal devices at different absolute addresses is avoided, and the type and the memory size of the CPU are not required to be considered.
The identification method can stably and reliably avoid disastrous results caused by human errors or malicious modification possibly caused in the process of upgrading the terminal equipment by the cloud platform or the special upgrading server, fully ensure the normal and reliable operation of the terminal equipment and has extremely high reliability.
Example two:
in accordance with an embodiment of the present invention, there is provided an embodiment of a pairing method for firmware upgrade, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 3 is a flowchart of a pairing method for firmware upgrade according to an embodiment of the present invention, which is applied to a terminal device to be upgraded, and as shown in fig. 3, the method includes the following steps:
step S302, acquiring an encrypted target information sequence sent by the cloud platform or the dedicated upgrade server, where the target information sequence is an information sequence in a target firmware file determined by the cloud platform or the dedicated upgrade server according to the firmware file identification method in the first embodiment;
specifically, the cloud platform or the dedicated upgrade server is actually a pre-designated cloud platform or a pre-designated dedicated upgrade server.
Step S304, decrypting the encrypted target information sequence to obtain a decrypted target information sequence;
specifically, the encrypted target information sequence is decrypted by the key to obtain a decrypted target information sequence. For example, if the cloud platform or the dedicated upgrade server uses the symmetric encryption algorithm AES to encrypt the target information sequence, the terminal device to be upgraded uses the same key to decrypt the target information sequence, and then extracts the target information sequence.
Step S306, determining whether the decrypted target information sequence is matched with the information sequence of the target information sequence;
step S308, if the target firmware file is matched with the target firmware file, the target firmware file sent by the cloud platform or the special upgrading server is obtained, and upgrading is carried out according to the target firmware file.
The pairing method for firmware upgrading has the advantages of good safety, strong universality and higher popularization and application values.
Example three:
the embodiment of the present invention further provides an apparatus for identifying a firmware file, where the apparatus for identifying a firmware file is mainly used for executing the method for identifying a firmware file provided in the first embodiment of the present invention, and the apparatus for identifying a firmware file provided in the first embodiment of the present invention is described in detail below.
Fig. 4 is a schematic diagram of an apparatus for identifying a firmware file according to an embodiment of the present invention, where the apparatus is applied to a cloud platform or a dedicated upgrade server, and the cloud platform or the dedicated upgrade server is used to manage a firmware file with an information sequence compiled by a native compiler of each terminal device, as shown in fig. 4, the apparatus mainly includes: an acquisition and determination unit 10, a reading and determination unit 20 and a first determination unit 30, wherein:
the acquisition and determination unit is used for acquiring the equipment information of the terminal equipment to be upgraded and determining the storage position of the target firmware file according to the name information in the equipment information;
the reading and determining unit is used for reading the target firmware file of the storage position and traversing the target firmware file to determine a target information sequence in the target firmware file;
and the first determining unit is used for determining the target firmware file as the firmware file for upgrading the terminal equipment to be upgraded if the target information sequence is matched with the equipment information.
In an embodiment of the present invention, an apparatus for identifying a firmware file is provided, where the apparatus is applied to a cloud platform or a dedicated upgrade server, and the cloud platform or the dedicated upgrade server is configured to manage a firmware file with an information sequence, where the firmware file is compiled by a native compiler of each terminal device, and the method includes: acquiring equipment information of the terminal equipment to be upgraded, and determining the storage position of a target firmware file according to name information in the equipment information; reading a target firmware file of the storage position, and traversing the target firmware file to determine a target information sequence in the target firmware file; and if the target information sequence is matched with the equipment information, determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded. According to the above description, in the firmware file identification device of the present invention, after the target firmware file is determined according to the name information of the terminal device to be upgraded, it is further determined whether the target information sequence in the target firmware file matches with the device information of the terminal device to be upgraded, and the firmware file for upgrading the terminal device to be upgraded is further determined to be obtained.
Optionally, the firmware file with the information sequence comprises a firmware file in binary format.
Optionally, the information sequence comprises at least: the software generates date, version information, manufacturer information and name information.
Optionally, the apparatus is further configured to: acquiring a target information sequence; encrypting the target information sequence to obtain an encrypted target information sequence; and sending the encrypted target information sequence to the terminal equipment to be upgraded so that the terminal equipment to be upgraded decrypts the encrypted target information sequence, and determines whether the decrypted target information sequence is matched with the information sequence of the terminal equipment to be upgraded so as to determine whether the terminal equipment to be upgraded is upgraded.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiment in the first embodiment, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiment in the first embodiment for the part where the embodiment of the device is not mentioned.
Example four:
the embodiment of the present invention further provides a pairing device for firmware upgrade, which is mainly used for executing the pairing method for firmware upgrade provided in the second embodiment of the present invention, and the following describes the pairing device for firmware upgrade provided in the second embodiment of the present invention in detail.
Fig. 5 is a schematic diagram of a pairing apparatus for firmware upgrade according to an embodiment of the present invention, as shown in fig. 5, the apparatus mainly includes: an obtaining unit 40, a decryption unit 50, a second determining unit 60, and an upgrading unit 70, wherein:
the acquisition unit is used for acquiring an encrypted target information sequence sent by a cloud platform or a special upgrading server, wherein the target information sequence is an information sequence in a target firmware file determined by the cloud platform or the special upgrading server according to the identification method of the firmware file in the first embodiment;
the decryption unit is used for decrypting the encrypted target information sequence to obtain a decrypted target information sequence;
a second determining unit, configured to determine whether the decrypted target information sequence matches an information sequence of the second determining unit;
and if the target firmware file is matched with the target firmware file, the upgrading unit acquires the target firmware file sent by the cloud platform or the special upgrading server and upgrades the target firmware file.
The pairing device for firmware upgrading has the advantages of good safety, strong universality and higher popularization and application values.
Optionally, the decryption unit is further configured to: and decrypting the encrypted target information sequence through the key to obtain the decrypted target information sequence.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiment in the second embodiment, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiment in the second embodiment for the part where the device embodiment is not mentioned.
As shown in fig. 6, an electronic device 600 provided in an embodiment of the present application includes: a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601, when the electronic device is operated, the processor 601 and the memory 602 communicate with each other through the bus, and the processor 601 executes the machine-readable instructions to execute the steps of the method for identifying a firmware file or the method for pairing a firmware upgrade.
Specifically, the memory 602 and the processor 601 can be general-purpose memory and processor, and are not limited to specific examples, and when the processor 601 runs a computer program stored in the memory 602, the firmware file identification method or the firmware upgrade pairing method can be performed.
The processor 601 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 601. The Processor 601 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the method in combination with the hardware thereof.
Corresponding to the identification method of the firmware file or the pairing method of the firmware upgrade, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores machine executable instructions, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to execute the steps of the identification method of the firmware file or the pairing method of the firmware upgrade.
The identification device of the firmware file or the pairing device of the firmware upgrade provided by the embodiment of the application may be specific hardware on the device or software or firmware installed on the device, and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
For another example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. 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 described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the vehicle marking method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. The method for identifying the firmware file is applied to a cloud platform or a special upgrading server, wherein the cloud platform or the special upgrading server is used for managing the firmware file with an information sequence and obtained by compiling a native compiler of each terminal device, and the method comprises the following steps:
acquiring equipment information of terminal equipment to be upgraded, and determining a storage position of a target firmware file according to name information in the equipment information;
reading the target firmware file of the storage position, and traversing the target firmware file to determine a target information sequence in the target firmware file;
and if the target information sequence is matched with the equipment information, determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded.
2. The method according to claim 1, wherein the firmware file with information sequence comprises a binary format firmware file.
3. The method according to claim 1, wherein the information sequence at least includes: the software generates date, version information, manufacturer information and name information.
4. The method for identifying the firmware file according to claim 1, wherein after determining that the target firmware file is a firmware file for upgrading the terminal device to be upgraded, the method further comprises:
acquiring the target information sequence;
encrypting the target information sequence to obtain an encrypted target information sequence;
and sending the encrypted target information sequence to the terminal equipment to be upgraded so that the terminal equipment to be upgraded decrypts the encrypted target information sequence, and determines whether the decrypted target information sequence is matched with the information sequence of the terminal equipment to be upgraded so as to determine whether to upgrade.
5. A pairing method for firmware upgrading is applied to a terminal device to be upgraded, and comprises the following steps:
acquiring an encrypted target information sequence sent by a cloud platform or a special upgrading server, wherein the target information sequence is an information sequence in a target firmware file determined by the cloud platform or the special upgrading server according to the firmware file identification method of any one of claims 1 to 4;
decrypting the encrypted target information sequence to obtain a decrypted target information sequence;
determining whether the decrypted target information sequence is matched with the information sequence of the target information sequence;
and if so, acquiring a target firmware file sent by the cloud platform or the special upgrading server, and upgrading according to the target firmware file.
6. The pairing method for firmware upgrade according to claim 5, wherein decrypting the encrypted target information sequence comprises:
and decrypting the encrypted target information sequence through a secret key to obtain a decrypted target information sequence.
7. An identification device for firmware files is applied to a cloud platform or a special upgrading server, wherein the cloud platform or the special upgrading server is used for managing the firmware files with information sequences, which are compiled by a native compiler of each terminal device, and the device comprises:
the device comprises an acquisition and determination unit, a storage unit and a processing unit, wherein the acquisition and determination unit is used for acquiring the device information of the terminal device to be upgraded and determining the storage position of a target firmware file according to name information in the device information;
the reading and determining unit is used for reading the target firmware file of the storage position and traversing the target firmware file to determine a target information sequence in the target firmware file;
and the first determining unit is used for determining the target firmware file as a firmware file for upgrading the terminal equipment to be upgraded if the target information sequence is matched with the equipment information.
8. A pairing device for firmware upgrading is applied to a terminal device to be upgraded and comprises:
an obtaining unit, configured to obtain an encrypted target information sequence sent by a cloud platform or a dedicated upgrade server, where the target information sequence is an information sequence in a target firmware file determined by the cloud platform or the dedicated upgrade server according to the firmware file identification method according to any one of claims 1 to 4;
the decryption unit is used for decrypting the encrypted target information sequence to obtain a decrypted target information sequence;
a second determining unit, configured to determine whether the decrypted target information sequence matches an information sequence of the second determining unit;
and the upgrading unit is used for acquiring a target firmware file sent by the cloud platform or the special upgrading server and upgrading according to the target firmware file if the target firmware file is matched with the target firmware file.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for identifying a firmware file according to any one of claims 1 to 4 when executing the computer program, or implements the steps of the method for pairing a firmware upgrade according to any one of claims 5 to 6 when executing the computer program.
10. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of identifying a firmware file as claimed in any one of claims 1 to 4 above or the method of pairing a firmware upgrade as claimed in any one of claims 5 to 6 above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110316728.5A CN113010201A (en) | 2021-03-24 | 2021-03-24 | Firmware file identification method, firmware upgrade pairing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110316728.5A CN113010201A (en) | 2021-03-24 | 2021-03-24 | Firmware file identification method, firmware upgrade pairing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113010201A true CN113010201A (en) | 2021-06-22 |
Family
ID=76406709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110316728.5A Pending CN113010201A (en) | 2021-03-24 | 2021-03-24 | Firmware file identification method, firmware upgrade pairing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113010201A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109189440A (en) * | 2018-09-28 | 2019-01-11 | 冼钇冰 | A kind of ECG monitor upgrade method, device and storage medium based on Internet of Things |
US20190265963A1 (en) * | 2018-02-27 | 2019-08-29 | Ricoh Company, Ltd. | Information processing apparatus and firmware updating method |
CN111190617A (en) * | 2018-11-14 | 2020-05-22 | 珠海格力电器股份有限公司 | Remote firmware upgrading system and method based on intelligent perception technology and terminal equipment |
CN111538517A (en) * | 2020-04-24 | 2020-08-14 | 苏州浪潮智能科技有限公司 | Server firmware upgrading method and system, electronic equipment and storage medium |
-
2021
- 2021-03-24 CN CN202110316728.5A patent/CN113010201A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190265963A1 (en) * | 2018-02-27 | 2019-08-29 | Ricoh Company, Ltd. | Information processing apparatus and firmware updating method |
CN109189440A (en) * | 2018-09-28 | 2019-01-11 | 冼钇冰 | A kind of ECG monitor upgrade method, device and storage medium based on Internet of Things |
CN111190617A (en) * | 2018-11-14 | 2020-05-22 | 珠海格力电器股份有限公司 | Remote firmware upgrading system and method based on intelligent perception technology and terminal equipment |
CN111538517A (en) * | 2020-04-24 | 2020-08-14 | 苏州浪潮智能科技有限公司 | Server firmware upgrading method and system, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5074709B2 (en) | Target device, device management system, device management method, and external device | |
US8844049B2 (en) | Method for generating a cryptographic key for a protected digital data object on the basis of current components of a computer | |
US11829479B2 (en) | Firmware security verification method and device | |
CN100578473C (en) | Embedded system and method for increasing embedded system security | |
US10268845B2 (en) | Securing of the loading of data into a nonvolatile memory of a secure element | |
CN103778367A (en) | Method and terminal for detecting safety of application installation package based on application certificate and auxiliary server | |
US20110295908A1 (en) | Detecting counterfeit devices | |
CN101316168B (en) | Authentification device and method | |
CN112035152A (en) | Secure processing system and method for SoC chip firmware upgrade | |
US9860218B2 (en) | Information processing terminal, information processing method, and information processing system | |
CN108762788B (en) | Method and system for encrypting firmware of embedded equipment based on server | |
CN106503494A (en) | A kind of firmware protection location and guard method with flash memory microcontroller on piece | |
KR101756978B1 (en) | Method and System for Protecting application program in trusted execution environment | |
EP2876554A1 (en) | Method and apparatus for secure distribution of embedded firmware | |
CN103995723A (en) | IVI system firmware updating method and device based on mobile storage equipment | |
CN102037473A (en) | Information processing device, information processing method, and computer program and integrated circuit for the realization thereof | |
CN104486355A (en) | Method and device for preventing malicious manipulation of codes | |
CN112579125B (en) | Firmware upgrading method and device, electronic equipment and storage medium | |
CN113553629A (en) | Hardware authorization method and system | |
JP5227474B2 (en) | Device management system, device management method, and external device | |
US20200351108A1 (en) | Semiconductor device, update data-providing method, update data-receiving method, and program | |
CN102937907B (en) | Utilize SD card to authorize software to install and upgrade the method using | |
CN113010201A (en) | Firmware file identification method, firmware upgrade pairing method and device | |
CN113849859A (en) | Linux kernel modification method, terminal device and storage medium | |
CN111224826A (en) | Configuration updating method, device, system and medium based on distributed system |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210622 |