Method for improving speed of upgrading Beidou anti-interference software through serial port

By configuring the serial port upgrade tool parameters and index dictionary to optimize firmware transmission and decompression, the problem of long Beidou anti-interference software upgrade time was solved, the firmware size was reduced and the upgrade speed was increased, thereby improving development and maintenance efficiency.

CN120631408APending Publication Date: 2025-09-12CHENGDU GUOXING COMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511011238.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The Beidou anti-interference software firmware upgrade process is time-consuming, affecting the development cycle and wasting resources, especially during batch upgrades on the production line.

Method used

By configuring the serial port upgrade tool parameters, building an index dictionary, preprocessing and encoding the firmware, and using zero data padding and predefined index dictionaries for data transmission and decompression, the firmware file transmission and decompression process is optimized.

Benefits of technology

Significantly reduces firmware size, reduces transmission time, improves software development and maintenance efficiency, reduces manpower and time costs, and is suitable for the iteration of anti-interference technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631408A_ABST
    Figure CN120631408A_ABST
Patent Text Reader

Abstract

The invention discloses a method for improving the speed of upgrading Beidou anti-interference software through a serial port, and the method comprises the following steps: S1, configuring related parameters required by a serial port upgrading tool, and constructing an index dictionary; s2, preprocessing firmware of the anti-interference software, and performing coding compression; s3, sending the recoded and compressed firmware to the Beidou terminal equipment through the serial port upgrading tool; and S4, the Beidou terminal equipment receives the recoded and compressed firmware, decompresses and verifies the recoded and compressed firmware and writes the recoded and compressed According to the method, the scale of the firmware is remarkably reduced and the transmission time consumption in the firmware upgrading process is reduced in a mode of marking zero data filling and compressed encoding, meanwhile, the speed of upgrading anti-interference processing software by the serial port is finally improved by optimizing the decompression speed, the efficiency of software development and maintenance is improved, and the development and maintenance cost is reduced. Waste of manpower and time cost and occupation of hardware resources are reduced, and the method can be more conveniently suitable for iteration of an anti-interference technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software serial port upgrade, and in particular to a method for improving the speed of upgrading Beidou anti-interference software through a serial port. Background Art

[0002] With the completion of my country's BeiDou-3 satellite navigation system, BeiDou navigation has expanded from regional services to global networking, with its application scenarios expanding and its scope becoming increasingly broad. BeiDou anti-interference processing is one of the core technologies that ensures the stable and reliable operation of BeiDou satellite navigation terminal equipment in complex electromagnetic environments. Anti-interference software requires specific detection and suppression algorithms for different operating frequencies, different navigation systems, different application scenarios, and different types of interference signals, significantly increasing the scale of anti-interference software. Firmware upgrades require long wait times, extending the development cycle and reducing development iteration efficiency. This is especially true when batch software upgrades are required on production lines, which can take even longer and impact the execution of other tasks, resulting in significant waiting time, cost, and wasted resources. Summary of the Invention

[0003] In order to solve the above problems, the present invention provides a method for improving the speed of serial port upgrading Beidou anti-interference software, comprising the following steps: S1. configuring the relevant parameters required by the serial port upgrading tool and building an index dictionary; S2. preprocessing the firmware of the anti-interference software and performing encoding compression; S3. sending the re-encoded and compressed firmware to the Beidou terminal device through the serial port upgrading tool; S4. The Beidou terminal device receives the re-encoded and compressed firmware, decompresses and verifies it, and then writes it into the memory.

[0004] Furthermore, the relevant parameters required by the serial port upgrade tool in step S1 specifically include: baud rate, data bits, stop bits, check bits, check mode, and control flow.

[0005] Furthermore, the S2 step specifically includes the following sub-steps: S21. Scan the firmware data block and mark the continuous zero-filled interval to generate a metadata header; S22. Determine the compressible data in the firmware data and exclude incompressible binary instructions or random data; S23. Perform frequency statistics on the bytes in each block in the firmware, generate a frequency table and construct a binary coding tree; S24. Reconstruct the coding scheme based on the binary coding tree; S25. Generate a new firmware that has been re-encoded and compressed.

