CN113010118B - Method for processing mileage and hour meter data stored in automobile - Google Patents
Method for processing mileage and hour meter data stored in automobile Download PDFInfo
- Publication number
- CN113010118B CN113010118B CN202110321617.3A CN202110321617A CN113010118B CN 113010118 B CN113010118 B CN 113010118B CN 202110321617 A CN202110321617 A CN 202110321617A CN 113010118 B CN113010118 B CN 113010118B
- Authority
- CN
- China
- Prior art keywords
- data
- writing
- reasonable
- read
- hour meter
- 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
Images
Classifications
-
- 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/062—Securing storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- 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/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
-
- 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/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Measurement Of Distances Traversed On The Ground (AREA)
Abstract
The invention discloses a method for processing mileage and hour meter data stored in an automobile, which comprises the following steps: sequentially reading and writing N standard format data stored in a memory; judging a check code; after all the effective data are read out, performing ascending arrangement to generate an ascending table, and subtracting every two effective data from big to small; whether the difference is smaller than the preset maximum difference multiplied by the error number or not; storing two data with reasonable difference values, and accumulating a reasonable counter; clearing the two data with unreasonable difference values, writing the original positions of the two data into the coverage table, if the reasonable counter is less than N/2, clearing, otherwise, not clearing; writing the ascending table into the coverage table according to a sequence from small to large; if the reasonable number of the data is more than N/2, outputting the maximum value in the sum, and if the reasonable number of the data is not more than N/2, outputting 0; and data errors caused by self defects of the memory, communication abnormity, electromagnetic interference and the like in an extreme environment are avoided.
Description
Technical Field
The invention belongs to the technical field of storage, relates to a vehicle-mounted memory, and relates to a method for processing mileage and hour meter data stored in an automobile.
Background
In the operation of automobile mileage and hour storage equipment, the storage chip itself abnormality caused by external factors and the read-write data abnormality caused by electromagnetic interference can cause great influence on the storage of the data. The data stored by the existing equipment for a long time has the possibility of errors in the processes of strong electromagnetic interference, high and low temperature impact, frequent power on and off and frequent read-write operation, has the risk of data abnormity under the influence of the reliability of a storage device, and still has the phenomenon of errors when the data is used for a long time under severe conditions. And because the existing equipment does not have the capability of screening correct data, the data self-recovery function after certain error data occurs cannot be realized, and the storage safety of key data cannot be guaranteed.
Disclosure of Invention
The invention aims to: the method for processing the mileage and hour meter data stored in the automobile solves the problems that the data stored in the existing equipment for a long time is subjected to strong electromagnetic interference, high and low temperature impact, frequent power on and off, and error possibility exists in frequent read-write operation, and the abnormal risk of the data is caused by the influence of the reliability of a storage device. And because the method has the capability of screening correct data, the data self-recovery function after certain error data occurs can be realized, and the storage safety of the data is further improved.
The technical scheme adopted by the invention is as follows:
a method for processing mileage and hour meter data stored in an automobile comprises the following steps:
sequentially reading and writing N standard format data stored in a memory;
judging the check code of the read data, and reading the next address data if the check code is correct;
after all the effective data are read out, the data are arranged in an ascending order to generate an ascending table, and subtraction is carried out on every two data in a mode from big to small;
judging the subtracted data, and judging whether the difference is smaller than the preset maximum difference multiplied by the number of errors;
storing two data with reasonable difference values, and accumulating a reasonable counter;
clearing two data with unreasonable difference values, writing the original positions of the two data into an overlay table, if a reasonable counter is smaller than N/2, clearing, otherwise, not clearing;
writing the ascending table into the coverage table according to a sequence from small to large;
and judging the reasonable number of the data, if the reasonable number of the data is more than N/2, outputting the maximum value in the sum, and if the reasonable number of the data is not more than N/2, outputting 0.
Furthermore, the read data is subjected to check code judgment, and if the data is wrong, the data is read again.
Further, if the error frequency is less than the preset frequency, the address data is repeatedly read, and if the error frequency is greater than the preset frequency, the address data is not read.
Further, writing data to the memory includes the steps of:
writing data to a memory;
and reading the written data for comparison, if the written data is equal to the read data, writing successfully, if the written data is not equal to the read data, writing the data again, and comparing after reading.
Further, after the number of times of writing data reaches the preset number of times, if the number of times of writing data is not equal to the number of times of reading data, a write failure is returned.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
the invention relates to a processing method of mileage and hour meter data stored in an automobile, which carries out voting screening to find out the most reasonable data by storing the data for multiple times and multiple addresses, realizes the data self-recovery function after certain error data occurs, adds check in the communication process to ensure that the communication is safer and more reliable, prolongs the service life of a memory because of adopting the multiple address storage, and avoids data errors caused by the defects of the memory, abnormal communication, electromagnetic interference and the like under extreme environments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and that for those skilled in the art, other relevant drawings can be obtained according to the drawings without inventive effort, wherein:
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is a schematic diagram of a data reading process according to the present invention;
FIG. 3 is a schematic diagram of a data writing process according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the detailed description and specific examples, while indicating the preferred embodiment of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Example 1
The processing method of the mileage and hour meter data stored in the automobile provided by the preferred embodiment of the invention comprises the following steps:
sequentially reading and writing N standard format data stored in a memory;
judging the check code of the read data, and reading the next address data if the check code is correct;
after all the effective data are read out, the data are arranged in an ascending order to generate an ascending table, and subtraction is carried out on every two data in a mode from big to small;
judging the subtracted data, and judging whether the difference is smaller than a preset maximum difference multiplied by the number of errors;
storing two data with reasonable difference values, and accumulating a reasonable counter;
clearing two data with unreasonable difference values, writing the original positions of the two data into an overlay table, if a reasonable counter is smaller than N/2, clearing, otherwise, not clearing;
writing the ascending table into the coverage table according to a sequence from small to large;
and judging the reasonable number of the data, if the reasonable number of the data is more than N/2, outputting the maximum value in the sum, and if the reasonable number of the data is not more than N/2, outputting 0.
Preferably, as shown in fig. 2, the read data is subjected to check code determination, and if an error occurs, the data is read again.
Preferably, as shown in fig. 2, if the error frequency is less than the preset frequency, the address data is repeatedly read, and if the error frequency is greater than the preset frequency, the address data is not read.
Preferably, as shown in fig. 3, writing data into the memory comprises the steps of:
writing data to a memory;
and reading the written data for comparison, if the written data is equal to the read data, writing successfully, if the written data is not equal to the read data, writing the data again, and comparing after reading.
Preferably, as shown in fig. 3, after the number of times of writing data reaches a preset number of times, if the number of times of writing data is not equal to the number of times of reading data, a write failure is returned.
The invention comprises the following steps: as shown in fig. 1, N data in the memory are sequentially and completely read, the read data is checked, if correct, the next address data is read, if wrong, the data is read again, the number of reading times is judged, if the number is less than the specified number, the address data is repeatedly read, if the number is more than the specified number, the data which is read for many times and has errors is not read, the data which are read for many times are counted, the position of the error data is written into a coverage table, after all valid data are read, the data are arranged in ascending order, and are subtracted from large to small, the subtracted data are judged, whether the difference is less than the maximum difference (more than 0) multiplied by the number of errors is judged, so that the comparison range is enlarged, the reasonable data are still not excluded, two data with reasonable difference are stored, and a reasonable counter is accumulated, and clearing the two data with unreasonable difference values, writing the original positions of the two data into the coverage table, clearing a reasonable counter, judging all effective data until the counting of the ascending table is finished, writing the ascending table into the coverage table according to a sequence from small to large, judging the reasonable data number, outputting the maximum value in the sum if the reasonable data number is more than N/2, and outputting more than 0 if the reasonable data number is not more than N. In the using process, the writing position of the data is carried out according to a coverage table of a screening algorithm, so that the wrong data is covered firstly, the minimum value and the maximum value of the correct data are covered, and the next screening of reasonable data is ensured.
The following is an example of the vehicle mileage:
conditions are as follows: the maximum speed of the designed vehicle is 120km/h, and the following mileage data are read out after running without interruption for a period of time (the storage period is per hour):
storage time (h) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Traveling mileage (km) | 10 | 20 | 30 | 40 | 50 | 260 | 70 | 80 | 290 | 100 |
From the mileage data, it is known that erroneous mileage data exists, and if the maximum mileage among the reasonable data is 100, the maximum data to be output is 100. Such a design can be achieved by the above algorithm.
(1) Assuming that the data is correctly retrieved from memory, there are no check errors. The number of data checked for errors is denoted as E, where E is 0.
(2) The data are arranged in ascending order:
traveling mileage (km) | 10 | 20 | 30 | 40 | 50 | 70 | 80 | 100 | 260 | 290 |
(3) And (3) performing difference on the sorted mileage according to the small and big data, namely: 290, 260, 100-80, 80-70 …, the data are sequentially subtracted.
(4) The design vehicle speed is 120km/h, then the data between hours should not be greater than 120 km. If there is a number of check errors, E, then the data between hours should not be greater than 120 × E.
(5) Judging reasonable data according to the judgment condition in the step (4), and counting the reasonable data: C. if unreasonable data appears, the counting is cleared, and the position of the unreasonable data is written into the coverage table of the next cycle, as follows:
overlay table sequence | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Recording data location | 290 | 260 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
(6) Writing reasonable data into an overlay table according to a sequence from small to large, and overlaying according to an overlay sequence table when new data exist:
overlay table sequence | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Recording data location | 290 | 260 | 10 | 20 | 30 | 40 | 50 | 70 | 80 | 100 |
(7) Judging whether the number of the reasonable data accounts for half of the total data, namely C is larger than 5, and outputting the maximum reasonable data, which is 100; and if C is less than 5, outputting 0.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents and improvements made by those skilled in the art within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (5)
1. A method for processing mileage and hour meter data stored in an automobile is characterized in that: the method comprises the following steps:
sequentially reading and writing N standard format data stored in a memory;
judging the check code of the read data, and reading the next address data if the check code is correct;
after all the effective data are read out, the data are arranged in an ascending order to generate an ascending table, and subtraction is carried out on every two data in a mode from big to small;
judging the subtracted data, and judging whether the difference is smaller than the preset maximum difference multiplied by the number of errors;
storing two data with reasonable difference values, and accumulating a reasonable counter;
clearing two data with unreasonable difference values, writing the original positions of the two data into an overlay table, if a reasonable counter is smaller than N/2, clearing, otherwise, not clearing;
writing the ascending table into the coverage table according to a sequence from small to large;
and judging the reasonable number of the data, if the reasonable number of the data is more than N/2, outputting the maximum value in the sum, and if the reasonable number of the data is not more than N/2, outputting 0.
2. A method for processing stored mileage and hour meter data of an automobile according to claim 1, wherein: and judging the check code of the read data, and reading the data again if the data is wrong.
3. A method for processing stored mileage and hour meter data of an automobile according to claim 2, wherein: if the error times are less than the preset times, the address data are read repeatedly, and if the error times are more than the preset times, the address data are not read.
4. A method for processing stored mileage and hour meter data of an automobile according to claim 1, wherein: writing data to the memory includes the steps of:
writing data to a memory;
and reading the written data for comparison, if the written data is equal to the read data, writing successfully, if the written data is not equal to the read data, writing the data again, and comparing after reading.
5. The method for processing stored mileage and hour meter data of an automobile as set forth in claim 4, wherein: and after the number of times of writing data reaches the preset number of times, if the written data is not equal to the read data, returning to the failure of writing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110321617.3A CN113010118B (en) | 2021-03-25 | 2021-03-25 | Method for processing mileage and hour meter data stored in automobile |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110321617.3A CN113010118B (en) | 2021-03-25 | 2021-03-25 | Method for processing mileage and hour meter data stored in automobile |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113010118A CN113010118A (en) | 2021-06-22 |
CN113010118B true CN113010118B (en) | 2022-09-16 |
Family
ID=76407275
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110321617.3A Active CN113010118B (en) | 2021-03-25 | 2021-03-25 | Method for processing mileage and hour meter data stored in automobile |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113010118B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5181231A (en) * | 1990-11-30 | 1993-01-19 | Texas Instruments, Incorporated | Non-volatile counting method and apparatus |
WO2010106760A1 (en) * | 2009-03-19 | 2010-09-23 | 本田技研工業株式会社 | Method and device for diagnosing driving operation |
CN102043722A (en) * | 2010-12-30 | 2011-05-04 | 重庆长安汽车股份有限公司 | Automobile total mileage storage method |
CN103309814A (en) * | 2013-05-23 | 2013-09-18 | 航天科技控股集团股份有限公司 | Method for storing odometry data of automobile in EEPROM |
CN105279048A (en) * | 2015-12-01 | 2016-01-27 | 浪潮(北京)电子信息产业有限公司 | Data recovery method and device |
CN110515537A (en) * | 2019-06-27 | 2019-11-29 | 鸿秦(北京)科技有限公司 | A method of extending solid-state disk service life |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7289991B2 (en) * | 2004-06-04 | 2007-10-30 | International Business Machines Corporation | Apparatus, system, and method for sorting character representations of data |
US20060004589A1 (en) * | 2004-07-02 | 2006-01-05 | General Motors Corporation | Method for mileage based proactive leasing in a telematics system |
CA2615324A1 (en) * | 2005-07-14 | 2007-07-05 | Yotta Yotta, Inc. | Maintaining write order fidelity on a multi-writer system |
US20070250258A1 (en) * | 2005-07-21 | 2007-10-25 | Iimap, Llc | Method and System for Accurate Reconstruction of Mileage Reports |
CN102072735B (en) * | 2009-11-24 | 2012-11-14 | 深圳市赛格导航科技股份有限公司 | Method and system for calculating mileage quickly |
US10642505B1 (en) * | 2013-01-28 | 2020-05-05 | Radian Memory Systems, Inc. | Techniques for data migration based on per-data metrics and memory degradation |
-
2021
- 2021-03-25 CN CN202110321617.3A patent/CN113010118B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5181231A (en) * | 1990-11-30 | 1993-01-19 | Texas Instruments, Incorporated | Non-volatile counting method and apparatus |
WO2010106760A1 (en) * | 2009-03-19 | 2010-09-23 | 本田技研工業株式会社 | Method and device for diagnosing driving operation |
CN102043722A (en) * | 2010-12-30 | 2011-05-04 | 重庆长安汽车股份有限公司 | Automobile total mileage storage method |
CN103309814A (en) * | 2013-05-23 | 2013-09-18 | 航天科技控股集团股份有限公司 | Method for storing odometry data of automobile in EEPROM |
CN105279048A (en) * | 2015-12-01 | 2016-01-27 | 浪潮(北京)电子信息产业有限公司 | Data recovery method and device |
CN110515537A (en) * | 2019-06-27 | 2019-11-29 | 鸿秦(北京)科技有限公司 | A method of extending solid-state disk service life |
Non-Patent Citations (2)
Title |
---|
Economic Analysis of using Distributed Energy Storage for Frequency Regulation;Nasir Mehmood等;《e-Energy "20: Proceedings of the Eleventh ACM International Conference on Future Energy Systems》;20200626;第346-350页 * |
汽车里程数据的存储算法研究;洪运富等;《仪表技术》;20070930;第26-28页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113010118A (en) | 2021-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104282342B (en) | flash memory device, memory controller and control method of flash memory | |
CN112579327B (en) | Fault detection method, device and equipment | |
CN112468369B (en) | Error detection method for CAN communication matrix of automobile | |
CN105404274A (en) | Electronic control unit of vehicle and fault code detection and recording method thereof, and vehicle | |
CN113010118B (en) | Method for processing mileage and hour meter data stored in automobile | |
CN112100184A (en) | Vehicle total mileage data storage method and computer storage medium | |
CN117194177A (en) | Method for improving detection accuracy of slow disk of storage system | |
US7404118B1 (en) | Memory error analysis for determining potentially faulty memory components | |
CN114860487A (en) | Memory fault identification method and memory fault isolation method | |
CN103309814B (en) | The storage means of odometry data of automobile in EEPROM | |
CN115062663A (en) | Digital filtering method, system, server and medium for analog signal | |
CN109709937B (en) | Electronic control unit function configuration method and device and electronic control unit | |
CN114169915A (en) | Method and device for determining price reference value of automobile parts in automobile insurance claim settlement industry | |
CN113077835A (en) | Hard disk fault detection method, device, equipment and readable storage medium | |
CN108459930B (en) | Data backup method, device and storage medium | |
CN114625385B (en) | Method and device for burning and writing efuse data of chip and storage medium | |
CN117539670A (en) | Data processing method, device, equipment and storage medium | |
CN116155693B (en) | Early warning information determination method and device of network index, server and storage medium | |
CN116347344A (en) | Method and device for monitoring running state of vehicle, storage medium and computer equipment | |
CN117591337B (en) | Computer information data interactive transmission management system and method | |
CN116088456B (en) | MES-based intelligent factory product quality monitoring method and system | |
CN118503886B (en) | Method and system for predicting fault state of power information processing equipment | |
CN116109248A (en) | Enterprise accident spare part use probability calculation method and reserve management method and device | |
CN105761760A (en) | Method for testing memory chip capable of realizing redundant function | |
CN115132266A (en) | Data protection method and device, terminal equipment and readable storage medium |
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 |