CN110928809A - Method for programming image data to external Flash through CAN bus - Google Patents

Method for programming image data to external Flash through CAN bus Download PDF

Info

Publication number
CN110928809A
CN110928809A CN201911166951.5A CN201911166951A CN110928809A CN 110928809 A CN110928809 A CN 110928809A CN 201911166951 A CN201911166951 A CN 201911166951A CN 110928809 A CN110928809 A CN 110928809A
Authority
CN
China
Prior art keywords
data
file
data dictionary
image data
universal
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
CN201911166951.5A
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.)
Aerospace Hi Tech Holding Group Co Ltd
Original Assignee
Aerospace Hi Tech Holding Group 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 Aerospace Hi Tech Holding Group Co Ltd filed Critical Aerospace Hi Tech Holding Group Co Ltd
Priority to CN201911166951.5A priority Critical patent/CN110928809A/en
Publication of CN110928809A publication Critical patent/CN110928809A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Abstract

A method for programming image data to external Flash through a CAN bus relates to a method for programming image data. The problems that the existing image data programming method is complex in programming process and long in programming time are solved. The programming method mainly comprises two aspects, on one hand, the original image data file is compressed by continuously updating a general data dictionary in an upper computer to obtain a large compression ratio; and on the other hand, the universal data dictionary in the processor of the automobile instrument is continuously updated, the compressed file is quickly decompressed, and the original image data is programmed after the decompression is finished. The invention is mainly used for programming image data.

Description

