CN106408684B - Fault information storage method and device - Google Patents
Fault information storage method and device Download PDFInfo
- Publication number
- CN106408684B CN106408684B CN201610874080.2A CN201610874080A CN106408684B CN 106408684 B CN106408684 B CN 106408684B CN 201610874080 A CN201610874080 A CN 201610874080A CN 106408684 B CN106408684 B CN 106408684B
- Authority
- CN
- China
- Prior art keywords
- fault message
- storage region
- storage
- store
- stored
- 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
Links
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C5/00—Registering or indicating the working of vehicles
- G07C5/08—Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
- G07C5/0841—Registering performance data
- G07C5/085—Registering performance data using electronic data carriers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/068—Hybrid storage device
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C5/00—Registering or indicating the working of vehicles
- G07C5/08—Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
- G07C5/0808—Diagnosing performance data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method and a device for storing fault information. The fault information storage method comprises the following steps: detecting the data volume of the fault information which needs to be stored currently; detecting the residual capacity of a first storage area used for storing fault information in an automobile random access memory; if the difference value between the data volume of the fault information which needs to be stored currently and the residual capacity of the first storage area is larger than or equal to a first preset value and smaller than a second preset value, all or part of the fault information which is stored in the first storage area is transferred to an Electrically Erasable Programmable Read Only Memory (EEPROM), and the fault information which needs to be stored currently is stored in the first storage area. The technical scheme provided by the embodiment of the invention can completely record the fault information of the fault, and can timely store the fault information of the new fault, thereby improving the utilization rate of the storage space.
Description
Technical field
The present invention relates to the method and devices that automobile technical field more particularly to a kind of fault message store.
Background technique
In face of increasingly severe energy and environment problem, energy conservation is just becoming the heat of current various countries' research with new-energy automobile
Point.As one kind of energy conservation and new-energy automobile, pure electric automobile has emission-free discharge, energy efficiency in the process of moving
The multiple advantages such as height, low, the recoverable energy of noise.With the fast development of pure electric automobile, integrated control becomes pure electricity
The trend of electrical automobile current development.Integrated control relies on the powerful computing capability of microprocessor at this stage as its name suggests, enriches
Function and external resource, will be responsible for the effective together as one of separate controller of different function, pass through common hardware resource, it is real
The institute now originally completed by multiple independent controls is functional.
System is at any time for onboard diagnostic system (On-Board Diagnostic, abbreviation OBD) in vehicle integrated manipulator
The operating condition of entire car controller is monitored, once discovery has abnormal situation, trouble light (Malfunction Indication
Lamp, abbreviation MIL) emergency warning lamp is bright, while fault message can be stored in memory by OBD system, by the diagnostic instrments of standard and
Diagnosis interface can read relevant information in the form of error code.According to the prompt of error code, maintenance personal can be quickly and accurately
Determine property and the position of failure.
Since the failure that vehicle integrated manipulator is responsible for diagnosis is more and more, freeze the fault messages such as frame information also increasingly
It is more, if to the failure that each may occur, all in random access memory (Random Access Memory, abbreviation
RAM storage fault message in space is reserved in), then the ram space of vehicle integrated manipulator is by wretched insufficiency.In addition, at present
The fault message that entire car controller generally will use the ram space storage fixed quantity of regular length will only when electric under vehicle
Fault message is written in EEPROM.And in vehicle operational process, if the fault message stored in RAM is excessive, new event occurs
When barrier, then new fault message can cover original fault message, so that it is not comprehensive enough to record fault message.
Summary of the invention
The embodiment of the invention provides a kind of method and devices of fault message storage, to solve the vehicle fortune of the prior art
The limited problem of fault message storage quantity during row.
In order to solve the above-mentioned technical problem, the present invention adopts the following technical scheme:
In a first aspect, providing a kind of method of fault message storage, comprising:
Detect the data volume for the fault message for currently needing to store;
For storing the residual capacity of the first storage region of fault message in detection automobile random access memory;
If the difference of the residual capacity of the data volume and first storage region of the current fault message for needing to store
Value is greater than or equal to the first preset value and less than the second preset value, then by stored fault message in first storage region
It is completely or partially transferred in Electrically Erasable Programmable Read-Only Memory EEPROM, the fault message that the current needs store is deposited
Storage is into first storage region.
The method of fault message storage provided in an embodiment of the present invention, can be in the failure letter that complete documentation has broken down
While breath, and the fault message of new failure can be stored in time, improve the utilization rate of memory space.
Further, it is used to store the surplus of the first storage region of fault message in the detection automobile random access memory
After the step of covolume amount, the method also includes:
If the difference of the residual capacity of the data volume and first storage region of the current fault message for needing to store
Value is greater than or equal to the second preset value, then the partial fault information that the current needs store is stored in the automobile and deposited at random
In second storage region of reservoir;
Wherein, the partial fault information are as follows: in the current fault message for needing to store, more than the event of residual capacity
Hinder the fault message of the extra second preset value quantity part in information.
Further, stored fault message in first storage region is transferred in EEPROM described, it will
During the fault message that the current needs store is stored into first storage region, the method also includes:
The failure that first storage region is newly written is recorded in the third storage region of the automobile random access memory
The storage location of information, be newly written second storage region fault message storage location, and update storage position hair
The storage location of the fault message for changing.
Further, stored fault message in first storage region is transferred in EEPROM described, it will
After the current step for needing the fault message stored to store into first storage region, the method also includes:
Detect the reading instruction of read failure information;
According to the storage location information for recording fault message in the third storage region, determine that the reading instruction is wanted
The storage location of the fault message of reading;
The read failure information from determining storage location.
Further, the fault message that the current needs are stored stores the step into first storage region
Suddenly include:
The error code stored, malfunction will currently be needed and freeze frame information to be stored in first storage region
In.
Further, the fault message that the current needs are stored stores the step into first storage region
Suddenly include:
By the serial number for currently needing the error code stored, malfunction and freeze frame information be stored in it is described first storage
In region;
Wherein, the serial number of the error code are as follows: when defining the error code of each failure, to the number of each error code.
Second aspect provides a kind of device of fault message storage, comprising:
First detection module, for detecting the data volume for the fault message for currently needing to store;
Second detection module, for detecting in automobile random access memory for storing first storage region of fault message
Residual capacity;
First processing module, the data volume of the fault message for being stored when the current needs and first memory block
The difference of the residual capacity in domain is greater than or equal to the first preset value and when less than the second preset value, will be in first storage region
Stored fault message is completely or partially transferred in Electrically Erasable Programmable Read-Only Memory EEPROM, by the current needs
The fault message of storage is stored into first storage region.
The device of fault message storage provided in an embodiment of the present invention, can be in the failure letter that complete documentation has broken down
While breath, and the fault message of new failure can be stored in time, improve the utilization rate of memory space.
Further, described device further include:
Second processing module, the data volume of the fault message for being stored when the current needs and first memory block
When the difference of the residual capacity in domain is greater than or equal to the second preset value, the current partial fault information for needing to store is stored
In the second storage region of the automobile random access memory;
Wherein, the partial fault information are as follows: in the current fault message for needing to store, more than the event of residual capacity
Hinder the fault message of the extra second preset value quantity part in information.
Further, described device further include:
Logging modle is newly written described first and deposits for recording in the third storage region of the automobile random access memory
The storage location of the fault message in storage area domain, be newly written second storage region fault message storage location, Yi Jigeng
The storage location of the changed fault message of new storage location.
Further, described device further include:
Third detection module, the reading for detecting read failure information instruct;
Determining module, for determining institute according to the storage location information for recording fault message in the third storage region
State the storage location for reading the instruction fault message to be read;
Read module, for the read failure information from determining storage location.
Further, the first processing module is specifically used for: by the error code for currently needing to store, malfunction and
Freeze frame information to be stored in first storage region.
Further, the first processing module is specifically used for: by the serial number for the error code for currently needing to store, failure shape
State and freezes frame information and be stored in first storage region;
Wherein, the serial number of the error code are as follows: when defining the error code of each failure, to the number of each error code.
The beneficial effects of the present invention are:
Whether above-mentioned technical proposal enough may be used by detecting the data volume of new fault message to judge to have in RAM
Fault message stored in RAM is transferred to EEPROM, to discharge RAM when an insufficient storage space exists by memory space
Memory space, to store new fault message, in this way, while the fault message that complete documentation has broken down, again
The fault message that new failure can be stored in time, improves the utilization rate of memory space.
Detailed description of the invention
Fig. 1 shows the flow charts for the method that the fault message that first embodiment of the invention provides stores;
Fig. 2 indicates the flow chart of the method for the read failure information that first embodiment of the invention provides;
Fig. 3 indicates the block diagram of the device for the fault message storage that second embodiment of the invention provides.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here
It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention
It is fully disclosed to those skilled in the art.
First embodiment
The embodiment of the invention provides a kind of methods of fault message storage, as shown in Figure 1, comprising:
The data volume for the fault message that S101, detection currently need to store.
In the embodiment of the present invention, the current fault message that whether there are needs to store, Yi Jixu can in real time or be periodically detected
The data volume for the fault message to be stored.
For storing the residual capacity of the first storage region of fault message in S102, detection automobile random access memory.
It, can be after detecting the current fault message for having and needing to store in the embodiment of the present invention, detection automobile is random
Memory (hereinafter referred to as RAM) is used to store the residual capacity of the first storage region of fault message, to determine the first memory block
Whether the residual capacity in domain can store the fault message for currently needing to store;It is also possible to current whether with needs in detection
While the data volume for the fault message that the fault message and needs of storage store, the remaining of the first storage region of detection is held
Amount, to improve processing speed.Of course, it should be understood that mode can also can be realized using other, concrete condition can be according to reality
The selection of border demand.
If the difference of the data volume and the residual capacity of the first storage region of S103, the fault message for currently needing to store is big
In or equal to the first preset value and less than the second preset value, then by fault message whole stored in the first storage region or portion
Divide and be transferred in Electrically Erasable Programmable Read-Only Memory EEPROM, the fault message stored will currently be needed to store to the first storage
In region.
In the embodiment of the present invention, currently there is the fault message for needing the fault message stored and needs to store when determining
Data volume when, the difference relationship of the residual capacity of the data volume of the fault message stored as needed and the first storage region,
It is further processed.
If desired the difference of the residual capacity of the data volume of the fault message stored and the first storage region is pre- less than first
If value, then directly the fault message stored will be needed to be stored in the first storage region.Wherein, needs described here store
The difference of the data volume of fault message and the residual capacity of the first storage region is that the data volume of the fault message stored is needed to subtract
Go the difference of the residual capacity of the first storage region.First preset value is a numerical value less than or equal to 0, the choosing of specific data
Take to determine according to actual needs.Difference illustrates that the residual capacity of the first storage region is enough to store currently less than the first preset value
The fault message for needing to store.
If desired the data volume of the fault message stored and the difference of the residual capacity of the first storage region are greater than or equal to
First preset value and be less than or equal to the second preset value, then need fault message whole stored in the first storage region or portion
Divide and be transferred in EEPROM, currently the fault message stored will be needed to store into the first storage region.In this way, being in vehicle
When operating status, can either the fault message that has broken down of complete documentation, and the storage that can discharge the first storage region is empty
Between, to store the fault message of new failure, realize the multiplexing of the first memory space.
Wherein, the second preset value is a numerical value greater than 0, and the selection of specific data can determine according to actual needs.Into
The purpose that the second preset value of row limits is: guarantee can to have in the first storage region it is enough can memory space storage it is new
Fault message, therefore when difference is greater than or equal to the first preset value and when less than the second preset value, to guarantee the first storage region
There can be enough residual capacities to store new fault message, it need to be whole by fault message stored in the first storage region
Or part is transferred in EEPROM, currently the fault message stored will be needed to store into the first storage region.
Certain time is needed since the fault message in the first storage region is transferred to EEPROM, is handled for reduction
Time can only shift partial fault information when guaranteeing that new fault message can store completely into the first storage region
Into EEPROM.Such as when the memory space for having 80% in the first storage region is occupied, when needing transfer part fault message
When being transferred in EEPROM, can only shift the fault message of 50% quantity, for remaining 30% quantity fault message without
Transfer.
Further, if the difference of the residual capacity of the data volume for the fault message for currently needing to store and the first storage region
Value is greater than or equal to the second preset value, then the second storage region that will currently need the partial fault information stored to be stored in RAM
In.Second storage region is a reserved buffer area, when the fault message for currently needing to store is excessive, and in the first storage region
When stored fault message has little time that EEPROM is all written, temporarily the new fault message in part can be stored to the second storage
In region, to avoid the loss of fault message.In subsequent process, the fault message in the second storage region can be transferred to first
In storage region or in EEPROM, concrete condition can design according to actual needs.
Wherein, partial fault information described here are as follows: in the fault message for currently needing to store, more than residual capacity
The fault message of extra second preset value quantity part in fault message.
Further, in the embodiment of the present invention, fault message includes: error code (or serial number of error code), malfunction
And freeze frame information etc..Therefore, storage fault message is the error code (or serial number of error code) that currently will need to store, event
Barrier state and freezes frame information and be stored in the first storage region or the second storage region.
Wherein, the serial number of error code described here are as follows: when defining the error code of each failure, to the volume of each error code
Number.For example, when defining the error code of each failure in flash memory (Flash EEPROM Memory, abbreviation FLASH), to failure
Code is ranked up number respectively, had both facilitated the record of fault message in this way, and simultaneously because only needing record number, therefore can reduce number
According to the occupancy to memory space.
It further,, can be in the third of RAM for the ease of failure diagnostic apparatus read failure information in the embodiment of the present invention
The storage location of the fault message of the first storage region of new write-in, the failure of the second storage region of new write-in are recorded in storage region
The storage location of information, and update storage the storage location of the changed fault message in position.
Wherein, as shown in Figure 2, it is determined whether the realization side of operation and processing reading process with read failure information
Method are as follows:
S201, the reading instruction for detecting read failure information, and if it exists, then enter S202.
Wherein, whether entire car controller can be periodically detected follows unified diagnostic service (Unified Diagnostic
Services, abbreviation UDS) agreement failure diagnostic apparatus read failure information instruction.
S202, according in third storage region record fault message storage location information, determine read instruction to be read
The storage location of the fault message taken.
In query process, can first judge whether the fault message to be read is stored in EEPROM, and if it exists, then into
Enter S203;If it does not exist, then judge whether the fault message to be read is stored in the first storage region of RAM, and if it exists,
Then enter S203 and then judges whether the fault message to be read is stored in the second storage region of RAM if it does not exist, if
In the presence of then into S203.
S203, the read failure information from determining storage location.
Judgement of this step according to S202, the read failure information from determining storage location.
In conclusion the method for fault message storage provided in an embodiment of the present invention, by detecting new fault message
Data volume, to judge whether there is available enough memory space will store in RAM when an insufficient storage space exists in RAM
Fault message be transferred to EEPROM, so that the memory space of RAM is discharged, to store new fault message, in this way, complete
While recording the fault message to have broken down, and the fault message of new failure can be stored in time, improve memory space
Utilization rate.
Second embodiment
The embodiment of the invention provides a kind of devices of fault message storage, as shown in Figure 3, comprising:
First detection module 301, for detecting the data volume for the fault message for currently needing to store.
In the embodiment of the present invention, first detection module 301 can in real time or whether timing detection currently there are needs to store
Fault message, and the data volume of fault message for needing to store.
Second detection module 302, for detecting in automobile random access memory for storing the first memory block of fault message
The residual capacity in domain.
In the embodiment of the present invention, the current fault message for having and needing to store can be detected when first detection module 301
Afterwards, it is used to store the first storage of fault message by the second detection module 302 detection automobile random access memory (hereinafter referred to as RAM)
The residual capacity in region currently needs the failure stored to believe to determine whether the residual capacity of the first storage region can store
Breath;Be also possible to first detection module 301 detect it is current whether have need the fault message stored and needs to store
While the data volume of fault message, the residual capacity of the first storage region is detected by the second detection module 302, to improve processing
Speed.Of course, it should be understood that can also can realize that mode, concrete condition can select according to actual needs using other.
First processing module 303, the data volume of the fault message for that currently ought need to store and the first storage region
The difference of residual capacity is greater than or equal to the first preset value and when less than the second preset value, will be stored in the first storage region
Fault message is completely or partially transferred in Electrically Erasable Programmable Read-Only Memory EEPROM, and the failure stored will currently be needed to believe
Breath is stored into the first storage region.
In the embodiment of the present invention, when first detection module 301 determines the fault message that currently there are needs to store and needs
When the data volume for the fault message to be stored, the data volume for the fault message that first processing module 303 can store as needed with
The difference relationship of the residual capacity of first storage region, is further processed.
If desired the difference of the residual capacity of the data volume of the fault message stored and the first storage region is pre- less than first
If when value, then directly the fault message stored will be needed to be stored in the first storage region.Wherein, described here to need to store
The data volume of fault message and the difference of residual capacity of the first storage region be the data volume of fault message that needs store
Subtract the difference of the residual capacity of the first storage region.First preset value is a numerical value less than or equal to 0, specific data
Selection can determine according to actual needs.Difference illustrates that the residual capacity of the first storage region is enough to store less than the first preset value and works as
The preceding fault message for needing to store.
If desired the data volume of the fault message stored and the difference of the residual capacity of the first storage region are greater than or equal to
First preset value and be less than or equal to the second preset value, then need fault message whole stored in the first storage region or portion
Divide and be transferred in EEPROM, currently the fault message stored will be needed to store into the first storage region.In this way, being in vehicle
When operating status, can either the fault message that has broken down of complete documentation, and the storage that can discharge the first storage region is empty
Between, to store the fault message of new failure, realize the multiplexing of the first memory space.
Wherein, the second preset value is a numerical value greater than 0, and the selection of specific data can determine according to actual needs.Into
The purpose that the second preset value of row limits is: guarantee can to have in the first storage region it is enough can memory space storage it is new
Fault message, therefore when difference is greater than or equal to the first preset value and when less than the second preset value, to guarantee the first storage region
There can be enough residual capacities to store new fault message, it need to be whole by fault message stored in the first storage region
Or part is transferred in EEPROM, currently the fault message stored will be needed to store into the first storage region.
Certain time is needed since the fault message in the first storage region is transferred to EEPROM, is handled for reduction
Time can only shift partial fault information when guaranteeing that new fault message can store completely into the first storage region
Into EEPROM.Such as when the memory space for having 80% in the first storage region is occupied, when needing transfer part fault message
When being transferred in EEPROM, can only shift the fault message of 50% quantity, for remaining 30% quantity fault message without
Transfer.
Further, the device further include:
Second processing module, the residue of the data volume of the fault message for that currently ought need to store and the first storage region
When the difference of capacity is greater than or equal to the second preset value, deposited currently needing the partial fault information stored to be stored in automobile at random
In second storage region of reservoir.
Second storage region is a reserved buffer area, and when the fault message for currently needing to store is excessive, and first stores
It, can be temporarily new by part by Second processing module when stored fault message has little time that EEPROM is all written in region
Fault message is stored into the second storage region, to avoid the loss of fault message.It, can be by the second storage region in subsequent process
In fault message be transferred in the first storage region or in EEPROM, concrete condition can design according to actual needs.
Wherein, partial fault information described here are as follows: in the fault message for currently needing to store, more than residual capacity
The fault message of extra second preset value quantity part in fault message.
Further, in the embodiment of the present invention, fault message includes: error code (or serial number of error code), malfunction
And freeze frame information etc..Therefore, first processing module 303 is specifically used for: by the error code for currently needing to store (or error code
Serial number), malfunction and freeze frame information etc. and be stored in the first storage region or the second storage region.
Wherein, the serial number of error code described here are as follows: when defining the error code of each failure, to the volume of each error code
Number.For example, when defining the error code of each failure in flash memory (Flash EEPROM Memory, abbreviation FLASH), to failure
Code is ranked up number respectively, had both facilitated the record of fault message in this way, and simultaneously because only needing record number, therefore can reduce number
According to the occupancy to memory space.
Further, the device further include:
Logging modle, for recording the first storage region of new write-in in the third storage region of automobile random access memory
The storage location of the fault message of the storage location of fault message, the second storage region of new write-in, and update storage position hair
The storage location of the fault message for changing.
It, can will be each by logging modle when storing fault message for the ease of failure diagnostic apparatus read failure information
The storage location information of the corresponding fault message of failure is recorded in the third storage region of RAM, to inquire.
Further, the device further include:
Third detection module, the reading for detecting read failure information instruct.
Wherein, whether third detection module can be periodically detected follows unified diagnostic service (Unified
Diagnostic Services, abbreviation UDS) agreement failure diagnostic apparatus read failure information instruction.
Determining module refers to for determining to read according to the storage location information for recording fault message in third storage region
Enable the storage location for the fault message to be read.
In determining module query process, it can first judge whether the fault message to be read is stored in EEPROM, if
In the presence of then the read failure information from the storage region then judges whether the fault message to be read is stored in if it does not exist
In the first storage region of RAM, and if it exists, the then read failure information from the storage region;If being still not present, judge to be wanted
Whether the fault message of reading is stored in the second storage region of RAM.
Read module, for the read failure information from determining storage location.
Read module can from storage location determined by determining module read failure information.
In conclusion the device of fault message storage provided in an embodiment of the present invention, by detecting new fault message
Data volume, to judge whether there is available enough memory space will store in RAM when an insufficient storage space exists in RAM
Fault message be transferred to EEPROM, so that the memory space of RAM is discharged, to store new fault message, in this way, complete
While recording the fault message to have broken down, and the fault message of new failure can be stored in time, improve memory space
Utilization rate.
Above-described is the preferred embodiment of the present invention, it should be pointed out that the ordinary person of the art is come
It says, can also make several improvements and retouch under the premise of not departing from principle of the present invention, these improvements and modifications also exist
In protection scope of the present invention.
Claims (12)
1. a kind of method of fault message storage characterized by comprising
Detect the data volume for the fault message for currently needing to store;
For storing the residual capacity of the first storage region of fault message in detection automobile random access memory;
If the difference of the data volume and the residual capacity of first storage region of the current fault message for needing to store is big
It is in or equal to the first preset value and less than the second preset value, then fault message stored in first storage region is whole
Or part is transferred in Electrically Erasable Programmable Read-Only Memory EEPROM, by it is described it is current need the fault message that stores store to
In first storage region;
Wherein, the difference of the residual capacity of the data volume and first storage region of the current fault message for needing to store
The difference of the residual capacity of the first storage region is subtracted for the current data volume for needing the fault message stored, wherein institute
The first preset value is stated equal to 0, second preset value is greater than 0.
2. the method for fault message storage according to claim 1, which is characterized in that in the detection automobile random storage
After the step of residual capacity for the first storage region for being used to store fault message in device, the method also includes:
If the difference of the data volume and the residual capacity of first storage region of the current fault message for needing to store is big
In or equal to the second preset value, then the partial fault information that the current needs store is stored in the automobile random access memory
The second storage region in;
Wherein, the partial fault information are as follows: in the current fault message for needing to store, the failure more than residual capacity is believed
The fault message of the extra second preset value quantity part in breath.
3. the method for fault message storage according to claim 2, which is characterized in that described by first memory block
Stored fault message is completely or partially transferred in Electrically Erasable Programmable Read-Only Memory EEPROM in domain, will be described current
During the fault message for needing to store is stored into first storage region, the method also includes:
The fault message that first storage region is newly written is recorded in the third storage region of the automobile random access memory
Storage location, be newly written second storage region fault message storage location, and update storage position and become
The storage location of the fault message of change.
4. the method for fault message storage according to claim 3, which is characterized in that described by first memory block
Stored fault message is completely or partially transferred in Electrically Erasable Programmable Read-Only Memory EEPROM in domain, will be described current
After the fault message for needing to store stores the step into first storage region, the method also includes:
Detect the reading instruction of read failure information;
According to the storage location information for recording fault message in the third storage region, determine that the reading instruction to be read
Fault message storage location;
The read failure information from determining storage location.
5. the method according to claim 1, wherein described store the current fault message for needing to store
Include: to the step in first storage region
The error code stored, malfunction will currently be needed and freeze frame information to be stored in first storage region.
6. the method according to claim 1, wherein described store the current fault message for needing to store
Include: to the step in first storage region
By the serial number for currently needing the error code stored, malfunction and freezes frame information and be stored in first storage region
In;
Wherein, the serial number of the error code are as follows: when defining the error code of each failure, to the number of each error code.
7. a kind of device of fault message storage characterized by comprising
First detection module, for detecting the data volume for the fault message for currently needing to store;
Second detection module, for detecting in automobile random access memory for storing the residue of the first storage region of fault message
Capacity;
First processing module, for the data volume and first storage region when the current fault message for needing to store
The difference of residual capacity is greater than or equal to the first preset value and when less than the second preset value, will deposit in first storage region
The fault message of storage is completely or partially transferred in Electrically Erasable Programmable Read-Only Memory EEPROM, currently needs to store by described
Fault message store into first storage region;
Wherein, the difference of the residual capacity of the data volume and first storage region of the current fault message for needing to store
The difference of the residual capacity of the first storage region is subtracted for the current data volume for needing the fault message stored, wherein institute
The first preset value is stated equal to 0, second preset value is greater than 0.
8. the device of fault message storage according to claim 7, which is characterized in that described device further include:
Second processing module, for the data volume and first storage region when the current fault message for needing to store
When the difference of residual capacity is greater than or equal to the second preset value, the partial fault information that the current needs store is stored in institute
It states in the second storage region of automobile random access memory;
Wherein, the partial fault information are as follows: in the current fault message for needing to store, the failure more than residual capacity is believed
The fault message of the extra second preset value quantity part in breath.
9. the device of fault message storage according to claim 8, which is characterized in that described device further include:
First memory block is newly written for recording in the third storage region of the automobile random access memory in logging modle
The storage location of the fault message in domain, be newly written second storage region fault message storage location, and update deposit
Storage space sets the storage location of changed fault message.
10. the device of fault message storage according to claim 9, which is characterized in that described device further include:
Third detection module, the reading for detecting read failure information instruct;
Determining module, for determining the reading according to the storage location information for recording fault message in the third storage region
The storage location of the instruction fetch fault message to be read;
Read module, for the read failure information from determining storage location.
11. device according to claim 7, which is characterized in that the first processing module also particularly useful for: will currently need
The error code to be stored, malfunction and freezes frame information and be stored in first storage region.
12. device according to claim 7, which is characterized in that the first processing module also particularly useful for: will currently need
The serial number of the error code to be stored, malfunction and freezes frame information and be stored in first storage region;
Wherein, the serial number of the error code are as follows: when defining the error code of each failure, to the number of each error code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610874080.2A CN106408684B (en) | 2016-09-30 | 2016-09-30 | Fault information storage method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610874080.2A CN106408684B (en) | 2016-09-30 | 2016-09-30 | Fault information storage method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106408684A CN106408684A (en) | 2017-02-15 |
CN106408684B true CN106408684B (en) | 2019-10-18 |
Family
ID=59228633
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610874080.2A Active CN106408684B (en) | 2016-09-30 | 2016-09-30 | Fault information storage method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106408684B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108765626A (en) * | 2018-05-19 | 2018-11-06 | 深圳市图灵奇点智能科技有限公司 | Running data storage method and system, the device and service platform that travel object |
CN109557907B (en) * | 2018-12-20 | 2023-05-23 | 中车大连电力牵引研发中心有限公司 | Fault recording and resolving system for traction system |
CN110389881A (en) * | 2019-09-17 | 2019-10-29 | 潍柴动力股份有限公司 | A kind of SD card redundant data processing method based on warning function |
CN111445598A (en) * | 2020-01-09 | 2020-07-24 | 陕西华燕航空仪表有限公司 | Optical fiber attitude and heading reference system information processing method, device, equipment and storage medium |
CN111694341A (en) * | 2020-06-05 | 2020-09-22 | 中国第一汽车股份有限公司 | Fault data storage method and device, vehicle-mounted equipment and storage medium |
CN111966285B (en) * | 2020-07-20 | 2022-09-06 | 四川虹美智能科技有限公司 | Method, main control chip and system for storing data into EEPROM |
CN112052192B (en) * | 2020-09-15 | 2024-04-05 | 广东高标智能科技股份有限公司 | Electric vehicle fault recording and reading method and device |
CN112685424B (en) * | 2021-01-04 | 2022-08-23 | 潍柴动力股份有限公司 | Processing method and device for engine fault storage |
CN114311029B (en) * | 2021-12-22 | 2024-11-29 | 珠海一微半导体股份有限公司 | Data management method and chip of robot and robot |
CN114362435A (en) * | 2022-03-08 | 2022-04-15 | 天津飞旋科技股份有限公司 | Magnetic suspension bearing monitoring system, method and device, motor equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000231452A (en) * | 1987-10-07 | 2000-08-22 | George G Gorbatenko | Memory space array |
CN101493756A (en) * | 2009-03-11 | 2009-07-29 | 威盛电子股份有限公司 | Data writing method and device |
CN103500077A (en) * | 2013-10-16 | 2014-01-08 | 北京国双科技有限公司 | File storage method and device |
CN103858092A (en) * | 2013-12-19 | 2014-06-11 | 华为技术有限公司 | Data migration method and device |
CN104572113A (en) * | 2015-01-21 | 2015-04-29 | 深圳市中兴移动通信有限公司 | Automatic storage space arranging method and mobile terminal |
-
2016
- 2016-09-30 CN CN201610874080.2A patent/CN106408684B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000231452A (en) * | 1987-10-07 | 2000-08-22 | George G Gorbatenko | Memory space array |
CN101493756A (en) * | 2009-03-11 | 2009-07-29 | 威盛电子股份有限公司 | Data writing method and device |
CN103500077A (en) * | 2013-10-16 | 2014-01-08 | 北京国双科技有限公司 | File storage method and device |
CN103858092A (en) * | 2013-12-19 | 2014-06-11 | 华为技术有限公司 | Data migration method and device |
CN104572113A (en) * | 2015-01-21 | 2015-04-29 | 深圳市中兴移动通信有限公司 | Automatic storage space arranging method and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN106408684A (en) | 2017-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106408684B (en) | Fault information storage method and device | |
CN103425122B (en) | The failure management method of new energy vehicle controller | |
CN102568054B (en) | Information record carrier | |
CN111694341A (en) | Fault data storage method and device, vehicle-mounted equipment and storage medium | |
CN109080483A (en) | A kind of automated guided vehicle changes battery methods and system | |
CN109240622A (en) | A kind of method and system of EEPROM data write-in | |
CN101278321B (en) | Method for improving diagnosis of a possible breakdown in a vehicle | |
CN108664655A (en) | The log storing method and system of embedded system | |
EP2704369A1 (en) | Communication system in motor vehicle | |
CN110262836A (en) | Built-in multimedia device and communication equipment for Vehicle telematics processor | |
CN102023817A (en) | Read and write control method and system of storage device data | |
EP1571600A2 (en) | Data recording apparatus and shut-down method for data recording apparatus | |
CN107766174A (en) | Electronic-controlled installation and its information storage means | |
CN105204818B (en) | Method for the failure message for managing motor vehicles | |
US20120173837A1 (en) | Memory system | |
CN109116238A (en) | Automatic addressing method for battery management system | |
JP4279593B2 (en) | Elevator control device | |
CN115328221A (en) | Air supply control method, device, equipment and storage medium | |
JP6003728B2 (en) | Diagnostic information collection system | |
JP2007284027A (en) | On-vehicle fault diagnosis control device | |
KR20110001914A (en) | Method and apparatus for handling a write error when writing information data to a flash memory device | |
CN108365283A (en) | Device battery and unmanned plane | |
CN104268086A (en) | Chip identification method and chip compatibility method | |
CN116872866A (en) | Vehicle state identification method and device, vehicle and storage medium | |
CN117591327A (en) | core file generation method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |