CN114616544A - Firmware data processing method and device - Google Patents

Firmware data processing method and device Download PDF

Info

Publication number
CN114616544A
CN114616544A CN202080074505.6A CN202080074505A CN114616544A CN 114616544 A CN114616544 A CN 114616544A CN 202080074505 A CN202080074505 A CN 202080074505A CN 114616544 A CN114616544 A CN 114616544A
Authority
CN
China
Prior art keywords
firmware
check code
fragment
target
data packet
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
Application number
CN202080074505.6A
Other languages
Chinese (zh)
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.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI 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 SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Publication of CN114616544A publication Critical patent/CN114616544A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

A firmware data processing method, a device, a camera module and a mobile device are provided, the method comprises the following steps: acquiring a firmware fragment data packet of a target firmware sent by upper computer equipment; the firmware fragment data packet comprises data fragment content and a first check code (101) which is generated according to a preset rule and corresponds to the data fragment content; generating a second check code (102) corresponding to the data fragment content of the acquired firmware fragment data packet according to a preset rule; and executing corresponding operation (103) according to the second check code and the check result of the first check code. The method can judge whether the firmware fragment data packet is a correct data packet or not by verifying the content of each firmware fragment data packet of the received target firmware based on the check code through the lower computer equipment, thereby identifying abnormal conditions such as data packet loss and the like in the transmission process, realizing effective supervision on the transmission process of the firmware and reducing the error probability in the transmission process.

Description