Method for programming image data to external Flash through CAN bus
Technical Field
The present invention relates to a method for writing image data.
Background
The image displayed by the existing automobile instrument is generally called from Flash, and the image is displayed on the automobile instrument according to the called image data, but in the early stage, the image data needs to be written into Flash, for example: the method comprises the steps that an original image data file is 55M in size, boot programming is carried out, wherein the boot English is called boot loader, the time required for loading a program for translating the boot into an embedded system is about 3 hours or more, the programming time of the programming mode is long, if the boot programming is not carried out, image data can be programmed into Flash after an automobile instrument is detached, and the mode is inconvenient to carry out on a vehicle;
in the prior art, image data is compressed by using the existing compression means, and a compressed file is decompressed by an automobile instrument processor and then is programmed into Flash of an automobile instrument;
therefore, the above problems need to be solved.
Disclosure of Invention
The invention provides a method for programming image data to an external Flash through a CAN bus, aiming at solving the problems of complex programming process and long time consumption of the conventional image data programming method.
The method for programming image data to external Flash through a CAN bus comprises the following processes;
compressing an original image data file by using a universal data dictionary in an upper computer to form a compressed file, and sending the compressed file to a processor of an automobile instrument through a CAN bus;
step two, the processor of the automobile instrument decompresses the received compressed file by using the universal data dictionary and writes the decompressed image data into Flash of the automobile instrument, thereby completing the programming of the original image data file;
the universal data dictionary comprises items 1 to 256, each item comprises 1 index and data content corresponding to the index, and the sequence number of the index is the same as that of the number of the items corresponding to the index.
Preferably, in the step one, the original image data file is compressed by using a general data dictionary in the upper computer, and the specific process of forming the compressed file is as follows:
comparing each data in the original image data file with a universal data dictionary in an upper computer, wherein the specific comparison process comprises the following steps:
when the current data in the original image data file is found in a universal data dictionary in the upper computer, storing an index corresponding to the current data into a file to be sent;
when the current data is not found in the universal data dictionary in the upper computer, storing the current data into a file to be sent, and updating the universal data dictionary in the upper computer, wherein the process of updating the universal data dictionary in the upper computer is that item addition is carried out on item sequences in the universal data dictionary according to the sequence order of the item sequences, so that the item-added data dictionary comprises the current data and indexes corresponding to the current data;
and repeating the comparison process until all data in the original image data file are compared with the universal data dictionary in the upper computer, thereby completing the compression of the original image data file, wherein the file to be transmitted is used as the compressed file.
Preferably, in the step one, when the number of items of the universal data dictionary in the upper computer is equal to 16383, the 257 th item to the 16383 th item in the universal data dictionary are deleted, and the universal data dictionary is updated in real time according to the comparison process.
Preferably, in the second step, the processor of the automobile instrument decompresses the received compressed file by using the universal data dictionary, and writes the decompressed image data into Flash of the automobile instrument, so that the specific process of writing the original image data file is completed as follows:
comparing all contents contained in the compressed file with a general data dictionary in the automobile instrument processor in sequence, wherein the comparison process is as follows:
when the index in the compressed file is found in the universal data dictionary in the automobile instrument processor, burning the data corresponding to the index into Flash of the automobile instrument;
when the data in the compressed file is not found in the universal data dictionary in the automobile instrument processor, programming the data into Flash of the automobile instrument, and updating the universal data dictionary in the automobile instrument processor, wherein the process of updating the universal data dictionary in the automobile instrument processor is that items in the universal data dictionary are added according to the sequence order of the items, so that the added data dictionary comprises the current data which is not found and the index corresponding to the current data which is not found;
and repeating the comparison process until all contents in the compressed file are compared with the universal data dictionary, thereby completing the decompression and programming of the compressed file.
Preferably, in the second step, when the number of items in the universal data dictionary in the automobile instrument processor is equal to 16383, the 257 th item to the 16383 th item in the universal data dictionary are deleted, and the universal data dictionary is updated in real time according to the comparison process.
The programming method has the advantages that the automobile instrument does not need to be dismantled in the programming process, the programming is completed by the aid of the automobile instrument, and the programming process is simple;
on one hand, compressing an original image data file by continuously updating a general data dictionary in an upper computer to obtain a large compression ratio, so that the compressed file is smaller, and the time for transmitting the file is shortened, thereby shortening the programming time; on the other hand, a general data dictionary in a processor of the automobile instrument is continuously updated, the compressed file is quickly decompressed, and the original image data is programmed after the decompression is finished; in the whole programming process, a large compression ratio is mainly obtained, so that a compressed file is smaller, and the transmission time of image data is shortened due to the fact that the transmission file is smaller, so that the programming time of the image data is shortened.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The method for programming the image data to the external Flash through the CAN bus comprises the following processes;
compressing an original image data file by using a universal data dictionary in an upper computer to form a compressed file, and sending the compressed file to a processor of an automobile instrument through a CAN bus;
step two, the processor of the automobile instrument decompresses the received compressed file by using the universal data dictionary and writes the decompressed image data into Flash of the automobile instrument, thereby completing the programming of the original image data file;
the universal data dictionary comprises items 1 to 256, each item comprises 1 index and data content corresponding to the index, and the sequence number of the index is the same as that of the number of the items corresponding to the index.
In the embodiment, the universal data dictionary in the upper computer is the same as the universal data dictionary in the processor of the automobile instrument; flash is a Flash memory;
according to the programming method, the automobile instrument does not need to be dismantled in the programming process, the programming is completed by means of the CAN bus of the automobile instrument, and the programming process is simple;
on one hand, in the programming process, the original image data file is compressed through the universal data dictionary to obtain a large compression ratio, so that the compressed file is smaller, the time for transmitting the file is shortened, and the programming time is shortened; on the other hand, the compressed file is quickly decompressed through a general data dictionary in a processor of the automobile instrument, so that the burning time of the image data is shortened.
In the first step, the general data dictionary in the upper computer is used to compress the original image data file, and the specific process of forming the compressed file is as follows:
comparing each data in the original image data file with a universal data dictionary in an upper computer, wherein the specific comparison process comprises the following steps:
when the current data in the original image data file is found in a universal data dictionary in the upper computer, storing an index corresponding to the current data into a file to be sent;
when the current data is not found in the universal data dictionary in the upper computer, storing the current data into a file to be sent, and updating the universal data dictionary in the upper computer, wherein the process of updating the universal data dictionary in the upper computer is that item addition is carried out on item sequences in the universal data dictionary according to the sequence order of the item sequences, so that the item-added data dictionary comprises the current data and indexes corresponding to the current data;
and repeating the comparison process until all data in the original image data file are compared with the universal data dictionary in the upper computer, thereby completing the compression of the original image data file, wherein the file to be transmitted is used as the compressed file.
In the preferred embodiment, the original image data file is compressed by continuously updating the universal data dictionary in the upper computer, and the compressed result has two types, wherein one type is that only indexes are stored in the compressed file, and the other type is that the compressed file contains both indexes and data;
for a compressed file only storing indexes, the indexes corresponding to the data in the original image data file are searched through a general data dictionary and are stored, so that the compression of the original image data file is realized;
for a compressed file which stores both indexes and data, for the indexes in the compressed file, only an index corresponding to the data in the original image data file needs to be searched through a general data dictionary and stored, so that the original image data file is compressed; for data in a compressed file, the data in the compressed file is: when the data is compared with the general data dictionary in the upper computer next time, the index corresponding to the data can be found from the updated data dictionary, so that the storage of the index is realized, the size of the compressed file is reduced, the memory occupied by the compressed file is smaller, the time consumption of the compression process is short, and the compression of the original image data file is finally realized.
In the first step, when the number of terms in the universal data dictionary in the upper computer is 16383, the 257 th to 16383 th terms in the universal data dictionary are deleted, and the universal data dictionary is updated in real time according to the comparison process.
In the preferred embodiment, the upper computer can compress the large original image data file through a universal data dictionary.
In the second step, the processor of the automobile instrument decompresses the received compressed file by using the general data dictionary, and writes the decompressed image data into Flash of the automobile instrument, so that the specific process of writing the original image data file is completed as follows:
comparing all contents contained in the compressed file with a general data dictionary in the automobile instrument processor in sequence, wherein the comparison process is as follows:
when the index in the compressed file is found in the universal data dictionary in the automobile instrument processor, burning the data corresponding to the index into Flash of the automobile instrument;
when the data in the compressed file is not found in the universal data dictionary in the automobile instrument processor, programming the data into Flash of the automobile instrument, and updating the universal data dictionary in the automobile instrument processor, wherein the process of updating the universal data dictionary in the automobile instrument processor is that items in the universal data dictionary are added according to the sequence order of the items, so that the added data dictionary comprises the current data which is not found and the index corresponding to the current data which is not found;
and repeating the comparison process until all contents in the compressed file are compared with the universal data dictionary, thereby completing the decompression and programming of the compressed file.
In the preferred embodiment, the compressed file is decompressed by continuously updating the universal data dictionary in the processor of the automobile instrument;
when only indexes are stored in the compressed file, the data corresponding to each index can be searched by directly utilizing a general data dictionary in a processor of the automobile instrument, and the data is programmed into Flash of the automobile instrument to complete decompression and programming;
when the compressed file stores both indexes and data, aiming at the indexes in the compressed file, the data corresponding to the indexes can be directly searched by the universal data dictionary; for the data in the compressed file, the data in the compressed file can be updated to a general data dictionary in a processor of the automobile instrument, the updated general data dictionary is added with items, and the sequence numbers of the added items are sequenced according to the item sequence in the general data dictionary, so that the indexes which appear subsequently and do not appear in the original general data dictionary are endowed with corresponding data, and the decompression of the compressed file is completed.
In the second step, when the number of items in the universal data dictionary in the vehicle meter processor is 16383, deleting the 257 th item to the 16383 th item in the universal data dictionary, and updating the universal data dictionary in real time according to the comparison process.
In the preferred embodiment, the automobile instrument processor can realize the decompression of the compressed image data file through a universal data dictionary.
Although the invention herein has been described with reference to particular embodiments, it is to be understood that these embodiments are merely illustrative of the principles and applications of the present invention. It is therefore to be understood that numerous modifications may be made to the illustrative embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that features described in different dependent claims and herein may be combined in ways different from those described in the original claims. It is also to be understood that features described in connection with individual embodiments may be used in other described embodiments.

