Search

CN-122001762-A - Firmware updating and upgrading method, device, equipment and medium

CN122001762ACN 122001762 ACN122001762 ACN 122001762ACN-122001762-A

Abstract

The invention relates to the technical field of network configuration updating and discloses a firmware updating and upgrading method, device, equipment and storage medium, wherein the method comprises the steps of obtaining a network broadcast packet of an initial network, and carrying out broadcast analysis on the network broadcast packet to obtain a corresponding broadcast message; extracting network configuration parameters in the broadcast message, initializing the initial network according to the network configuration parameters to obtain a target configuration network, acquiring a corresponding firmware image file according to a firmware upgrading request in the target configuration network, performing redundancy check on the firmware image file, taking the firmware image file passing the redundancy check as a target firmware image file, and performing firmware upgrading on a preset firmware to be updated according to the target firmware image file to obtain target firmware. The invention can improve the efficiency and the safety of firmware updating and upgrading.

Inventors

  • XIAO FENG
  • ZHU XIAOYANG
  • YANG CHENGZHI
  • TANG HONG

Assignees

  • 深圳微步信息股份有限公司

Dates

Publication Date
20260508
Application Date
20260130

Claims (10)

  1. 1. A firmware update upgrade method, the method comprising: Acquiring a network broadcast packet of an initial network, and carrying out broadcast analysis on the network broadcast packet to obtain a corresponding broadcast message; Extracting network configuration parameters in the broadcast message, and carrying out network initialization on the initial network according to the network configuration parameters to obtain a target configuration network; Acquiring a corresponding firmware image file according to the firmware upgrading request in the target configuration network; performing redundancy check on the firmware image file, and taking the firmware image file passing the redundancy check as a target firmware image file; and carrying out firmware upgrading on the preset firmware to be updated according to the target firmware image file to obtain target firmware.
  2. 2. The firmware updating and upgrading method of claim 1, wherein the performing broadcast parsing on the network broadcast packet to obtain a corresponding broadcast packet includes: extracting the data load and frame header information of the network broadcast packet, and analyzing the frame header information to obtain a corresponding protocol type; carrying out standardization processing on the data load to obtain standardized data fragments; Matching a corresponding broadcast protocol analysis rule based on the protocol type, and carrying out field splitting on the standardized data segment according to the matched broadcast protocol analysis rule to obtain a plurality of message fields; and carrying out validity check on the message segments, orderly integrating the message segments passing through the validity check according to a preset message structure, and generating a broadcast message corresponding to the network broadcast packet.
  3. 3. The firmware update upgrade method of claim 1, wherein said extracting network configuration parameters in said broadcast message comprises: determining a target data segment containing network configuration parameter characteristics in the broadcast message; Converting the target data segment into a standard format data segment, and dividing the standard format data segment into a plurality of parameter segments according to a preset parameter separator; mapping each parameter fragment into a network configuration parameter name and a corresponding parameter value according to a preset parameter semantic mapping table; and generating the network configuration parameters in the broadcast message according to the network configuration parameter names and the parameter values.
  4. 4. The firmware updating and upgrading method of claim 1, wherein the initializing the initial network according to the network configuration parameters to obtain a target configuration network comprises: distributing corresponding network identifiers to network equipment in the initial network according to the network identifier parameters in the network configuration parameters to obtain a first configuration network; Distributing a corresponding communication protocol stack to the first configuration network according to the communication protocol parameters in the network configuration parameters to obtain a second configuration network; distributing network addresses to the second configuration network according to address configuration parameters in the network configuration parameters to obtain a third configuration network; configuring a routing table for the third configuration network according to the routing strategy parameters in the network configuration parameters to obtain a fourth configuration network; And establishing communication connection based on the fourth configuration network to form a target configuration network.
  5. 5. The firmware updating and upgrading method of claim 1, wherein the obtaining the corresponding firmware image file according to the firmware upgrading request in the target configuration network comprises: Analyzing a device type identifier and a firmware version identifier of a preset target firmware from the firmware upgrading request; Respectively checking the device compatibility of the device type identifier and the firmware version identifier to obtain a target device type identifier and a target firmware version identifier; and carrying out matching search in a preset firmware database according to the target equipment type identifier and the target firmware version identifier to obtain a plurality of firmware image files.
  6. 6. The firmware updating and upgrading method of claim 1, wherein the performing redundancy check on the firmware image file and taking the firmware image file passing the redundancy check as a target firmware image file comprises: Acquiring a digital signature in the firmware image file, and performing decryption calculation on the digital signature to obtain a signature check code; Calculating a file check code of the firmware image file; comparing the signature check code with the file check code, and determining a target check code of the firmware image file according to the comparison result; Matching the target check code with a preset reference check code, and if the target check code is successfully matched with the reference check code, judging that the firmware image file passes redundancy check; And determining the firmware image file passing the redundancy check as a target firmware image file.
  7. 7. The firmware updating and upgrading method of claim 1, wherein the firmware updating the preset firmware to be updated according to the target firmware image file to obtain the target firmware comprises: extracting firmware header information and a firmware data body of the target firmware image file; determining a start address and an end address of the firmware to be updated in a preset storage medium according to the firmware header information; Erasing a storage area corresponding to the firmware to be updated in the storage medium according to the starting address and the ending address; And writing the firmware data body into the erased storage area to obtain the target firmware.
  8. 8. A firmware update upgrade apparatus, said apparatus comprising: The broadcast packet analysis module is used for acquiring a network broadcast packet of an initial network, and carrying out broadcast analysis on the network broadcast packet to obtain a corresponding broadcast message; The network initialization module is used for extracting network configuration parameters in the broadcast message, and carrying out network initialization on the initial network according to the network configuration parameters to obtain a target configuration network; The image file acquisition module is used for acquiring a corresponding firmware image file according to the firmware upgrading request in the target configuration network; the redundancy check module is used for carrying out redundancy check on the firmware image file and taking the firmware image file passing the redundancy check as a target firmware image file; and the firmware upgrading module is used for carrying out firmware upgrading on the preset firmware to be updated according to the target firmware image file to obtain the target firmware.
  9. 9. An electronic device, the electronic device comprising: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the firmware update upgrade method of any one of claims 1 to 7.
  10. 10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements a firmware update upgrade method according to any one of claims 1 to 7.