Firmware data processing method and device
Technical Field
The present application relates to the field of firmware processing technologies, and in particular, to a firmware data processing method and apparatus.
Background
In recent years, abnormal fire and heat of unmanned driving can play a great role in sensing of the whole vehicle as an all-weather and high-precision sensor among a plurality of vehicle-mounted sensors, and the accuracy and the practicability of the unmanned driving technology are improved.
In the using process of the millimeter wave radar, schemes such as algorithm software and the like can be updated and iterated frequently, so that the millimeter wave radar needs to update firmware frequently to adapt to the continuously iterated algorithm. At present, firmware update of the millimeter wave radar can be realized through data interaction with upper computer equipment, and after the upper computer equipment generates new firmware, a transmission channel with the millimeter wave radar can be established, and firmware data is sent to the millimeter wave radar for loading and updating so as to replace the old firmware in the millimeter wave radar.
However, in the current scheme, due to the complexity of the usage scenario of the millimeter wave radar, abnormal situations such as data loss often occur in the transmission process of the firmware, and the current transmission scheme cannot provide effective supervision for the transmission process of the firmware, so that the probability of firmware loading errors is greatly increased.
Disclosure of Invention
The application provides a firmware data processing method, a firmware data processing device, a camera module and a mobile device, and can solve the problems that in the prior art, effective supervision cannot be provided for a firmware transmission process, abnormal conditions such as data loss and the like often occur in the transmission process of firmware, and the probability of firmware loading errors greatly rises.
In a first aspect, an embodiment of the present application provides a firmware data processing method, which is applied to a lower computer device, and includes:
acquiring a firmware fragment data packet of a target firmware sent by upper computer equipment; the firmware fragment data packet comprises data fragment content and a first check code which is generated according to a preset rule and corresponds to the data fragment content;
generating a second check code corresponding to the data fragmentation content of the acquired firmware fragmentation data packet according to the preset rule;
and executing corresponding operation according to the second check code and the check result of the first check code.
In a second aspect, an embodiment of the present application provides a firmware data processing method, which is applied to an upper computer device, and includes:
segmenting a target firmware into a plurality of firmware segmentation data packets with preset file sizes;
generating a first check code corresponding to the data fragment content of the firmware fragment data packet according to a preset rule;
and sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment.
In a third aspect, an embodiment of the present application provides a firmware data processing apparatus, which is applied to a lower computer device, and includes: a memory and a processor;
the memory is used for acquiring a firmware fragment data packet of the target firmware sent by the upper computer equipment; the firmware fragment data packet comprises data fragment content and a first check code which is generated according to a preset rule and corresponds to the data fragment content;
the processor is used for generating a second check code corresponding to the acquired data fragment content of the firmware fragment data packet according to the preset rule;
and executing corresponding operation according to the second check code and the check result of the first check code. In a fourth aspect, an embodiment of the present application provides a firmware data processing apparatus, which is applied to an upper computer device, and the apparatus includes: a processor;
the processor is configured to:
segmenting a target firmware into a plurality of firmware segmentation data packets with preset file sizes;
generating a first check code corresponding to the data fragment content of the firmware fragment data packet according to a preset rule;
and sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment.
In a fifth aspect, an embodiment of the present application provides a firmware data processing system, where the system includes:
an upper computer device and a lower computer device;
the upper computer equipment is used for segmenting the target firmware into a plurality of firmware fragment data packets with preset file sizes and generating first check codes corresponding to data fragment contents of the firmware fragment data packets according to preset rules; sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment;
the lower computer equipment is used for acquiring a firmware fragment data packet of the target firmware sent by the upper computer equipment and generating a second check code corresponding to the data fragment content of the acquired firmware fragment data packet according to the preset rule; and executing corresponding operation according to the second check code and the check result of the first check code.
In a sixth aspect, the present application provides a computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of the above aspect.
In a seventh aspect, the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above aspect.
In an eighth aspect, an embodiment of the present application provides a vehicle, including: a vehicle body;
the firmware data processing device is installed on the vehicle body.
In the embodiment of the application, a firmware fragment data packet of a target firmware sent by an upper computer device is obtained; the firmware fragment data packet comprises data fragment contents and a first check code which is generated according to a preset rule and corresponds to the data fragment contents; generating a second check code corresponding to the data fragment content of the acquired firmware fragment data packet according to a preset rule; and executing corresponding operation according to the second check code and the check result of the first check code. According to the method and the device, verification based on the check codes can be performed on the content of each firmware fragment data packet of the received target firmware through the lower computer device, so that whether the firmware fragment data packet is a correct data packet or not is judged, abnormal conditions such as data packet loss in the transmission process are identified, effective supervision on the transmission process of the firmware is achieved, and the error probability in the transmission process is reduced.
Drawings
FIG. 1 is a system architecture diagram of a firmware data processing system provided by an embodiment of the present application;
fig. 2 is a flowchart of a lower computer device side firmware data processing method according to an embodiment of the present application;
fig. 3 is a flowchart of a method for processing firmware data on a host computer device side according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating interaction steps of a firmware data processing method according to an embodiment of the present application;
FIG. 5 is a block diagram of a firmware data processing apparatus according to an embodiment of the present application;
FIG. 6 is a block diagram of another firmware data processing apparatus provided in an embodiment of the present application;
fig. 7 is a block diagram of a vehicle according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
In the fields of unmanned driving and aerial photography surveying and mapping, the millimeter wave radar plays a great role as an all-weather and high-precision sensor in whole vehicle sensing, and based on firmware data processing of the millimeter wave radar, the embodiment of the application provides the millimeter wave radar as the lower computer equipment, so that firmware data interaction between the millimeter wave radar and the upper computer equipment is realized, new firmware data are remotely issued by the upper computer equipment, the purpose of updating old firmware data in the lower computer equipment is achieved, and the millimeter wave radar is enabled to adapt to a continuously iterative firmware algorithm. It should be noted that the lower computer device may also be other devices that need to be upgraded or updated, such as a laser radar, a vehicle-mounted terminal, and the like.
In the embodiment of the present application, referring to fig. 1, a system architecture diagram of a firmware data processing system provided in the embodiment of the present application is shown, including: the upper computer device 10 may be a mobile terminal, a server, or the like, the upper computer device 10 may store or generate firmware data generated after algorithm update iteration of the millimeter wave radar, the upper computer device 10 may further establish a wired/wireless connection channel with the lower computer device 20, and issue the firmware data to the lower computer device 20 through the connection channel. After receiving the complete and correct firmware data, the lower computer device 20 may load the firmware data to work through a new firmware if it is verified that the firmware data is error-free.
Specifically, the processing procedure for the firmware data includes: a process of transmitting the firmware data, and a process of loading the received firmware data by the lower computer device. When the lower computer device 20 is in a complex working environment, the connection channel between the lower computer device and the upper computer device 10 is often unstable, so that the process of transmitting firmware data is unstable, specifically, data loss occurs in the transmission process, the firmware data is found to be transmitted incorrectly when the transmission is finished, and in addition, the problem of failure in loading the firmware data also occurs under the condition that the storage device of the lower computer device 20 fails.
In order to improve the guarantee on the transmission stability of the firmware data, the upper computer device can segment the whole target firmware to be transmitted into a plurality of firmware fragment data packets with smaller volumes, and continuously verify whether check codes generated by the upper computer device and the lower computer device for each firmware fragment data packet are consistent in the transmission process, so as to determine whether the firmware fragment data packets are lost or have errors in the transmission process. In addition, after the transmission process is completed, whether the transmitted target firmware is correct or not can be determined by verifying whether check codes generated by the upper computer device and the lower computer device for the whole target firmware packet are consistent or not, and the stability of the transmission process is ensured. Finally, in the process of loading the target firmware, the lower computer device may store the target firmware in a local storage space, then generate the check code of the target firmware extracted from the storage space, and determine whether the storage of the lower computer device is invalid or not by verifying whether the generated check code is consistent with the check code generated by the upper computer device for the whole target firmware package, thereby ensuring the loading stability.
Fig. 2 is a flowchart of a firmware data processing method provided in an embodiment of the present application, where the method is applied to a lower computer device, and as shown in fig. 2, the method may include:
101, acquiring a firmware fragment data packet of a target firmware sent by upper computer equipment; the firmware fragment data packet comprises data fragment content and a first check code which is generated according to a preset rule and corresponds to the data fragment content.
In this embodiment of the present application, the upper computer device may divide the target firmware into a plurality of firmware fragment data packets with fixed file sizes, generate a first check code corresponding to data fragment content in each firmware fragment data packet according to a preset rule, and issue the firmware fragment data packets including the first check code to the lower computer device in sequence, where the first check code is unique and is used to verify whether the data fragment content of the corresponding firmware fragment data packet is correct, and if the check code of one firmware fragment data packet is a, it may be considered that the two firmware fragment data packets are the same when the check code of another firmware fragment data packet is a. The check code of one firmware fragment data packet is a, and when the check code of another firmware fragment data packet is B, the two firmware fragment data packets can be considered to be different.
Specifically, the upper computer device may convert data fragment content of a firmware fragment data packet to be transmitted into a K-bit binary sequence, and generate a first check code corresponding to the binary sequence according to a preset rule, where the first check code is also a binary sequence and has R bits, and then the upper computer device may attach the first check code to the K-bit binary sequence to obtain a K + R-bit binary sequence and transmit the K + R-bit binary sequence to the lower computer device.
It should be noted that the Check code referred to in the embodiments of the present application may be in the form of a Cyclic Redundancy Check (CRC) code, where CRC is a channel coding technique for generating a short fixed-number Check code according to data such as a network data packet or a computer file, and is mainly used to detect or Check errors that may occur after data transmission or storage.
Specifically, the cyclic redundancy check is a calculation method for checking the accuracy of digital transmission on a communication link, in which an upper computer device calculates a value of information contained in transmitted data using a certain formula, attaches the value to the transmitted data, and transmits the value to a lower computer device, and the lower computer device performs calculation of the same rule on the same data to obtain a corresponding result. If the two CRC results do not match, it indicates that an error occurred in the transmission, and the lower computer device may request the upper computer device to retransmit the data.
And 102, generating a second check code corresponding to the acquired data fragment content of the firmware fragment data packet according to the preset rule.
In this embodiment of the application, after receiving each firmware fragment data packet, the lower computer device needs to verify the data fragment content of the received firmware fragment data packet, and determine whether the content is correct.
Therefore, the lower computer device may generate the second check code corresponding to the data fragmentation content of the firmware fragmentation data packet according to the preset rule agreed with the upper computer device, so as to compare the second check code with the first check code.
Specifically, when the lower computer device receives a firmware fragment data packet sent by the upper computer device, the firmware fragment data packet is in a form of a K + R bit binary sequence, the lower computer device may extract the K bit binary sequence reflecting the data fragment content of the lower computer device, and generate a second check code corresponding to the K bit binary sequence according to a preset rule agreed with the upper computer device, where the second check code is in a form of an R bit binary sequence.
And 103, executing corresponding operation according to the second check code and the check result of the first check code.
In the embodiment of the present application, the verification performed by the second check code and the first check code has two verification results: the second check code is consistent with the first check code, and the second check code is inconsistent with the first check code.
Specifically, under the condition that the second check code is consistent with the first check code, it indicates that the contents of the firmware fragmented data packet received by the lower computer device are consistent with the contents of the firmware fragmented data packet sent by the upper computer device, and at this time, the lower computer device may execute an operation of continuously receiving a next firmware fragmented data packet sent by the upper computer device. Under the condition that the second check code is inconsistent with the first check code, it is described that the contents of the firmware fragment data packet received by the lower computer device are inconsistent with the contents of the firmware fragment data packet sent by the upper computer device, and at this time, the lower computer device can consider that a transmission error occurs and execute an operation of reporting the error to the upper computer device.
Optionally, the lower computer device is a millimeter wave radar. After step 103, the method may further comprise:
and step 104, under the condition that all firmware fragment data packets of the target firmware sent by the upper computer equipment are received and the verification operation of the check codes of the firmware fragment data packets is completed, changing the currently loaded firmware into the target firmware and completing the upgrading operation of the firmware of the millimeter wave radar.
In practical application, the millimeter wave radar plays a great role in whole vehicle sensing as an all-weather and high-precision sensor, and firmware data processing based on the millimeter wave radar is realized.
To sum up, in the firmware data processing method provided by the embodiment of the present application, a firmware fragment data packet of a target firmware sent by an upper computer device is obtained; the firmware fragment data packet comprises data fragment contents and a first check code which is generated according to a preset rule and corresponds to the data fragment contents; generating a second check code corresponding to the data fragment content of the acquired firmware fragment data packet according to a preset rule; and executing corresponding operation according to the second check code and the check result of the first check code. According to the method and the device, verification based on the check codes can be carried out on the content of each firmware fragment data packet of the received target firmware through the lower computer device, and whether the firmware fragment data packet is a correct data packet is judged, so that abnormal conditions such as data packet loss in the transmission process are identified, effective supervision on the firmware transmission process is realized, and the error probability in the transmission process is reduced.
Fig. 3 is a specific flowchart of a firmware data processing method provided in an embodiment of the present application, where the method is applied to an upper computer device, and as shown in fig. 3, the method may include:
step 201, segmenting the target firmware into a plurality of firmware segment data packets with preset file sizes.
In this application embodiment, a developer can develop and generate a target firmware on an upper computer device, the upper computer device can also receive the target firmware sent by other devices, the size of the target firmware is generally large, in order to ensure the stability of a transmission process and avoid the situation that the whole target firmware needs to be retransmitted due to interruption in the transmission process, the upper computer device can divide the target firmware into a plurality of firmware fragment data packets with preset file sizes and sequentially send the firmware fragment data packets to a lower computer device, and when a certain firmware fragment data packet fails to be sent, the firmware fragment data packet also needs to be sent again instead of sending the whole target firmware.
Optionally, the step 201 may also be implemented by determining the size of the preset file according to the length of the check code corresponding to the preset rule and the target bit error rate of the target firmware.
Specifically, the firmware transmission method provided in this embodiment of the present application may be applied to different application scenarios, and different application scenarios may require different target bit error rates when transmitting target firmware, and an excessively large file size of a firmware fragment data packet may cause a reduction in generation accuracy of a check code, and an increase in the target bit error rate when transmitting the target firmware may affect transmission quality.
Step 202, according to a preset rule, generating a first check code corresponding to the data fragment content of the firmware fragment data packet.
Specifically, the upper computer device may convert data fragment content of a firmware fragment data packet to be transmitted into a K-bit binary sequence, and generate a first check code corresponding to the binary sequence according to a preset rule, where the first check code is also a binary sequence and has R bits, and then the upper computer device may attach the first check code to the K-bit binary sequence to obtain a K + R-bit binary sequence and transmit the K + R-bit binary sequence to the lower computer device. It should be noted that the check code referred to in the embodiments of the present application may be in the form of a CRC code.
And 203, sending the firmware fragment data packet including the first check code to the lower computer device.
The upper computer equipment sequentially issues the firmware fragment data packets containing the first check code to the lower computer equipment, and the first check code is unique and is used for enabling the lower computer equipment to verify whether the data fragment content of the firmware fragment data packets received by the lower computer equipment is correct or not.
To sum up, in the firmware data processing method provided by the embodiment of the present application, the target firmware is divided into a plurality of firmware fragment data packets with preset file sizes; generating a first check code corresponding to the data fragmentation content of the firmware fragmentation data packet according to a preset rule; and sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment. According to the method and the device, the target firmware can be segmented into the plurality of firmware segment data packets through the upper computer device, the first check codes corresponding to all the firmware segment data packets are added into the firmware segment data packets and issued to the lower computer device, the lower computer device verifies the content of each received firmware segment data packet of the target firmware based on the check codes to judge whether the firmware segment data packet is a correct data packet, abnormal conditions such as data packet loss and the like in the transmission process are identified, effective supervision on the firmware transmission process is achieved, and the error probability in the transmission process is reduced.
Fig. 4 is a flowchart illustrating interaction steps of a firmware data processing method according to an embodiment of the present application, where as shown in fig. 4, the method may include:
step 301, the upper computer device sends an update command including the first firmware version number of the target firmware to the lower computer device.
In the embodiment of the present application, the firmware version number may be used to reflect the freshness of the firmware, and when the firmware version number 1 of one firmware 1 is greater than the firmware version number 2 of another firmware 2, the firmware 1 is indicated as the latest firmware.
In one implementation, the format of the firmware version number includes: XXX, YYYYYYYY, ZZZ, wherein XXX represents the device model of the lower computer device, YYYYYYYYY represents the date and time (such as 20200102 representing 1, 2 and 2020), and ZZZ represents the corresponding version identification of the firmware.
When comparing the two firmware version numbers, the device models of the two firmware version numbers need to be consistent, and the firmware version number with the later date and time of issuing the firmware is larger than the firmware version number with the earlier date and time of issuing the firmware. In addition, when the device models of the two firmware version numbers and the date and time of firmware release are consistent, the firmware version number with the larger version identification is larger than the firmware version number with the smaller version identification.
It should be noted that the address stored in the first firmware version number is a firmware header of the target firmware, where the header is used to store some verification information of the target firmware, and the verification information is not loaded into the memory to run when the lower computer device finally loads the target firmware.
Step 302, the lower computer device obtains an update command sent by the upper computer device, where the update command includes a first firmware version number of the target firmware.
Step 303, the lower computer device enters step 307 when the first firmware version number is greater than the second firmware version number of the local firmware of the lower computer device.
In this embodiment, before the lower computer device starts updating the firmware, the update command including the first firmware version number of the target firmware sent by the upper computer device may be received first, and the corresponding operation may be executed according to a comparison result between the second firmware version number of the local firmware of the lower computer device and the first firmware version number.
Specifically, when the second firmware version number is smaller than the first firmware version number, the target firmware is a new firmware, and the lower computer device may further receive the target firmware issued by the upper computer device to upgrade the firmware.
When the second firmware version number is greater than or equal to the first firmware version number, the target firmware is the old firmware, and the lower computer device does not need to perform firmware upgrading operation at this time.
And step 304, the upper computer device divides the target firmware into a plurality of firmware fragment data packets with preset file sizes.
This step may specifically refer to step 201 described above, and is not described herein again.
And 305, generating a first check code corresponding to the data fragment content of the firmware fragment data packet by the upper computer device according to a preset rule.
This step may specifically refer to step 202 described above, and is not described here again.
Step 306, the upper computer device sends the firmware fragment data packet including the first check code to the lower computer device.
This step may specifically refer to step 203, which is not described herein again.
And 307, the lower computer device acquires the firmware fragment data packet of the target firmware sent by the upper computer device.
This step may specifically refer to step 101, which is not described herein again.
And step 308, the lower computer device generates a second check code corresponding to the acquired data fragmentation content of the firmware fragmentation data packet according to the preset rule.
This step may specifically refer to step 102, which is not described herein again.
And 309, sending a transmission error report request to the upper computer equipment by the lower computer equipment under the condition that the second check code is different from the first check code.
In this embodiment of the application, under the condition that the second check code is inconsistent with the first check code, it is described that the contents of the firmware fragment data packet received by the lower computer device are inconsistent with the contents of the firmware fragment data packet sent by the upper computer device, and at this time, the lower computer device may consider that a transmission error occurs, execute an error reporting operation on the upper computer device, and send a transmission error reporting request to the upper computer device.
And step 310, the lower computer device continues to acquire the next firmware fragment data packet sent by the upper computer device under the condition that the second check code is the same as the first check code.
Under the condition that the second check code is consistent with the first check code, it is described that the contents of the firmware fragment data packet received by the lower computer device are consistent with the contents of the firmware fragment data packet sent by the upper computer device, and at this time, the lower computer device can execute an operation of continuously receiving a next firmware fragment data packet sent by the upper computer device.
And 311, if the upper computer device obtains the transmission error reporting request sent by the lower computer device, stopping sending the firmware fragment data packet to the lower computer device.
In this embodiment of the application, the upper computer device may consider that the transmission channel has a problem according to the transmission error reporting request sent by the lower computer device, stop sending the firmware fragment data packet to the lower computer device, and resume transmission after the problem is resolved. When the transmission is recovered, the firmware fragment data packet transmitted when the transmission error report request occurs can be retransmitted.
Optionally, when all the firmware fragment data packets sent by the upper computer device are acquired and the second check code and the first check code of the last acquired firmware fragment data packet are the same, the method further includes:
and step 312, the lower computer device generates third check codes corresponding to the acquired data fragmentation contents of all the firmware fragmentation data packets according to the preset rule.
In this embodiment of the application, in the transmission process of the target firmware by the upper computer device and the lower computer device, whether each transmitted firmware fragment data packet is erroneous or not can be determined through the checking operation of the second check code and the first check code, when the lower computer device receives all the firmware fragment data packets sent by the upper computer device and the second check code of the last obtained firmware fragment data packet is the same as the first check code, the lower computer device can generate a third check code corresponding to the data fragment content of all the obtained firmware fragment data packets according to a preset rule agreed with the upper computer device, where the third check code is used to verify whether the data content of the whole target firmware received by the lower computer device is correct or not.
And 313, the lower computer device sends the third check code to the upper computer device.
After the third check code is generated, the lower computer device may send the third check code to the upper computer device, so that the upper computer device may check the third check code with a fifth check code generated by the upper computer device.
And step 314, the upper computer device acquires the third check code sent by the lower computer device.
And 315, generating fifth check codes corresponding to all data fragment contents of the target firmware by the upper computer device according to the preset rule.
In this embodiment of the application, after the target firmware is generated, the upper computer device may generate the fifth check code corresponding to all data fragment contents of the target firmware in advance based on a preset rule agreed with the lower computer device. The third check code is used for reflecting the correctness of the data content of the whole target firmware generated by the upper computer equipment.
Step 316, the upper computer device sends a confirmation instruction for the third check code to the lower computer device when the third check code is the same as the fifth check code.
In this embodiment of the application, under the condition that the third check code is the same as the fifth check code, the upper computer device may consider that the entire target firmware received by the lower computer device is consistent with the entire target firmware content issued by the upper computer device, and at this time, the upper computer device sends a confirmation instruction for the third check code to the lower computer device, so that the lower computer device confirms that the transmission of the target firmware is finished according to the confirmation instruction.
Further, under some circumstances, the environment of an application scene is complex, the transmission link has a problem of instability, when the lower computer device sends the actually generated third check code, the lower computer device may send an erroneous third check code with each bit being 0 to the upper computer device due to the failure of the transmission link, at this time, the content of the third check code actually generated by the lower computer device is lost, when the upper computer device receives the third check code with each bit being 0, it can be judged that the sending link of the target firmware has a problem, and the upper computer device can report an error accordingly to remind of correcting the link problem. Or, in some cases, the environment of the application scene is complex, and the transmission link is unstable, so that the lower computer device may send a data stream with 0 bits to the upper computer device; at this time, since the check code of the data stream whose bits are 0 is still 0, the check code loses the error detection function.
It should be noted that, in the case that the link problem is not considered, the upper computer device may also send the fifth check code to the lower computer device, and the lower computer device checks the third check code and the fifth check code, and sends a firmware error alarm to the upper computer device in the case that the checks are inconsistent.
And 317, generating a firmware error alarm by the upper computer device under the condition that the third check code is different from the fifth check code, and stopping the process for processing the target firmware after a preset time.
In this embodiment of the application, under the condition that the third check code is different from the fifth check code, the upper computer device may consider that the lower computer device does not receive the correct target firmware, and at this time, the upper computer device generates a firmware error alarm to correct the firmware error, and stops the process for processing the target firmware after a preset time, thereby avoiding an error in the subsequent firmware transmission process due to errors such as a transmission channel.
Step 318, the lower computer device determines that the target firmware is completely transmitted when acquiring the confirmation instruction for the third check code sent by the upper computer device.
And the lower computer equipment can confirm the transmission end of the target firmware according to the confirmation instruction and continues the subsequent target firmware loading process.
Optionally, after step 318, the method further includes:
step 319, the lower computer device stores all firmware fragment data packets of the target firmware into the first flash memory space.
In this embodiment of the application, after receiving the target firmware, the lower computer device may load the target firmware through a loading program, before performing a loading operation, the lower computer device may store all firmware fragment data packets of the target firmware into a first flash memory space, where the flash memory space is used to temporarily store firmware data, and the speed of processing data is very fast, so that when the target firmware needs to be loaded into a memory space in a subsequent loading operation, the lower computer device can quickly extract the target firmware from the first flash memory space.
Optionally, after step 319, the method further includes:
and step 320, the lower computer device modifies the zone bit of the first flash memory space into a first firmware zone bit.
And step 321, the lower computer device loads the target firmware according to the first firmware flag bit.
Specifically, the loading of the target firmware by the loader is implemented by using the flag bit as a loading guide, and after storing all firmware fragment data packets of the target firmware into the first flash memory space, the lower computer device may modify the flag bit of the first flash memory space into the first firmware flag bit, so that the loader loads the target firmware according to the first firmware flag bit, that is, the loader loads data in the storage space with the first firmware flag bit.
Optionally, step 321 may include:
in sub-step 3211, the lower computer device extracts the firmware fragment data packet of the target firmware in the first flash memory space according to the first firmware flag bit, and stores the firmware fragment data packet in the memory space.
In practical application, the problem that loading of the target firmware fails due to the fact that the memory of the lower computer device fails can exist, and in order to reduce the probability of the problem, the target firmware loading verification based on the check code can be performed in the embodiment of the application so as to verify the memory stability of the lower computer device.
Specifically, the lower computer device may extract the firmware fragment data packets of the target firmware from the first flash memory space for temporarily storing the target firmware according to the first firmware flag bit, and sequentially store the firmware fragment data packets into the memory space, where the memory space is a space for storing data related to the target firmware when the target firmware is finally run, and the stability of the memory space affects the running quality of the target firmware.
In the substep 3212, the lower computer device generates fourth check codes corresponding to the data fragmentation content of all firmware fragmentation data packets of the target firmware according to the preset rule.
In this embodiment of the present application, after the firmware fragment data packet of the target firmware is stored in the memory space, fourth check codes corresponding to the data fragment contents of all the firmware fragment data packets of the target firmware may be generated based on a preset rule agreed with the upper computer device, where the fourth check codes are used to verify whether the data contents of the target firmware in the memory space are correct or not.
In sub-step 3213, the lower computer device runs the target firmware in the memory space when the fourth check code is the same as the third check code.
In this embodiment of the application, when the fourth check code is the same as the third check code calculated in the previous transmission process, the lower computer device may consider that the correct and complete target firmware is normally stored in the first flash memory space and the memory space, and further considers that the flash memory space and the memory space of the lower computer device are fault-free and operate normally, and the probability of loading failure due to the fault of the memory space in the subsequent process is low, at this time, the lower computer device may operate the target firmware in the memory space through the loading program to perform the subsequent operation.
Optionally, the method may further include:
in the substep 3214, the lower computer device sends a load error report request to the upper computer device when the fourth check code is different from the third check code.
In this embodiment of the application, when the fourth check code is different from the third check code calculated in the previous transmission process, the lower computer device may consider that the target firmware is not normally stored in the first flash memory space and the memory space, and further consider that a fault exists in the flash memory space and/or the memory space of the lower computer device, and at this time, the lower computer device may send a loading error reporting request to the upper computer device to inform a maintenance person of the fault condition, so as to perform maintenance.
In sub-step 3215, the lower computer device modifies the first firmware flag to a second firmware flag when the fourth check code is different from the third check code, where the second firmware flag is a flag written into a second flash memory space for firmware backup.
Specifically, the lower computer device may further include an independent second flash memory space, where the second flash memory space may store backup firmware to implement disaster recovery of firmware data, and the backup estimation may be an old stable firmware version, so that the lower computer device may operate the backup firmware when a new firmware is loaded in error, thereby avoiding that the lower computer device cannot work normally.
Therefore, the lower computer device may modify the first firmware flag bit to the second firmware flag bit under the condition that the fourth check code is different from the third check code, so as to load the backup firmware according to the second firmware flag bit for emergency.
In sub-step 3216, if the value of the second firmware flag is not 0, the lower computer device loads the backup firmware in the second flash memory space according to the second firmware flag.
In this embodiment of the application, the condition that the firmware flag is not 0 is an effective condition, and at this time, the lower computer device loads the backup firmware in the second flash memory space according to the second firmware flag bit to run, so as to implement data disaster recovery of the firmware data.
In the substep 3217, the lower computer device sends a firmware error reporting request to the upper computer device when the number of times of modifying the firmware flag bit reaches a preset number of times.
In this embodiment, the loading program of the lower computer device loads the firmware through the firmware flag bit, where the firmware flag bit is a start space address for controlling the next loading of the firmware, and the address is modified in two cases: firstly, when the firmware is upgraded successfully, the next firmware loading needs to enter a new target firmware to operate, so that the flag bit needs to be modified into a first flag bit; and secondly, when the target firmware is failed to be loaded, the target firmware corresponding to the first zone bit cannot be operated due to the failure of the loading at this time, so that the zone bit needs to be modified into the second zone bit, and the condition that the next firmware loading enters another backup firmware is ensured. In addition, when the flag bit modification times are the preset times (the preset times may be 2, and the initial value thereof is 0), it represents that both the firmware cannot be used, and at this time, a firmware error reporting request needs to be sent to the upper computer device, so as to perform subsequent firmware repair. Therefore, reasonable and smooth firmware loading is guaranteed, and the situation that the whole lower computer equipment cannot run due to damage of one firmware is avoided.
To sum up, in the firmware data processing method provided by the embodiment of the present application, a firmware fragment data packet of a target firmware sent by an upper computer device is obtained; the firmware fragment data packet comprises data fragment contents and a first check code which is generated according to a preset rule and corresponds to the data fragment contents; generating a second check code corresponding to the data fragment content of the acquired firmware fragment data packet according to a preset rule; and executing corresponding operation according to the second check code and the check result of the first check code. According to the method and the device, verification based on the check codes can be carried out on the content of each firmware fragment data packet of the received target firmware through the lower computer device, and whether the firmware fragment data packet is a correct data packet is judged, so that abnormal conditions such as data packet loss in the transmission process are identified, effective supervision on the firmware transmission process is realized, and the error probability in the transmission process is reduced.
In addition, compared with the firmware upgrading scheme in the prior art, the firmware data processing method provided by the embodiment of the application can avoid the problems of data loss, loading failure, hardware failure and the like in the target firmware upgrading process to the maximum extent, and a perfect error reporting mechanism can help upper computer equipment to realize the effects of error real-time discovery, real-time troubleshooting and the like, so that a more reliable, more robust and more humanized firmware upgrading scheme is provided, and an effective method is provided for firmware upgrading and loading and later firmware repair.
Fig. 5 is a block diagram of a firmware data processing apparatus provided in an embodiment of the present application, where the apparatus is applied to a lower computer device, and as shown in fig. 5, the firmware data processing apparatus 400 may include: a memory 401 and a processor 402;
the memory 401 is used for executing: acquiring a firmware fragment data packet of a target firmware sent by upper computer equipment; the firmware fragment data packet comprises data fragment content and a first check code which is generated according to a preset rule and corresponds to the data fragment content;
the processor 402 is configured to perform:
the processor is used for generating a second check code corresponding to the acquired data fragment content of the firmware fragment data packet according to the preset rule;
and executing corresponding operation according to the second check code and the check result of the first check code.
Optionally, the processor is specifically configured to:
and sending a transmission error report request to the upper computer equipment under the condition that the second check code is different from the first check code.
Optionally, the memory is specifically configured to:
and under the condition that the second check code is the same as the first check code, continuously acquiring a next firmware fragment data packet sent by the upper computer equipment.
Optionally, the processor is specifically configured to perform:
the processor is further configured to:
generating third check codes corresponding to the data fragment contents of all the acquired firmware fragment data packets according to the preset rule;
sending the third check code to the upper computer equipment;
and under the condition of obtaining a confirmation instruction aiming at the third check code sent by the upper computer equipment, determining that the transmission of the target firmware is finished.
Optionally, the processor is further configured to:
and storing all firmware fragment data packets of the target firmware into a first flash memory space.
Optionally, the processor is further configured to:
modifying the zone bit of the first flash memory space into a first firmware zone bit;
and loading the target firmware according to the first firmware zone bit.
Optionally, the processor is specifically configured to:
according to the first firmware zone bit, extracting a firmware fragment data packet of the target firmware in the first flash memory space, and storing the firmware fragment data packet to a memory space;
generating fourth check codes corresponding to the data fragmentation contents of all firmware fragmentation data packets of the target firmware according to the preset rule;
and under the condition that the fourth check code is the same as the third check code, running the target firmware in the memory space.
Optionally, the processor is further configured to:
and sending a loading error reporting request to the upper computer equipment under the condition that the fourth check code is different from the third check code.
Optionally, the processor is further configured to:
under the condition that the fourth check code is different from the third check code, the first firmware zone bit is modified into a second firmware zone bit, and the second firmware zone bit is a zone bit written into a second flash memory space for firmware backup;
and loading the backup firmware in the second flash memory space according to the second firmware zone bit under the condition that the value of the second firmware zone bit is not 0.
Optionally, the processor is further configured to:
and sending a firmware error reporting request to the upper computer equipment under the condition that the number of times of modifying the firmware zone bit reaches a preset number of times.
Optionally, the memory is further configured to:
acquiring an update command sent by the upper computer equipment, wherein the update command comprises a first firmware version number of the target firmware;
the processor is further configured to:
and under the condition that the first firmware version number is greater than a second firmware version number of the local firmware of the lower computer equipment, entering the step of acquiring a firmware fragment data packet of the target firmware sent by the upper computer equipment.
Optionally, the lower computer device is a millimeter wave radar.
Optionally, the processor is further configured to:
and under the conditions that all firmware fragment data packets of the target firmware sent by the upper computer equipment are received and the verification operation of the check codes of the firmware fragment data packets is completed, the currently loaded firmware is changed into the target firmware, and the upgrading operation of the firmware of the millimeter wave radar is completed.
To sum up, the firmware data processing apparatus provided in the embodiment of the present application obtains a firmware fragment data packet of a target firmware sent by an upper computer device; the firmware fragment data packet comprises data fragment contents and a first check code which is generated according to a preset rule and corresponds to the data fragment contents; generating a second check code corresponding to the data fragment content of the acquired firmware fragment data packet according to a preset rule; and executing corresponding operation according to the second check code and the check result of the first check code. According to the method and the device, verification based on the check codes can be carried out on the content of each firmware fragment data packet of the received target firmware through the lower computer device, and whether the firmware fragment data packet is a correct data packet is judged, so that abnormal conditions such as data packet loss in the transmission process are identified, effective supervision on the firmware transmission process is realized, and the error probability in the transmission process is reduced.
Fig. 6 is a block diagram of a firmware data processing apparatus provided in an embodiment of the present application, where the apparatus is applied to an upper computer device, and as shown in fig. 6, the firmware data processing apparatus 500 may include a processor 501;
the processor is configured to perform:
segmenting a target firmware into a plurality of firmware segmentation data packets with preset file sizes;
generating a first check code corresponding to the data fragment content of the firmware fragment data packet according to a preset rule;
and sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment.
Optionally, the processor is further configured to:
and if a transmission error reporting request sent by the lower computer equipment is obtained, stopping sending the firmware fragment data packet to the lower computer equipment.
Optionally, the processor is further configured to:
generating fifth check codes corresponding to all data fragment contents of the target firmware according to the preset rule;
acquiring a third check code sent by the lower computer equipment;
and sending a confirmation instruction aiming at the third check code to the lower computer equipment under the condition that the third check code is the same as the fifth check code.
Optionally, the processor is further configured to:
and generating a firmware error alarm under the condition that the third check code is different from the fifth check code, and stopping the process for processing the target firmware after preset time.
Optionally, the processor is further configured to:
and sending an update command comprising the first firmware version number of the target firmware to the lower computer device.
Optionally, the processor is further configured to:
and determining the size of the preset file according to the length of the check code corresponding to the preset rule and the target bit error rate for transmitting the target firmware.
To sum up, the firmware data processing apparatus provided in the embodiment of the present application divides a target firmware into a plurality of firmware fragment data packets having a preset file size; generating a first check code corresponding to the data fragment content of the firmware fragment data packet according to a preset rule; and sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment. According to the method and the device, the target firmware can be segmented into the plurality of firmware segment data packets through the upper computer device, the first check codes corresponding to all the firmware segment data packets are added into the firmware segment data packets and issued to the lower computer device, the lower computer device verifies the content of each received firmware segment data packet of the target firmware based on the check codes to judge whether the firmware segment data packet is a correct data packet, abnormal conditions such as data packet loss and the like in the transmission process are identified, effective supervision on the firmware transmission process is achieved, and the error probability in the transmission process is reduced.
Referring to fig. 7, which shows a block diagram of a vehicle according to an embodiment of the present application, a vehicle 600 includes: a vehicle body 601; as shown in fig. 6, the firmware data processing device 500 is mounted on the body 601.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the firmware data processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The memory may be an interface for connecting an external control terminal with the firmware data processing device. For example, the external control terminal may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a control terminal having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The memory may be used to retrieve input (e.g., data information, power, etc.) from an external control terminal and transmit the retrieved input to one or more elements within the firmware data processing device or may be used to transmit data between the firmware data processing device and the external control terminal.
Such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor is a control center of the control terminal, is connected with each part of the whole control terminal by various interfaces and lines, and executes various functions and processing data of the control terminal by running or executing software programs and/or modules stored in the memory and calling data stored in the memory, thereby carrying out overall monitoring on the control terminal. A processor may include one or more processing units; preferably, the processor may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, control terminal, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create control terminals for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction control terminals which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The present application is described in detail above, and the principles and embodiments of the present application are described herein by using specific examples, which are only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (42)