Claims (5)

1. The method for programming the image data to the external Flash through the CAN bus is characterized by comprising the following processes;
compressing an original image data file by using a universal data dictionary in an upper computer to form a compressed file, and sending the compressed file to a processor of an automobile instrument through a CAN bus;
step two, the processor of the automobile instrument decompresses the received compressed file by using the universal data dictionary and writes the decompressed image data into Flash of the automobile instrument, thereby completing the programming of the original image data file;
the universal data dictionary comprises items 1 to 256, each item comprises 1 index and data content corresponding to the index, and the sequence number of the index is the same as that of the number of the items corresponding to the index.
2. The method for programming image data to an external Flash through the CAN bus according to claim 1, wherein in the first step, a general data dictionary in an upper computer is used for compressing an original image data file, and the specific process of forming the compressed file is as follows:
comparing each data in the original image data file with a universal data dictionary in an upper computer, wherein the specific comparison process comprises the following steps:
when the current data in the original image data file is found in a universal data dictionary in the upper computer, storing an index corresponding to the current data into a file to be sent;
when the current data is not found in the universal data dictionary in the upper computer, storing the current data into a file to be sent, and updating the universal data dictionary in the upper computer, wherein the process of updating the universal data dictionary in the upper computer is that item addition is carried out on item sequences in the universal data dictionary according to the sequence order of the item sequences, so that the item-added data dictionary comprises the current data and indexes corresponding to the current data;
and repeating the comparison process until all data in the original image data file are compared with the universal data dictionary in the upper computer, thereby completing the compression of the original image data file, wherein the file to be transmitted is used as the compressed file.
3. The method for programming image data to an external Flash through the CAN bus according to claim 2, wherein in the first step, when the number of entries of the universal data dictionary in the upper computer is 16383, the 257 th entry to the 16383 th entry in the universal data dictionary are deleted, and the universal data dictionary is updated in real time according to the comparison process.
4. The method for programming image data to an external Flash through the CAN bus according to claim 1, wherein in the second step, the processor of the automobile instrument decompresses the received compressed file by using the universal data dictionary, and programs the decompressed image data to the Flash of the automobile instrument, so that the specific process of programming the original image data file is completed as follows:
comparing all contents contained in the compressed file with a general data dictionary in the automobile instrument processor in sequence, wherein the comparison process is as follows:
when the index in the compressed file is found in the universal data dictionary in the automobile instrument processor, burning the data corresponding to the index into Flash of the automobile instrument;
when the data in the compressed file is not found in the universal data dictionary in the automobile instrument processor, programming the data into Flash of the automobile instrument, and updating the universal data dictionary in the automobile instrument processor, wherein the process of updating the universal data dictionary in the automobile instrument processor is that items in the universal data dictionary are added according to the sequence order of the items, so that the added data dictionary comprises the current data which is not found and the index corresponding to the current data which is not found;
and repeating the comparison process until all contents in the compressed file are compared with the universal data dictionary, thereby completing the decompression and programming of the compressed file.
5. The method according to claim 4, wherein in the second step, when the number of items in the universal data dictionary in the car meter processor is 16383, the 257 th item to the 16383 th item in the universal data dictionary are deleted, and the universal data dictionary is updated in real time according to the comparison process.
CN201911166951.5A 2019-11-25 2019-11-25 Method for programming image data to external Flash through CAN bus Pending CN110928809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911166951.5A CN110928809A (en) 2019-11-25 2019-11-25 Method for programming image data to external Flash through CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911166951.5A CN110928809A (en) 2019-11-25 2019-11-25 Method for programming image data to external Flash through CAN bus