[0006] Furthermore, the metadata header in the step S21 includes: a starting address and a data length; and the compressible data in the step S22 specifically includes: a code segment, a constant table, and configuration parameters.

[0007] Furthermore, the reconstructed coding scheme in step S24 is specifically as follows: let the symbol set be ,symbol The probability of occurrence is , whose encoding length is , its average code length The following formula should be satisfied: .

[0008] Furthermore, step S3 specifically includes the following sub-steps: S31. Establishing a communication link with the Beidou terminal device via a physical interface and performing signature verification on the firmware to be upgraded to prevent illegal firmware injection; S32. Sending a specific command or protocol header to the Beidou terminal device to request and confirm the upgrade handshake; S33. Packaging the firmware file to be upgraded into fixed-size packages; S34. Sending the packaged firmware files to the Beidou terminal device in sequence. If a data transmission anomaly occurs, transmission anomaly handling is performed: resuming transmission from a breakpoint, retransmitting after a timeout, and data rollback.

[0009] Furthermore, each data packet of the firmware file after subpackaging and encapsulation in step S33 includes: a frame header, a frame trailer, a packet sequence number, a data length, a data content, a process stage, a check code, and an end code.

[0010] Furthermore, the S4 step specifically includes the following sub-steps: S41. Initialize the memory of the data marked as the metadata header and skip the decoding process; S42. Decompress the compressed firmware using the index dictionary and perform data integrity and validity verification; S43. Write the verified firmware into the designated storage area, and feedback the serial port status result after rereading the data for verification.

[0011] Furthermore, it also includes the pre-construction steps: S0. Build the Beidou terminal equipment software upgrade platform and ensure that each functional module of the equipment operates normally.

[0012] The present invention provides a method for improving the speed of upgrading Beidou anti-interference software via a serial port, which has the following beneficial effects: The present invention significantly reduces the size of firmware and reduces the transmission time consumption during the firmware upgrade process by marking zero data padding and compression encoding. At the same time, the decompression speed is optimized by means of a zero data padding skip mechanism and a predefined index dictionary, thereby ultimately achieving an improvement in the speed of serial port upgrade anti-interference processing software, improving the efficiency of software development and maintenance, reducing the waste of manpower and time costs and the occupation of hardware resources, and being more conveniently applicable to the iteration of anti-interference technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0014] Figure 1 The present invention provides a flow chart of the method. DETAILED DESCRIPTION

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

[0016] The following describes the implementation method of the present invention in detail with reference to the accompanying drawings. The description only includes some embodiments, not all embodiments. For the purpose of clarity, representations and descriptions that are not related to the present invention are omitted in the drawings and descriptions.

[0017] In order to have a clearer understanding of the technical features, purposes and beneficial effects of the present invention, the technical solutions of the present invention are now described in detail below. Obviously, the implementation cases described are part of the embodiments of the present invention, not all of them, and should not be understood as limiting the scope of the implementation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0018] The purpose of the present invention is to improve the loading speed when upgrading and updating Beidou anti-interference software using a serial port. Specifically, a predefined index dictionary is established by counting the probability of characters appearing in the firmware. At the sending end, the firmware file to be transmitted is compressed and encoded by the index dictionary, redundant information is removed, and compressed firmware is generated. At the receiving end, the same index dictionary and a zero data padding skip mechanism are used to reorganize the data, restore the original firmware data, and write it into a storage area.

[0019] Due to the specialized applications of Beidou terminal devices, their software and firmware updates often utilize local UART / serial upgrades, primarily involving serial upgrade tools, executable files, and Beidou terminal devices. Local UART / serial upgrades for Beidou terminal devices involve sending firmware files to the device via the serial upgrade tool. This approach offers advantages such as ease of use and versatility, making it suitable for development and debugging, production line programming, and on-site maintenance. However, its disadvantage is its slow speed. To ensure upgrade reliability, the serial port baud rate is typically set to 115200bps.