1. A firmware data processing method is applied to lower computer equipment and is characterized by comprising the following steps:
acquiring a firmware fragment data packet of a target firmware sent by upper computer equipment; the firmware fragment data packet comprises data fragment content and a first check code which is generated according to a preset rule and corresponds to the data fragment content;
generating a second check code corresponding to the data fragmentation content of the acquired firmware fragmentation data packet according to the preset rule;
and executing corresponding operation according to the second check code and the check result of the first check code.
2. The method of claim 1, wherein the performing corresponding operations according to the checking results of the second checking code and the first checking code comprises:
and sending a transmission error report request to the upper computer equipment under the condition that the second check code is different from the first check code.
3. The method of claim 1, wherein the performing corresponding operations according to the checking results of the second checking code and the first checking code comprises:
and under the condition that the second check code is the same as the first check code, continuously acquiring a next firmware fragment data packet sent by the upper computer equipment.
4. The method according to claim 1, wherein in a case where all the firmware fragment packets sent by the upper computer device are acquired and the second check code and the first check code of the last acquired firmware fragment packet are the same, the method further comprises:
generating third check codes corresponding to the data fragment contents of all the acquired firmware fragment data packets according to the preset rule;
sending the third check code to the upper computer equipment;
and under the condition of obtaining a confirmation instruction aiming at the third check code sent by the upper computer equipment, determining that the transmission of the target firmware is finished.
5. The method of claim 4, wherein after the determining that the target firmware is transferred, the method further comprises:
and storing all firmware fragment data packets of the target firmware into a first flash memory space.
6. The method of claim 5, wherein after storing all firmware fragmentation packets of the target firmware into the first flash memory space, the method further comprises:
modifying the zone bit of the first flash memory space into a first firmware zone bit;
and loading the target firmware according to the first firmware zone bit.
7. The method of claim 6, wherein said loading said target firmware according to said first firmware flag bit comprises:
according to the first firmware zone bit, extracting a firmware fragment data packet of the target firmware in the first flash memory space, and storing the firmware fragment data packet to a memory space;
generating fourth check codes corresponding to the data fragmentation contents of all firmware fragmentation data packets of the target firmware according to the preset rule;
and running the target firmware in the memory space under the condition that the fourth check code is the same as the third check code.
8. The method of claim 7, further comprising:
and sending a loading error reporting request to the upper computer equipment under the condition that the fourth check code is different from the third check code.
9. The method of claim 7, further comprising:
under the condition that the fourth check code is different from the third check code, the first firmware zone bit is modified into a second firmware zone bit, and the second firmware zone bit is a zone bit written into a second flash memory space for firmware backup;
and loading the backup firmware in the second flash memory space according to the second firmware zone bit under the condition that the value of the second firmware zone bit is not 0.
10. The method of claim 9, further comprising:
and sending a firmware error reporting request to the upper computer equipment under the condition that the number of times of modifying the firmware zone bit reaches a preset number of times.
11. The method according to claim 1, wherein before the obtaining of the firmware fragment data packet of the target firmware sent by the upper computer device, the method further comprises:
acquiring an update command sent by the upper computer equipment, wherein the update command comprises a first firmware version number of the target firmware;
and under the condition that the first firmware version number is greater than a second firmware version number of the local firmware of the lower computer equipment, entering the step of acquiring a firmware fragment data packet of the target firmware sent by the upper computer equipment.
12. The method of claim 1, wherein the lower-computer device is a millimeter-wave radar.
13. The method of claim 12, further comprising:
and under the conditions that all firmware fragment data packets of the target firmware sent by the upper computer equipment are received and the verification operation of the check codes of the firmware fragment data packets is completed, the currently loaded firmware is changed into the target firmware, and the upgrading operation of the firmware of the millimeter wave radar is completed.
14. A firmware data processing method is applied to upper computer equipment and is characterized by comprising the following steps:
segmenting a target firmware into a plurality of firmware segmentation data packets with preset file sizes;
generating a first check code corresponding to the data fragment content of the firmware fragment data packet according to a preset rule;
and sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment.
15. The method of claim 14, wherein in sending the firmware fragment data packet including the first check code to the lower computer device, the method further comprises:
and if a transmission error reporting request sent by the lower computer equipment is obtained, stopping sending the firmware fragment data packet to the lower computer equipment.
16. The method of claim 14, further comprising:
generating fifth check codes corresponding to all data fragment contents of the target firmware according to the preset rule;
acquiring a third check code sent by the lower computer equipment;
and sending a confirmation instruction aiming at the third check code to the lower computer equipment under the condition that the third check code is the same as the fifth check code.
17. The method of claim 16, further comprising:
and generating a firmware error alarm under the condition that the third check code is different from the fifth check code, and stopping the process for processing the target firmware after preset time.
18. The method of claim 14, wherein prior to the sending the firmware fragment packet including the first check code to the lower computer device, the method further comprises:
and sending an update command comprising the first firmware version number of the target firmware to the lower computer device.
19. The method of claim 14, further comprising:
and determining the size of the preset file according to the length of the check code corresponding to the preset rule and the target bit error rate for transmitting the target firmware.
20. A firmware data processing apparatus, applied to a lower computer device, the apparatus comprising: a memory and a processor;
the memory is used for acquiring a firmware fragment data packet of the target firmware sent by the upper computer equipment; the firmware fragment data packet comprises data fragment content and a first check code which is generated according to a preset rule and corresponds to the data fragment content;
the processor is used for generating a second check code corresponding to the acquired data fragment content of the firmware fragment data packet according to the preset rule;
and executing corresponding operation according to the second check code and the check result of the first check code.
21. The apparatus of claim 20, wherein the processor is specifically configured to:
and sending a transmission error report request to the upper computer equipment under the condition that the second check code is different from the first check code.
22. The apparatus of claim 20, wherein the memory is specifically configured to:
and under the condition that the second check code is the same as the first check code, continuously acquiring a next firmware fragment data packet sent by the upper computer equipment.
23. The apparatus of claim 20, wherein the processor is further configured to:
generating third check codes corresponding to the data fragment contents of all the acquired firmware fragment data packets according to the preset rule;
sending the third check code to the upper computer equipment;
and under the condition of obtaining a confirmation instruction aiming at the third check code sent by the upper computer equipment, determining that the transmission of the target firmware is finished.
24. The apparatus of claim 23, wherein the processor is further configured to:
and storing all firmware fragment data packets of the target firmware into a first flash memory space.
25. The apparatus of claim 24, wherein the processor is further configured to:
modifying the zone bit of the first flash memory space into a first firmware zone bit;
and loading the target firmware according to the first firmware zone bit.
26. The apparatus of claim 25, wherein the processor is specifically configured to:
according to the first firmware zone bit, extracting a firmware fragment data packet of the target firmware in the first flash memory space, and storing the firmware fragment data packet to a memory space;
generating fourth check codes corresponding to the data fragmentation contents of all firmware fragmentation data packets of the target firmware according to the preset rule;
and running the target firmware in the memory space under the condition that the fourth check code is the same as the third check code.
27. The apparatus of claim 26, wherein the processor is further configured to:
and sending a loading error reporting request to the upper computer equipment under the condition that the fourth check code is different from the third check code.
28. The apparatus of claim 27, wherein the processor is further configured to:
under the condition that the fourth check code is different from the third check code, the first firmware zone bit is modified into a second firmware zone bit, and the second firmware zone bit is a zone bit written into a second flash memory space for firmware backup;
and loading the backup firmware in the second flash memory space according to the second firmware zone bit under the condition that the value of the second firmware zone bit is not 0.
29. The apparatus of claim 28, wherein the processor is further configured to:
and sending a firmware error reporting request to the upper computer equipment under the condition that the number of times of modifying the firmware zone bit reaches a preset number of times.
30. The apparatus of claim 20, wherein the memory is further configured to:
acquiring an update command sent by the upper computer equipment, wherein the update command comprises a first firmware version number of the target firmware;
the processor is further configured to:
and under the condition that the first firmware version number is greater than a second firmware version number of the local firmware of the lower computer equipment, entering the step of acquiring a firmware fragment data packet of the target firmware sent by the upper computer equipment.
31. The apparatus of claim 20, wherein the lower computer device is a millimeter wave radar.
32. The apparatus of claim 31, wherein the processor is further configured to:
and under the conditions that all firmware fragment data packets of the target firmware sent by the upper computer equipment are received and the verification operation of the check codes of the firmware fragment data packets is completed, the currently loaded firmware is changed into the target firmware, and the upgrading operation of the firmware of the millimeter wave radar is completed.
33. A firmware data processing apparatus, applied to an upper computer device, the apparatus comprising: a processor;
the processor is configured to:
segmenting a target firmware into a plurality of firmware segmentation data packets with preset file sizes;
generating a first check code corresponding to the data fragment content of the firmware fragment data packet according to a preset rule;
and sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment.
34. The apparatus of claim 33, wherein the processor is further configured to:
and if a transmission error reporting request sent by the lower computer equipment is obtained, stopping sending the firmware fragment data packet to the lower computer equipment.
35. The apparatus of claim 33, wherein the processor is further configured to:
generating fifth check codes corresponding to all data fragment contents of the target firmware according to the preset rule;
acquiring a third check code sent by the lower computer equipment;
and sending a confirmation instruction aiming at the third check code to the lower computer equipment under the condition that the third check code is the same as the fifth check code.
36. The apparatus of claim 33, wherein the processor is further configured to:
and generating a firmware error alarm under the condition that the third check code is different from the fifth check code, and stopping the process for processing the target firmware after preset time.
37. The apparatus of claim 33, wherein the processor is further configured to:
and sending an update command comprising the first firmware version number of the target firmware to the lower computer device.
38. The apparatus of claim 33, wherein the processor is further configured to:
and determining the size of the preset file according to the length of the check code corresponding to the preset rule and the target bit error rate for transmitting the target firmware.
39. A firmware data processing system, the system comprising:
an upper computer device and a lower computer device;
the upper computer equipment is used for segmenting the target firmware into a plurality of firmware fragment data packets with preset file sizes and generating first check codes corresponding to data fragment contents of the firmware fragment data packets according to preset rules; sending the firmware fragmentation data packet comprising the first check code to the lower computer equipment;
the lower computer equipment is used for acquiring a firmware fragment data packet of the target firmware sent by the upper computer equipment and generating a second check code corresponding to the data fragment content of the acquired firmware fragment data packet according to the preset rule; and executing corresponding operation according to the second check code and the check result of the first check code.
40. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing a firmware data processing method as claimed in any one of claims 1 to 19.
41. A vehicle, characterized by comprising:
a vehicle body;
the device of any one of claims 20 to 32, mounted to the vehicle body.
42. A computer-readable storage medium characterized by comprising instructions that, when executed on a computer, cause the computer to perform the firmware data processing method of any one of claims 1 to 19.
CN202080074505.6A 2020-12-03 2020-12-03 Firmware data processing method and device Pending CN114616544A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/133622 WO2022116088A1 (en) 2020-12-03 2020-12-03 Firmware data processing method and apparatus

