CN109558156B - Upgrading optimization method for automobile instrument - Google Patents

Upgrading optimization method for automobile instrument Download PDF

Info

Publication number
CN109558156B
CN109558156B CN201910037419.7A CN201910037419A CN109558156B CN 109558156 B CN109558156 B CN 109558156B CN 201910037419 A CN201910037419 A CN 201910037419A CN 109558156 B CN109558156 B CN 109558156B
Authority
CN
China
Prior art keywords
file
compressed
upgrade
automobile instrument
storage unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910037419.7A
Other languages
Chinese (zh)
Other versions
CN109558156A (en
Inventor
曹国庆
苑大明
马奇林
何婷婷
周鑫
向志华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Delco Electronic Instrument Co ltd
Original Assignee
Chongqing Delco Electronic Instrument 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 Chongqing Delco Electronic Instrument Co ltd filed Critical Chongqing Delco Electronic Instrument Co ltd
Priority to CN201910037419.7A priority Critical patent/CN109558156B/en
Publication of CN109558156A publication Critical patent/CN109558156A/en
Application granted granted Critical
Publication of CN109558156B publication Critical patent/CN109558156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an automobile instrument upgrading optimization method, which comprises the following steps: s1, acquiring a pre-upgraded compression uploading file identified by the automobile instrument; s2, uploading the compressed uploading file to an automobile instrument; s3, decompressing the compressed uploading file; and S4, writing the decompressed compressed uploading file into the automobile instrument. The method and the system can greatly shorten the upgrading time of the automobile instrument software, reduce the waiting time of a user and improve the experience of the user.

Description

Upgrading optimization method for automobile instrument
Technical Field
The invention relates to the technical field of automobile instrument software upgrading, in particular to an automobile instrument upgrading optimization method.
Background
The automobile instrument is the most important part of the automobile, is the most direct way for the driver to know the real-time state of the automobile, and the normal and reliable running of the instrument is related to the safety of driving. In order to be able to adapt better to the latest state of the vehicle, it is often necessary to upgrade the meters. For the instrument monomer which is not loaded yet, software upgrading is usually carried out by using a serial port tool after the instrument is disassembled, and for the instrument which is loaded already, if the instrument is disassembled and the serial port upgrading is used, customer complaints are likely to be caused, so a simple, convenient and quick software upgrading mode is needed at this time.
With the increasing degree of economic globalization and automobile internationalization, the OBD system serving as the driving and emission diagnosis basis is widely implemented and applied. It is common to use a CAN tool to send the software to be updated to the meter via the on-board OBD interface for on-line upgrade. Because the software of the application layer of the meter is relatively small and generally does not reach 1024KB, the software upgrading mode can be used for rapidly updating and upgrading the software of the application layer of the meter. However, if image data occupying a larger space in the meter is to be upgraded, the time consumed by such an upgrading method is very much. If the time for upgrading is too long, other unstable factors can occur in the upgrading process to cause the upgrading of the instrument to fail, so that an optimization method is needed to shorten the upgrading time.
Disclosure of Invention
The invention aims to at least solve the technical problems in the prior art, and particularly creatively provides an automobile instrument upgrading optimization method.
In order to achieve the above object, the present invention provides an automobile instrument upgrading optimization method, which includes the following steps:
s1, acquiring a pre-upgraded compression uploading file identified by the automobile instrument;
s2, uploading the compressed uploading file to an automobile instrument;
s3, decompressing the compressed uploading file;
and S4, writing the decompressed compressed uploading file into the automobile instrument.
The invention greatly shortens the upgrading time of the automobile instrument software, reduces the waiting time of users and improves the experience of the users.
In a preferred embodiment of the present invention, the step S1 of obtaining the pre-upgraded compressed upload file identified by the vehicle instrument includes the following steps:
s11, compressing the pre-upgraded uploaded file to obtain a compressed file;
and S12, making the compressed file into a compressed uploading file for automobile instrument identification.
In a preferred embodiment of the present invention, in step S1, the method for compressing the pre-upgraded uploaded file to obtain a compressed file includes the following steps:
s100, writing an upgrade file into the automobile instrument, wherein the size of the upgrade file is smaller than or equal to the size of the remaining storage space of the automobile instrument;
s101, dividing a storage space occupied by an upgrade file into M storage units, wherein M is a positive integer greater than or equal to 2, and the size of the storage space of each storage unit is equal or unequal or not equal;
s102, dividing the residual operation space of the automobile instrument into N operation units, wherein N is a positive integer greater than or equal to 2, and the operation spaces of the operation units are equal or unequal or not equal;
s103, compressing the upgrade files in one or more or all storage units to an operation unit to obtain compressed files; the space size of the operation unit is larger than or equal to the size of the compressed upgrade file of the corresponding storage unit;
s104, decompressing the compressed file to an unused operation unit to obtain a decompressed file; the size of the unused space of the operation unit is larger than or equal to the size of the storage space occupied by the corresponding upgrade file; if the size of the unused space of the operation unit is smaller than the size of the storage space occupied by the corresponding upgrade file, returning to the step S101 to divide the storage unit and the operation unit again;
s105, judging whether the data in the decompressed file is the same as the data in the corresponding upgraded file:
if the data in the decompressed file is different from the data in the corresponding upgrade file, the error rcnti is 1, and i is the serial number of the storage unit; step S109 is executed;
if the data in the decompressed file is the same as the data in the corresponding upgrade file, the error rcnti is 0; executing step S106; by judging whether the data in the decompressed file is the same as the data in the corresponding upgraded file or not, the verification of the compression and decompression algorithms is realized, and the error rate of the algorithms is reduced.
S106, recording the CRC value of the compressed file and the length of the compressed file;
s107, erasing the upgrade files stored in the storage unit corresponding to the compressed files, and judging whether all the upgrade files stored in the storage unit corresponding to the compressed files are erased:
if the upgrade files stored in the storage unit corresponding to the compressed file are not completely erased, the testatej is 3, and j is the serial number of the storage unit; executing step S109 or S107;
if all the upgrade files stored in the storage unit corresponding to the compressed file are erased, the testatej is 2; step S108 is executed;
s108, writing the compressed file corresponding to the upgrade file into the storage unit corresponding to the upgrade file, and judging whether the compressed file corresponding to the upgrade file is completely written into the storage unit corresponding to the upgrade file:
if the compressed file corresponding to the upgrade file is not completely written into the storage unit corresponding to the upgrade file, the testatej is 4; executing step S109 or S107;
if the compressed file corresponding to the upgrade file is completely written into the storage unit corresponding to the upgrade file, the testatej is 2; step S109 is executed;
s109, judging whether the compression is successful:
if the testatej is 2 and the errorcnti is 0, the upgrade file is compressed successfully; executing S110;
if the testatej is not equal to 2 or the errorcnti is not equal to 0, the compression of the upgrade file is unsuccessful; executing S110 or S100;
and S110, ending.
In a preferred embodiment of the present invention, in step S12, the method for making the compressed file into the compressed upload file for the car meter recognition comprises the following steps:
s200, extracting the compressed files in the M storage units;
s201, acquiring the lengths of compressed files of M storage units;
acquiring CRC check values of the compressed files of the M storage units;
and S203, making the compressed file extracted in the step S200, the length of the compressed file acquired in the step S201 and the CRC (cyclic redundancy check) value of the compressed file into a compressed uploading file identified by the automobile instrument.
In a preferred embodiment of the present invention, the following steps are further included between step S2 and step S3:
s300, calculating the CRC value of the uploaded compressed file, and comparing whether the CRC value of the uploaded compressed file is the same as the uploaded CRC value:
if the CRC check value of the uploaded compressed file is the same as the uploaded CRC check value, performing step S3;
if the CRC check value of the uploaded compressed file is not the same as the uploaded CRC check value, step S2 is executed.
In a preferred embodiment of the present invention, between step S3 and step S4, the method further comprises:
and S400, erasing the storage space.
In a preferred embodiment of the present invention, the compression method comprises the steps of:
s500, checking Data of a Data segment which is not coded yet, trying to find out a matching character string which meets requirements and is the longest in a Search Buffer Data segment, if the matching character string can be found, executing a step S501, and if not, executing a step S503;
s501, after finding out the Character string, outputting a ternary symbol group (Offset, Length, Character);
wherein Offset is the Offset length of the matching character string in the Search Buffer data segment relative to the Search Buffer data segment boundary; length is the length of the matching character string; character is the next Character; then sliding the Search Buffer data segment to the direction which is not coded by 1, and repeating the step S500;
s503, if the Character string which can be matched is not found in the Search Buffer data segment, outputting a ternary symbol group (0, 0, Character); then, the Search Buffer data segment is slid 1 in the direction that has not been encoded, and step S500 is repeated. The compression method has short compression time and reduces the waiting time of users.
In a preferred embodiment of the invention, the decompression method is the inverse of the compression method.
In conclusion, due to the adoption of the technical scheme, the upgrading time of the automobile instrument software can be greatly shortened, the waiting time of a user is reduced, and the user experience is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic block diagram of the process of the present invention.
FIG. 2 is a block diagram illustrating the flow of an embodiment of the present invention.
FIG. 3 is a block diagram illustrating the first 31.5M upgrade file compression process of FIG. 2 according to the present invention.
Fig. 4 is a schematic block diagram of the compression process of the later 32M upgrade file in fig. 2 according to the present invention.
FIG. 5 is a schematic block diagram of a Flash cutting process in FIG. 2 according to the present invention.
Fig. 6 is a schematic block diagram of the uploading, decompressing and writing process of the compressed upload file in fig. 2 according to the present invention.
Fig. 7 is a schematic block diagram of the compression method of the present invention.
Fig. 8 is a schematic diagram of the compression method of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
The invention provides an automobile instrument upgrading optimization method, which comprises the following steps as shown in figure 1:
s1, acquiring a pre-upgraded compression uploading file identified by the automobile instrument;
s2, uploading the compressed uploading file to an automobile instrument;
s3, decompressing the compressed uploading file;
and S4, writing the decompressed compressed uploading file into the automobile instrument.
In a preferred embodiment of the present invention, the step S1 of obtaining the pre-upgraded compressed upload file identified by the vehicle instrument includes the following steps:
s11, compressing the pre-upgraded uploaded file to obtain a compressed file;
and S12, making the compressed file into a compressed uploading file for automobile instrument identification.
In a preferred embodiment of the present invention, in step S1, the method for compressing the pre-upgraded uploaded file to obtain a compressed file includes the following steps:
s100, writing an upgrade file into the automobile instrument, wherein the size of the upgrade file is smaller than or equal to the size of the remaining storage space of the automobile instrument;
s101, dividing a storage space occupied by an upgrade file into M storage units, wherein M is a positive integer greater than or equal to 2, and the size of the storage space of each storage unit is equal or unequal or not equal;
s102, dividing the residual operation space of the automobile instrument into N operation units, wherein N is a positive integer greater than or equal to 2, and the operation spaces of the operation units are equal or unequal or not equal;
s103, compressing the upgrade files in one or more or all storage units to an operation unit to obtain compressed files; the space size of the operation unit is larger than or equal to the size of the compressed upgrade file of the corresponding storage unit;
s104, decompressing the compressed file to an unused operation unit to obtain a decompressed file; the size of the unused space of the operation unit is larger than or equal to the size of the storage space occupied by the corresponding upgrade file; if the size of the unused space of the operation unit is smaller than the size of the storage space occupied by the corresponding upgrade file, returning to the step S101 to divide the storage unit and the operation unit again;
s105, judging whether the data in the decompressed file is the same as the data in the corresponding upgraded file:
if the data in the decompressed file is different from the data in the corresponding upgrade file, the error rcnti is 1, and i is the serial number of the storage unit; step S109 is executed;
if the data in the decompressed file is the same as the data in the corresponding upgrade file, the error rcnti is 0; executing step S106;
s106, recording the CRC value of the compressed file and the length of the compressed file;
s107, erasing the upgrade files stored in the storage unit corresponding to the compressed files, and judging whether all the upgrade files stored in the storage unit corresponding to the compressed files are erased:
if the upgrade files stored in the storage unit corresponding to the compressed file are not completely erased, the testatej is 3, and j is the serial number of the storage unit; executing step S109 or S107;
if all the upgrade files stored in the storage unit corresponding to the compressed file are erased, the testatej is 2; step S108 is executed;
s108, writing the compressed file corresponding to the upgrade file into the storage unit corresponding to the upgrade file, and judging whether the compressed file corresponding to the upgrade file is completely written into the storage unit corresponding to the upgrade file:
if the compressed file corresponding to the upgrade file is not completely written into the storage unit corresponding to the upgrade file, the testatej is 4; executing step S109 or S107;
if the compressed file corresponding to the upgrade file is completely written into the storage unit corresponding to the upgrade file, the testatej is 2; step S109 is executed;
s109, judging whether the compression is successful:
if the testatej is 2 and the errorcnti is 0, the upgrade file is compressed successfully; executing S110;
if the testatej is not equal to 2 or the errorcnti is not equal to 0, the compression of the upgrade file is unsuccessful; executing S110 or S100;
and S110, ending.
In a preferred embodiment of the present invention, in step S12, the method for making the compressed file into the compressed upload file for the car meter recognition comprises the following steps:
s200, extracting the compressed files in the M storage units;
s201, acquiring the lengths of compressed files of M storage units;
acquiring CRC check values of the compressed files of the M storage units;
and S203, making the compressed file extracted in the step S200, the length of the compressed file acquired in the step S201 and the CRC (cyclic redundancy check) value of the compressed file into a compressed uploading file identified by the automobile instrument.
In a preferred embodiment of the present invention, the following steps are further included between step S2 and step S3:
s300, calculating the CRC value of the uploaded compressed file, and comparing whether the CRC value of the uploaded compressed file is the same as the uploaded CRC value:
if the CRC check value of the uploaded compressed file is the same as the uploaded CRC check value, performing step S3;
if the CRC check value of the uploaded compressed file is not the same as the uploaded CRC check value, step S2 is executed.
In a preferred embodiment of the present invention, between step S3 and step S4, the method further comprises:
and S400, erasing the storage space.
In a preferred embodiment of the present invention, the compression method comprises the steps of:
s500, checking Data of a Data segment which is not coded yet, trying to find out a matching character string which meets requirements and is the longest in a Search Buffer Data segment, if the matching character string can be found, executing a step S501, and if not, executing a step S503;
s501, after finding out the Character string, outputting a ternary symbol group (Offset, Length, Character);
wherein Offset is the Offset length of the matching character string in the Search Buffer data segment relative to the Search Buffer data segment boundary; length is the length of the matching character string; character is the next Character; then sliding the Search Buffer data segment to the direction which is not coded by 1, and repeating the step S500;
s503, if the Character string which can be matched is not found in the Search Buffer data segment, outputting a ternary symbol group (0, 0, Character); then, the Search Buffer data segment is slid 1 in the direction that has not been encoded, and step S500 is repeated. In the present embodiment, the decompression method is the inverse operation of the compression method. The compression method is not limited to the compression method of the present invention, and an existing compression method such as Fixed Bit Length algorithm (Fixed Bit Length Packing), RLE algorithm, LZ77 algorithm, or Huffman Encoding (Huffman Encoding) may be used.
Examples of the invention are given below:
as shown in fig. 2, writing a 64M file into a Flash automobile meter with 64M storage space, where 0.5M is a boot program, the boot program includes a compression program and a decompression program, dividing the remaining 63.5M storage space into 2 storage units, one storage unit is 31.5M in size, and the starting address on Flash is 0x04080000 and the length is 0x1F80000, which is called the first 31.5M and is also called an upgrade file a; the size of another memory unit is 32M, the starting address on Flash is 0x06000000, and the length of the memory unit is 0x 2000000; called post 32M, also called upgrade file b.
As shown in fig. 3, after the upgrade file a is compressed, a compressed file a is obtained, where the initial address of the compressed file a in the DDR is 0x40800000, and the length of the compressed file a is Len 11; decompressing the compressed file a to obtain a decompressed file a, wherein the initial address of the decompressed file a in the DDR is 0x 41900000; comparing whether the content of the upgrade file a is the same as that of the decompression file a, if not, the first 31.5M compression fails; if the two are the same, calculating a CRC value g _ ulcrcval1 of the compressed file a, erasing a section of Flash, wherein the erasing start address is 0x04080000 and the length is 31.5 million, if the erasing is not successful, the first 31.5M compression fails, if the erasing is successful, writing the compressed file a with the DDR start address of 0x40800000 and the length of Len11 into the Flash with the start address of 0x04080000, if the writing is successful, the first 31.5M compression succeeds, and if the writing is not successful, the first 31.5M compression fails.
As shown in fig. 4, after the upgrade file b is compressed, a compressed file b is obtained, where the initial address of the compressed file b in the DDR is 0x40800000, and the length of the compressed file b is Len 111; decompressing the compressed file b to obtain a decompressed file b, wherein the initial address of the decompressed file b in the DDR is 0x 41900000; comparing whether the content of the upgrade file b is the same as that of the decompression file b, if not, the back 32M compression fails; if the two are the same, calculating a CRC check value g _ ulcrcval11 of the compressed file b, erasing a section of Flash, wherein the erasing start address is 0x06000000 and the length of the Flash is 32 Mm, if the erasing is not successful, the next 32M compression fails, if the erasing is successful, writing the compressed file b with the DDR start address of 0x40800000 and the length of the Len111 into the Flash with the start address of 0x06000000, if the writing is successful, the next 32M compression succeeds, and if the writing is not successful, the next 32M compression fails.
As shown in fig. 5, Flash is divided into two packages, one Package is Package1 with a Package 1M in size, and the other Package is Package2 with a Package2 in size of 32M; dividing the Package1 into two packages, wherein one Package is Package11 with the size of 0.5M, the other Package is Package12 with the size of 31.5M, discarding the Package11, dividing the Package12 into two packages, one Package is Package121 with the size of Len11, the other Package is Package122, discarding the Package122, and extracting a compressed file a in the Package 121; dividing the Package2 into two packages, wherein one Package is a Package21 with the size of Len111, the other Package is a Package22, discarding the Package22, and extracting a compressed file b in the Package 21; making a CRC check value g _ ulcrcval1 and a CRC check value g _ ulcrcval11 into FlashInfo, wherein the starting address of the FlashInfo is 0x401fffe 0; and converting the compressed file a and the compressed file b into S19, wherein the initial addresses of the compressed file a and the compressed file b in the DDR are 0x40200000 and 0x41100000 respectively, and then sequentially combining the FlashInfo, the compressed file a and the compressed file b into one S19.
As shown in fig. 6, uploading a compressed file a to a start address 0x40200000 of a DDR, calculating a CRC check value CheckSum1 of the uploaded compressed file a, if the CRC check value CheckSum1 of the uploaded compressed file a is not the same as the uploaded CRC check value g _ ucrval 1, then uploading the compressed file a again, if the CRC check value CheckSum1 of the uploaded compressed file a is the same as the uploaded CRC check value g _ ucrval 1, uploading a compressed file b to the start address 0x41100000 of the DDR, calculating a CRC check value CheckSum2 of the uploaded compressed file b, if the CRC check value CheckSum2 of the uploaded compressed file b is not the same as the uploaded CRC check value g _ ucrval 11, then uploading the compressed file a again, if the CRC check value CheckSum2 of the uploaded compressed file b is the same as the uploaded CRC check value g _ ucrval 2 of the uploaded compressed file b, then uploading the compressed file a new section of the uploaded compressed file a, and if the CRC check value CheckSum2 of the uploaded compressed file a is the same as the CRC check value g _ ucrval 04021, 3600, and the uploaded compressed file a section is Flash 80063, and the Flash check address 3600 is the Flash erase length; decompressing the compressed file a to DDR with the initial address of 0x41F00000 to obtain a decompressed file a ', and writing the decompressed file a' into Flash with the initial address of 0x04080000 and the length of 31.5M; and decompressing the compressed file b into DDR with the starting address of 0x41F00000 to obtain a decompressed file b ', and writing the decompressed file b' into Flash with the starting address of 0x06000000 and the length of 32M.
As shown in FIGS. 7 and 8, it is assumed that there is a string A A C A B C A B A A C that needs to be compressed. We take the first 4 bits of this string as Search Buffer data segment, that is: a, C and A. And setting the ternary symbol group output for the first time to be (0, 0, A). At this time, after the Search Buffer data segment slides 1 bit in the direction that has not been encoded, the second Search Buffer data segment is: a C A. At this time, it is found that the first character in AC A is the same as the first character A in the total character string, so the output ternary symbol set is set to (1, 1, C). Then, the Search Buffer data segment continues to slide 2 bits in the direction which is not coded yet, and the Search Buffer data segment is A A C A. At this time, it is found that the three characters in front of the Search Buffer data segment are a C, so that the output ternary symbol set is set to (3, 4, B). And sliding the Search Buffer data segment by 4 bits in the direction which is not coded, wherein the Search Buffer data segment is C A B A, and the output ternary symbol group is (3, 3, A). The Search Buffer data segment is slid to the direction which is not coded yet by 4, and the output ternary symbol group is (1, 2, C).
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (6)

1. An automobile instrument upgrading optimization method is characterized by comprising the following steps:
s1, acquiring a pre-upgraded compression uploading file identified by the automobile instrument;
the method for acquiring the pre-upgraded compression uploading file identified by the automobile instrument comprises the following steps:
s11, compressing the pre-upgraded uploaded file to obtain a compressed file;
the method for compressing the pre-upgraded uploaded file to obtain the compressed file comprises the following steps of:
s100, writing an upgrade file into the automobile instrument, wherein the size of the upgrade file is smaller than or equal to the size of the remaining storage space of the automobile instrument;
s101, dividing a storage space occupied by an upgrade file into M storage units, wherein M is a positive integer greater than or equal to 2, and the size of the storage space of each storage unit is equal or unequal or not equal;
s102, dividing the residual operation space of the automobile instrument into N operation units, wherein N is a positive integer greater than or equal to 2, and the operation spaces of the operation units are equal or unequal or not equal;
s103, compressing the upgrade files in one or more or all storage units to an operation unit to obtain compressed files; the space size of the operation unit is larger than or equal to the size of the compressed upgrade file of the corresponding storage unit;
s104, decompressing the compressed file to an unused operation unit to obtain a decompressed file; the size of the unused space of the operation unit is larger than or equal to the size of the storage space occupied by the corresponding upgrade file; if the size of the unused space of the operation unit is smaller than the size of the storage space occupied by the corresponding upgrade file, returning to the step S101 to divide the storage unit and the operation unit again;
s105, judging whether the data in the decompressed file is the same as the data in the corresponding upgraded file:
if the data in the decompressed file is different from the data in the corresponding upgrade file, the error rcnti is 1, and i is the serial number of the storage unit; step S109 is executed;
if the data in the decompressed file is the same as the data in the corresponding upgrade file, the error rcnti is 0; executing step S106;
s106, recording the CRC value of the compressed file and the length of the compressed file;
s107, erasing the upgrade files stored in the storage unit corresponding to the compressed files, and judging whether all the upgrade files stored in the storage unit corresponding to the compressed files are erased:
if the upgrade files stored in the storage unit corresponding to the compressed file are not completely erased, the testatej is 3, and j is the serial number of the storage unit; executing step S109 or S107;
if all the upgrade files stored in the storage unit corresponding to the compressed file are erased, the testatej is 2; step S108 is executed;
s108, writing the compressed file corresponding to the upgrade file into the storage unit corresponding to the upgrade file, and judging whether the compressed file corresponding to the upgrade file is completely written into the storage unit corresponding to the upgrade file:
if the compressed file corresponding to the upgrade file is not completely written into the storage unit corresponding to the upgrade file, the testatej is 4; executing step S109 or S107;
if the compressed file corresponding to the upgrade file is completely written into the storage unit corresponding to the upgrade file, the testatej is 2; step S109 is executed;
s109, judging whether the compression is successful:
if the testatej is 2 and the errorcnti is 0, the upgrade file is compressed successfully; executing S110;
if the testatej is not equal to 2 or the errorcnti is not equal to 0, the compression of the upgrade file is unsuccessful; executing S110 or S100;
s110, ending;
s12, making the compressed file into a compressed uploading file recognized by the automobile instrument;
s2, uploading the compressed uploading file to an automobile instrument;
s3, decompressing the compressed uploading file;
and S4, writing the decompressed compressed uploading file into the automobile instrument.
2. The upgrading optimization method for the automobile instrument as claimed in claim 1, wherein in step S12, the method for making the compressed file into the compressed upload file for the automobile instrument identification comprises the following steps:
s200, extracting the compressed files in the M storage units;
s201, acquiring the lengths of compressed files of M storage units;
acquiring CRC check values of the compressed files of the M storage units;
and S203, making the compressed file extracted in the step S200, the length of the compressed file acquired in the step S201 and the CRC (cyclic redundancy check) value of the compressed file into a compressed uploading file identified by the automobile instrument.
3. The upgrading optimization method for automobile meters according to claim 1, further comprising the following steps between the step S2 and the step S3:
s300, calculating the CRC value of the uploaded compressed file, and comparing whether the CRC value of the uploaded compressed file is the same as the uploaded CRC value:
if the CRC check value of the uploaded compressed file is the same as the uploaded CRC check value, performing step S3;
if the CRC check value of the uploaded compressed file is not the same as the uploaded CRC check value, step S2 is executed.
4. The upgrade optimizing method for automobile meters according to claim 1, further comprising, between the step S3 and the step S4:
and S400, erasing the storage space.
5. The upgrading optimization method for the automobile instrument according to claim 1, wherein the compression method comprises the following steps:
s500, checking Data of a Data segment which is not coded yet, trying to find out a matching character string which meets requirements and is the longest in a Search Buffer Data segment, if the matching character string can be found, executing a step S501, and if not, executing a step S503;
s501, after finding out the Character string, outputting a ternary symbol group (Offset, Length, Character);
wherein Offset is the Offset length of the matching character string in the Search Buffer data segment relative to the Search Buffer data segment boundary; length is the length of the matching character string; character is the next Character; then sliding the Search Buffer data segment to the direction which is not coded by 1, and repeating the step S500;
s503, if the Character string which can be matched is not found in the Search Buffer data segment, outputting a ternary symbol group (0, 0, Character); then, the Search Buffer data segment is slid 1 in the direction that has not been encoded, and step S500 is repeated.
6. The upgrading optimization method for the automobile instrument is characterized in that the decompression method is the inverse operation of the compression method.
CN201910037419.7A 2019-01-15 2019-01-15 Upgrading optimization method for automobile instrument Active CN109558156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910037419.7A CN109558156B (en) 2019-01-15 2019-01-15 Upgrading optimization method for automobile instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910037419.7A CN109558156B (en) 2019-01-15 2019-01-15 Upgrading optimization method for automobile instrument

Publications (2)

Publication Number Publication Date
CN109558156A CN109558156A (en) 2019-04-02
CN109558156B true CN109558156B (en) 2021-07-27

Family

ID=65872940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910037419.7A Active CN109558156B (en) 2019-01-15 2019-01-15 Upgrading optimization method for automobile instrument

Country Status (1)

Country Link
CN (1) CN109558156B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928809A (en) * 2019-11-25 2020-03-27 航天科技控股集团股份有限公司 Method for programming image data to external Flash through CAN bus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180304A1 (en) * 2014-05-30 2015-12-03 广州市动景计算机科技有限公司 Increment upgrade method and device
CN105610447A (en) * 2015-10-29 2016-05-25 吴均 LZ77 algorithm based zonal coding and compression method
CN107423397A (en) * 2017-07-26 2017-12-01 北京时代民芯科技有限公司 A kind of self-adapting compressing storage and decompression extracting method towards multitask micro-system
CN108182080A (en) * 2017-12-28 2018-06-19 重庆德科电子仪表有限公司 A kind of method of automobile instrument software upgrading
CN108536452A (en) * 2017-02-28 2018-09-14 深圳市帝迈生物技术有限公司 A kind of embedded device and its system software upgrading method, system and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180304A1 (en) * 2014-05-30 2015-12-03 广州市动景计算机科技有限公司 Increment upgrade method and device
CN105610447A (en) * 2015-10-29 2016-05-25 吴均 LZ77 algorithm based zonal coding and compression method
CN108536452A (en) * 2017-02-28 2018-09-14 深圳市帝迈生物技术有限公司 A kind of embedded device and its system software upgrading method, system and terminal
CN107423397A (en) * 2017-07-26 2017-12-01 北京时代民芯科技有限公司 A kind of self-adapting compressing storage and decompression extracting method towards multitask micro-system
CN108182080A (en) * 2017-12-28 2018-06-19 重庆德科电子仪表有限公司 A kind of method of automobile instrument software upgrading

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
车载终端远程升级系统的设计与实现;吴静 等;《工业控制计算机》;20140131;第27卷(第01期);全文 *

Also Published As

Publication number Publication date
CN109558156A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
TWI459197B (en) Data writing and reading method, memory controller and memory storage apparatus
US8234541B2 (en) Method and controller for data access in a flash memory
US9246511B2 (en) Method and apparatus to process data based upon estimated compressibility of the data
US9690490B2 (en) Method for writing data, memory storage device and memory control circuit unit
US7770091B2 (en) Data compression for use in communication systems
CN110059031B (en) Data storage device and data processing method
US9336081B2 (en) Data writing and reading method, and memory controller and memory storage apparatus using the same for improving reliability of data access
CN105009067B (en) Managing operations on units of stored data
US7406558B2 (en) Software method of emulation of EEPROM memory
CN110419036B (en) Data compression method and device and computing device
US10224959B2 (en) Techniques for data compression verification
TWI631456B (en) Data storage device and data maintenance method
CN108399108A (en) Read operation and soft decoding sequential
CN104881240B (en) Method for writing data, memory storage apparatus and memorizer control circuit unit
CN109558156B (en) Upgrading optimization method for automobile instrument
US10303402B2 (en) Data compression using partial statistics
US9577666B2 (en) Method and system
US8782328B2 (en) Method for transmitting program codes to a memory of a control device, particularly for motor vehicles
CN110888851A (en) Method and device for creating and decompressing compressed file, electronic and storage device
US8595594B2 (en) Data processing method, memory controller, and memory storage device
CN117421258A (en) SSD data storage optimization method, SSD data storage optimization device, computer equipment and SSD data storage optimization medium
US20050249008A1 (en) Silicon storage media, and controller thereof, controlling method thereof, and data frame based storage media
US20210074381A1 (en) Method for the compression of genome sequence data
CN114218441B (en) Method for calling and displaying UOF document
RU2815860C1 (en) Method of compressing genome sequence data

Legal Events

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