[0020] The serial port upgrade tool is a general serial port tool such as CecureCRT and Xshell, or a dedicated firmware update tool developed by the Beidou terminal manufacturer. It is mainly used to send firmware to the Beidou terminal, display the upgrade progress, and provide feedback on the upgrade results.

[0021] like Figure 1 As shown, the present invention provides a method for improving the speed of upgrading Beidou anti-interference software through a serial port, comprising the following steps: S1. Configure the relevant parameters required by the serial port upgrade tool (baud rate, data bits, stop bits, parity bit, verification mode, control flow) and build an index dictionary.

[0022] S2. Pre-process the firmware of the anti-interference software and perform encoding compression: S21. Scan the firmware data block and mark the continuous zero-fill interval, generating a metadata header including the starting address and data length.

[0023] S22. Determine compressible data (code segments, constant tables, configuration parameters) in the firmware data and exclude incompressible binary instructions or random data.

[0024] S23. Perform frequency statistics on the bytes in each block of the firmware, generate a frequency table, and construct a binary coding tree. TmpNode is used as the node to move to in the binary tree, curNode is used as the node where the last move stopped, and rootNode is used as the root node.

[0025] S24. Reconstruct the coding scheme based on the binary coding tree: Let the symbol set be ,symbol The probability of occurrence is , whose encoding length is , its average code length The following formula should be satisfied: .

[0026] S25. Generate a new firmware after re-encoding and compression.

[0027] S3. Send the re-encoded and compressed firmware to the Beidou terminal device through the serial port upgrade tool: S31. Establish a communication link with the Beidou terminal device through the physical interface and perform signature verification on the firmware to be upgraded to prevent illegal firmware injection.

[0028] S32. Send specific instructions or protocol headers to the Beidou terminal device to request and confirm the upgrade handshake.

[0029] S33. The firmware file to be upgraded is sub-packaged and encapsulated according to a fixed size; wherein each package of the sub-packaged firmware file includes: a frame header, a frame trailer, a packet sequence number, a data length, a data content, a process stage, a check code, and an end code.

[0030] S34. Send the subpackaged firmware files to the BeiDou terminal device in sequence. If a data transmission anomaly occurs, perform transmission anomaly handling: breakpoint resume, timeout retransmission, and data rollback.

[0031] S4. The Beidou terminal receives the re-encoded and compressed firmware, decompresses and verifies it, and then writes it to the memory: S41. Initialize the memory of the data marked as the metadata header and skip the decoding process.

[0032] S42. Decompress the compressed firmware using the index dictionary and perform data integrity and validity verification.

[0033] S43. Write the verified firmware into the designated storage area, reread the data to verify it, and then feed back the serial port status result.

[0034] It also includes the pre-construction steps: S0. Build the Beidou terminal equipment software upgrade platform and ensure that all functional modules of the equipment operate normally.

[0035] In this implementation, a compiler tool first converts high-level language into binary code executable by the target hardware. Firmware data is then analyzed to calculate the probability of each byte occurring. The firmware characters are then re-encoded based on this probability to reduce the size of the original firmware. Consecutive zero-padding data is also marked. The compressed firmware is then sent to a Beidou terminal device using a serial port upgrade tool. The terminal device skips decoding data marked as zero-padding and decodes unmarked data. Finally, the firmware is updated according to the pre-defined software upgrade process.

[0036] The present invention reduces the transmission time during the software upgrade process by compressing the size of the original anti-interference software firmware. At the same time, it optimizes the decompression speed through a zero data padding skip mechanism, thereby improving the speed of serial port anti-interference software upgrade.