Publications (1)

Publication Number Publication Date
CN114616544A true CN114616544A (en) 2022-06-10

Family

ID=81853786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080074505.6A Pending CN114616544A (en) 2020-12-03 2020-12-03 Firmware data processing method and device

Country Status (2)

Country Link
CN (1) CN114616544A (en)
WO (1) WO2022116088A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118718A (en) * 2022-08-30 2022-09-27 深圳市华曦达科技股份有限公司 Android terminal device upgrade updating method and system and readable storage medium
CN116166332A (en) * 2023-04-25 2023-05-26 深圳艾为电气技术有限公司 Method, device, equipment and medium for parallel loading of compressor driver
CN116185512A (en) * 2023-04-25 2023-05-30 深圳艾为电气技术有限公司 Drive loading method, device, equipment and medium for PTC driver

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115085869A (en) * 2022-06-30 2022-09-20 咪咕动漫有限公司 Data transmission method, device, equipment and storage medium
CN114884624B (en) * 2022-07-08 2022-12-09 广州思德医疗科技有限公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354070A (en) * 2015-12-11 2016-02-24 成都广达新网科技股份有限公司 Method for upgrading equipment firmware through I2C
CN106911428A (en) * 2017-02-23 2017-06-30 北京龙鼎源科技股份有限公司 The transmission method and device of information
CN106991326A (en) * 2017-03-02 2017-07-28 深圳怡化电脑股份有限公司 The upgrade method and its equipment of a kind of equipment firmware
US20200104504A1 (en) * 2018-09-28 2020-04-02 Dell Products L.P. Information handling system firmware bit error detection and correction

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11137995B2 (en) * 2019-02-13 2021-10-05 International Business Machines Corporation Updating firmware of a microcontroller
CN111460437A (en) * 2020-04-03 2020-07-28 江苏芯盛智能科技有限公司 Firmware running method and device, firmware burning method and device and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354070A (en) * 2015-12-11 2016-02-24 成都广达新网科技股份有限公司 Method for upgrading equipment firmware through I2C
CN106911428A (en) * 2017-02-23 2017-06-30 北京龙鼎源科技股份有限公司 The transmission method and device of information
CN106991326A (en) * 2017-03-02 2017-07-28 深圳怡化电脑股份有限公司 The upgrade method and its equipment of a kind of equipment firmware
US20200104504A1 (en) * 2018-09-28 2020-04-02 Dell Products L.P. Information handling system firmware bit error detection and correction

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118718A (en) * 2022-08-30 2022-09-27 深圳市华曦达科技股份有限公司 Android terminal device upgrade updating method and system and readable storage medium
CN116166332A (en) * 2023-04-25 2023-05-26 深圳艾为电气技术有限公司 Method, device, equipment and medium for parallel loading of compressor driver
CN116185512A (en) * 2023-04-25 2023-05-30 深圳艾为电气技术有限公司 Drive loading method, device, equipment and medium for PTC driver
CN116166332B (en) * 2023-04-25 2023-09-29 深圳艾为电气技术有限公司 Method, device, equipment and medium for parallel loading of compressor driver