Publications (1)

Publication Number Publication Date
CN110928809A true CN110928809A (en) 2020-03-27

Family

ID=69850926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911166951.5A Pending CN110928809A (en) 2019-11-25 2019-11-25 Method for programming image data to external Flash through CAN bus

Country Status (1)

Country Link
CN (1) CN110928809A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686177A (en) * 2013-12-19 2014-03-26 中国科学院深圳先进技术研究院 Image compression and decompression method, device and system
CN106375177A (en) * 2015-07-21 2017-02-01 中兴通讯股份有限公司 Message transmission method and apparatus
CN106407285A (en) * 2016-08-26 2017-02-15 西安空间无线电技术研究所 RLE and LZW-based optimized bit file compression and decompression method
CN107528828A (en) * 2017-07-27 2017-12-29 福建天泉教育科技有限公司 The method and terminal of a kind of compressed data
CN109558156A (en) * 2019-01-15 2019-04-02 重庆德科电子仪表有限公司 A kind of automobile instrument upgrading optimization method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686177A (en) * 2013-12-19 2014-03-26 中国科学院深圳先进技术研究院 Image compression and decompression method, device and system
CN106375177A (en) * 2015-07-21 2017-02-01 中兴通讯股份有限公司 Message transmission method and apparatus
CN106407285A (en) * 2016-08-26 2017-02-15 西安空间无线电技术研究所 RLE and LZW-based optimized bit file compression and decompression method
CN107528828A (en) * 2017-07-27 2017-12-29 福建天泉教育科技有限公司 The method and terminal of a kind of compressed data
CN109558156A (en) * 2019-01-15 2019-04-02 重庆德科电子仪表有限公司 A kind of automobile instrument upgrading optimization method