Description

Firmware updating and upgrading method, device, equipment and medium Technical Field The present invention relates to the field of network configuration updating technologies, and in particular, to a method, an apparatus, a device, and a medium for updating and upgrading firmware. Background With the rapid development of the internet of things, the industrial internet and intelligent devices, the firmware update requirement of the embedded system is increasing. Firmware upgrade is used as a core link of equipment maintenance, function expansion and safety repair, and the reliability, safety and automation degree of the firmware upgrade directly influence the stable operation and user experience of network equipment. However, the existing firmware update technology still has many disadvantages, for example, in the traditional firmware update process, the network device needs to configure the static IP in advance to access the network and download the firmware, but in the scenario without manual intervention (such as IoT devices deployed in large scale, remote area sensor networks), the manual configuration cost is high and is easy to make mistakes, so that the device cannot automatically complete network access, further interrupt the upgrade process, cause the device to acquire invalid configuration, and further reduce the success rate of upgrade. Meanwhile, in the transmission process of the firmware image file, data loss or tampering can be caused by network interference, malicious attack or storage medium damage, and the prior art lacks of transmission verification of the firmware image file, so that the firmware upgrading error rate is high and the efficiency is low. Therefore, how to improve the efficiency and security of firmware update and upgrade is a problem to be solved. Disclosure of Invention The invention provides a firmware updating and upgrading method, a device, equipment and a medium, which mainly aim to solve the problem of how to improve the efficiency and the safety of firmware updating and upgrading. In order to achieve the above object, a firmware update and upgrade method provided by the present invention includes: Acquiring a network broadcast packet of an initial network, and carrying out broadcast analysis on the network broadcast packet to obtain a corresponding broadcast message; Extracting network configuration parameters in the broadcast message, and carrying out network initialization on the initial network according to the network configuration parameters to obtain a target configuration network; Acquiring a corresponding firmware image file according to the firmware upgrading request in the target configuration network; performing redundancy check on the firmware image file, and taking the firmware image file passing the redundancy check as a target firmware image file; and carrying out firmware upgrading on the preset firmware to be updated according to the target firmware image file to obtain target firmware. In a second aspect, the present invention further provides a firmware update upgrade apparatus, where the apparatus includes: The broadcast packet analysis module is used for acquiring a network broadcast packet of an initial network, and carrying out broadcast analysis on the network broadcast packet to obtain a corresponding broadcast message; The network initialization module is used for extracting network configuration parameters in the broadcast message, and carrying out network initialization on the initial network according to the network configuration parameters to obtain a target configuration network; The image file acquisition module is used for acquiring a corresponding firmware image file according to the firmware upgrading request in the target configuration network; the redundancy check module is used for carrying out redundancy check on the firmware image file and taking the firmware image file passing the redundancy check as a target firmware image file; and the firmware upgrading module is used for carrying out firmware upgrading on the preset firmware to be updated according to the target firmware image file to obtain the target firmware. In a third aspect, the present invention also provides an electronic device, including: At least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the firmware update upgrade method described above. In a fourth aspect, the present invention further provides a computer readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the firmware update upgrade method described above. In the embodiment of the invention, the network configuration parameters are acquired by automatically capturing and analyzing the network broadcast packet, the step of manually configuring one