Also Published As

Publication number Publication date
WO2022116088A1 (en) 2022-06-09

Similar Documents

Publication Publication Date Title
CN114616544A (en) Firmware data processing method and device
CN110621011A (en) OTA firmware upgrading method and system based on Bluetooth device end
EP3933573B1 (en) Zero differential upgrade method, non-volatile storage medium and electronic device
CN111290769B (en) Method for updating configuration data on line
CN105183515A (en) Cloud deck firmware updating method and device
CN111158751B (en) Windows environment deployment method, electronic device and storage medium
WO2012012933A1 (en) Processing devices and methods for transmitting and receiving data
CN104348578A (en) Data processing method and device
CN114612101A (en) Reliable inter-link route cross-link method and system for connection
CN109918108A (en) A kind of embedded equipment plug-in upgrade method and device
CN111611002B (en) Data upgrading method, device, computer equipment and storage medium
CN112035135A (en) Method, apparatus and storage medium for updating firmware program of slave station apparatus
CN110990046A (en) Upgrading method based on dynamic file
CN111522571A (en) Equipment upgrading method and device, terminal equipment and storage medium
CN112181454B (en) Remote upgrading system and method for unattended equipment
KR101436135B1 (en) software update apparatus for slave device
CN111813597A (en) Air conditioner
US11868758B2 (en) Method for improving the updating of firmware and system applying the method
CN113703822B (en) Differential upgrading method and device and operation machine
CN114268624B (en) Version file transmission method and device and server
CN114579166A (en) Component module upgrading method, component module and financial robot
CN117486085A (en) Tower crane control method, device and system
CN114095954B (en) UART-based wireless communication module upgrading method
CN117908918A (en) Equipment firmware upgrading method and system based on Ethernet transmission
CN118316757A (en) Automatic link data error correction method and system for Ethernet communication bus

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220610