[0037] The present invention significantly reduces the size of firmware and reduces the transmission time consumption during the firmware upgrade process by marking zero data padding and compression encoding. At the same time, the decompression speed is optimized by means of a zero data padding skip mechanism and a predefined index dictionary, thereby ultimately achieving an improvement in the speed of serial port upgrade anti-interference processing software, improving the efficiency of software development and maintenance, reducing the waste of manpower and time costs and the occupation of hardware resources, and being more conveniently applicable to the iteration of anti-interference technology.

[0038] The foregoing description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Rather, the present invention can be used in various other combinations, modifications, and environments and can be modified within the scope of the concept described herein through the above teachings or techniques or knowledge in the relevant field. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be protected by the appended claims.

Claims

1. A method for improving the speed of upgrading Beidou anti-interference software via serial port, characterized in that: The following steps are involved: S1. Configure the relevant parameters required by the serial port upgrade tool and build an index dictionary; S2. Preprocess the firmware of the anti-interference software and perform encoding compression; S3. Send the re-encoded and compressed firmware to the Beidou terminal device via the serial port upgrade tool. S4. The Beidou terminal device receives the re-encoded and compressed firmware, decompresses and verifies it, and then writes it into the memory.

2. The method for improving the speed of serial port upgrading Beidou anti-interference software according to claim 1, characterized in that: The relevant parameters required by the serial port upgrade tool in step S1 specifically include: baud rate, data bits, stop bits, check bits, check mode, and control flow.

3. The method for improving the speed of serial port upgrading Beidou anti-interference software according to claim 1, characterized in that: The S2 step specifically includes the following sub-steps: S21. Scan the firmware data block and mark the continuous zero-fill interval to generate the metadata header; S22 determines the compressible data in the firmware data, excluding incompressible binary instructions or random data; S23. Perform frequency statistics on the bytes in each block in the firmware, generate a frequency table and construct a binary coding tree; S24. Reconstruct the coding scheme according to the binary coding tree; S25. Generate a new firmware after re-encoding and compression.

4. The method for improving the speed of serial port upgrading Beidou anti-interference software according to claim 3, characterized in that: The metadata header in step S21 includes: a starting address and a data length; The compressible data in step S22 specifically includes: code segments, constant tables, and configuration parameters.

5. The method for improving the speed of upgrading Beidou anti-interference software via serial port according to claim 3, characterized in that: The reconstructed coding scheme in step S24 is specifically as follows: let the symbol set be ,symbol The probability of occurrence is , whose encoding length is , its average code length The following formula should be satisfied: .

6. The method for improving the speed of upgrading Beidou anti-interference software via serial port according to claim 1, characterized in that: The S3 step specifically includes the following sub-steps: S31. Establish a communication link with the BeiDou terminal device through a physical interface and perform signature verification on the firmware to be upgraded; S32 sends a specific command or protocol header to the Beidou terminal device to upgrade the handshake request and confirmation; S33. The firmware file to be upgraded is packaged in fixed size packages; S34. Send the subpackaged and encapsulated firmware files to the Beidou terminal device in sequence.

7. The method for improving the speed of serial port upgrading Beidou anti-interference software according to claim 6, characterized in that: Each data packet of the firmware file after subpackaging and encapsulation in step S33 includes: a frame header, a frame trailer, a packet sequence number, a data length, a data content, a process stage, a check code, and an end code.

8. The method for improving the speed of serial port upgrading Beidou anti-interference software according to claim 1, characterized in that: The S4 step specifically includes the following sub-steps: S41. Initialize the memory of the data marked as metadata header and skip the decoding process; S42 uses the index dictionary to decompress the compressed firmware and perform data integrity and validity verification; S43. Write the verified firmware into the designated storage area, reread the data to verify it, and then feed back the serial port status result.

9. The method for improving the speed of upgrading Beidou anti-interference software via serial port according to claim 1, characterized in that: It also includes the pre-construction steps: S0. Build the Beidou terminal equipment software upgrade platform and ensure that all functional modules of the equipment operate normally.