Similar Documents

Publication Publication Date Title
EP3358465B1 (en) In-vehicle control device, program update system, and program update software
CN109582653B (en) Method and device for compressing and decompressing files
US5802549A (en) Method and apparatus for patching pages of ROM
US20010051954A1 (en) Data updating apparatus that performs quick restoration processing
CN112765271A (en) Block chain transaction index storage method and device, computer equipment and medium
KR102088164B1 (en) Method and apparatus for generating difference between old and new version of data for updating software
JP2002529849A (en) Data compression method for intermediate object code program executable in embedded system supplied with data processing resources, and embedded system corresponding to this method and having multiple applications
KR102088167B1 (en) Apparatus for updating software as an agent and patch method thereof
US20130151647A1 (en) Method for rewriting program, reprogram apparatus, and electronic control unit
CN111221840B (en) Data processing method and device, data caching method, storage medium and system
CN111090663A (en) Transaction concurrency control method, device, terminal equipment and medium
CN111078672B (en) Data comparison method and device for database
CN111124464A (en) Method and system for differential upgrade of embedded system and computer readable storage medium
CN110908682A (en) Firmware upgrading method and system for vehicle controller, vehicle and storage medium
CN108052643A (en) Date storage method, device and storage engines based on LSM Tree structures
CN105912289A (en) Startup LOGO image conversion and storage method and apparatus, and startup LOGO image displaying method and apparatus
CN111061434A (en) Gene compression multi-stream data parallel writing and reading method, system and medium
CN109408682B (en) Regular expression matching method, system and equipment
CN110888603A (en) High-concurrency data writing method and device, computer equipment and storage medium
CN110928809A (en) Method for programming image data to external Flash through CAN bus
Vandermeer et al. Forensic analysis of the exfat artefacts
US20090024785A1 (en) Method and program for file information write processing
CN104077272B (en) A kind of method and apparatus of dictionary compression
CN111143240B (en) Image storage method, system and terminal equipment
JPH04360246A (en) Device for compressing file

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

Application publication date: 20200327

WD01 Invention patent application deemed withdrawn after publication