CN111209136A - Storage and backup method for parameters in charging pile - Google Patents

Storage and backup method for parameters in charging pile Download PDF

Info

Publication number
CN111209136A
CN111209136A CN201911371738.8A CN201911371738A CN111209136A CN 111209136 A CN111209136 A CN 111209136A CN 201911371738 A CN201911371738 A CN 201911371738A CN 111209136 A CN111209136 A CN 111209136A
Authority
CN
China
Prior art keywords
area
parameters
backup
charging pile
parameter
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
CN201911371738.8A
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.)
Ningbo Sanxing Smart Electric Co Ltd
Original Assignee
Ningbo Sanxing Smart Electric 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 Ningbo Sanxing Smart Electric Co Ltd filed Critical Ningbo Sanxing Smart Electric Co Ltd
Priority to CN201911371738.8A priority Critical patent/CN111209136A/en
Publication of CN111209136A publication Critical patent/CN111209136A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention relates to a storage and backup method of parameters in a charging pile, wherein the charging pile divides the parameters to be stored into three parameter backup files with the same content by adopting three-level backup on the parameters to be stored, three parameter storage areas are established in the charging pile, each parameter storage area stores one parameter backup file, when the first parameter backup file used by the charging pile is checked to have errors, the parameters in the other two storage areas are respectively and correspondingly checked according to a CRC (cyclic redundancy check) value and a hamming code, so that the self-recovery work aiming at the originally stored parameters in the charging pile is realized, the parameters in at least two parameter backup files are ensured to be effective, and all the parameter backup files are prevented from being completely invalid; even if parameter error correction cannot be realized by using the hamming codes, the charging pile still uses the default parameters of the program, and the default parameters of the program are written into the current use area of the charging pile in an overlaying mode.

Description

Storage and backup method for parameters in charging pile
Technical Field
The invention relates to the field of charging piles, in particular to a storage backup method for internal parameters of a charging pile.
Background
In recent years, the popularity of electric vehicles has become higher and higher, and meanwhile, charging pile products matched with the electric vehicles are also continuously released. As a matching product for providing electric energy for the electric automobile, a large number of parameters need to be processed in the operation process of the charging pile and the charging process of the electric automobile. Therefore, the charging pile is required to store the parameters in time so that the charging pile can be called at any time.
The existing charging pile parameter storage mainly stores a parameter in the charging pile, and then stores a CRC (cyclic redundancy check) value (namely a cyclic redundancy check) of the parameter content at the same time. When the stored parameters need to be read, the charging pile calculates the CRC value of the parameters to be read, and then compares and judges the calculated CRC value with the CRC value which is stored originally: if the calculated CRC value is consistent with the original stored CRC value, the parameter to be read is determined to be valid, and the charging pile can normally use the parameter at the moment; otherwise, the parameter to be read is determined to be invalid, and the charging pile adopts a program default value.
However, the existing charging pile parameter storage method has some problems: because only one parameter is stored in the charging pile, once the data bit of the memory in the charging pile changes suddenly, all the stored parameters are invalid, and if the stored parameters are changed suddenly by adopting the default value of the program to execute work, part of the parameters set in the operation process of the charging pile is easily lost; in addition, even if a large number of data bits in the memory are not mutated, only one data bit is mutated, the existing technology cannot automatically correct the data bits, and self-recovery work of originally stored parameters in the charging pile is difficult to realize.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a storage and backup method for parameters in a charging pile in view of the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: a storage and backup method for parameters in a charging pile is characterized by comprising the following steps:
step 1, a charging pile performs three-level storage on parameters needing to be stored to obtain three parameter backup files aiming at the parameters needing to be stored; the three parameter backup files are respectively marked as a first-level parameter backup file, a second-level parameter backup file and a third-level parameter backup file; the contents of the three parameter backup files are the same;
step 2, establishing three parameter storage areas in the charging pile so as to respectively and correspondingly store the three parameter backup files; the three parameter storage areas are respectively marked as a current use area, a first backup area and a second backup area; each parameter storage area comprises a parameter area, a CRC (cyclic redundancy check) value area and a hamming code area;
step 3, storing three parameter backup files aiming at the parameters needing to be stored into corresponding parameter storage areas respectively; the first-level parameter backup file is stored in a current use area, the second-level parameter backup file is stored in a first backup area, and the third-level parameter backup file is stored in a second backup area;
step 4, after the charging pile is electrified for the first time, initializing a memory inside the charging pile;
step 5, the charging pile respectively calculates CRC check values of all parameters in each parameter storage area and corresponding Hamming codes; wherein, in the same parameter storage area, the CRC check value and the hamming code are corresponding to each other;
step 6, writing program default parameters of the charging pile into a parameter storage area consistent with the CRC value and the Hamming code according to a mode that the CRC value and the Hamming code correspond to each other by the charging pile;
step 7, before the charging pile uses the parameters in the current using area, the validity judgment is carried out by using the CRC check value and the hamming code stored in the current using area;
step 8, calculating by the charging pile to obtain the hamming codes of all parameters in the current use area, and comparing and judging the hamming codes obtained by calculation with the hamming codes stored in the current use area:
when the hamming code is the same as the hamming code stored in the current use area, the step 9 is carried out; otherwise, the hamming code is used for correcting the error of the current use area: if the error correction is successful, the step 9 is carried out; otherwise, go to step 11;
step 9, the charging pile calculates the CRC check values of all the parameters in the current use area, and compares the calculated CRC check values with the stored CRC values of the current use area to judge the validity of all the parameters in the current use area:
when the CRC value is the same as the stored CRC value of the current use area, judging that all the parameters in the current use area are valid, and turning to the step 10; otherwise, turning to step 11;
step 10, performing error correction operation according to the error correction condition in the step 8, writing all parameters after error correction, CRC (cyclic redundancy check) values and Hamming codes into the current use area in a covering manner by the charging pile, using all updated parameters in the current use area by the charging pile, and turning to a step 16; otherwise, the charging pile uses all the parameters in the current use area, and the step 16 is directly carried out; the coverage writing aiming at the current use area is the updating of all parameters in the current use area;
step 11, calculating to obtain the hamming codes of all parameters in the backup first area, and comparing and judging the hamming codes calculated with the hamming codes stored in the backup first area:
when the hamming code is the same as the hamming code stored in the backup area, step 12 is executed; otherwise, the hamming code is used for correcting the error of the backup first area: if the error correction is successful, the step 12 is carried out; otherwise, turning to step 13;
step 12, the charging pile calculates the CRC check values of all the parameters in the backup first area, and compares the CRC check values with the stored CRC values of the backup first area to judge the validity of all the parameters in the backup first area:
when the CRC value is the same as the CRC value stored in the first backup area, judging that all parameters in the first backup area are valid, performing error correction operation according to the error correction condition in the step 11, writing all parameters subjected to error correction, the CRC value and the hamming code in the first backup area in a covering manner by a charging pile, writing all parameters in the first backup area subjected to update in the current use area in the step 10 in a covering manner, and using all parameters in the current use area subjected to update by the charging pile;
step 13, calculating to obtain the hamming codes of all parameters in the second backup area, and comparing and judging the hamming codes calculated with the hamming codes stored in the second backup area:
when the hamming code is the same as the hamming code stored in the backup second area, the step 14 is carried out; otherwise, the hamming code is used for correcting the error of the backup second area: if the error correction is successful, go to step 14; otherwise, turning to step 15;
step 14, the charging pile calculates CRC check values of all parameters in the second backup area, and compares the CRC check values with CRC values stored in the second backup area to determine validity of all parameters in the second backup area:
when the CRC value is the same as the CRC value stored in the second backup area, judging that all the parameters in the second backup area are valid, performing error correction operation according to the error correction condition in the step 13, writing all the parameters subjected to error correction, the CRC value and the hamming code into the current use area in the step 10 in a covering manner by the charging pile, and using all the parameters in the updated current use area by the charging pile; otherwise, go to step 15;
step 15, the charging pile uses program default parameters and reports parameter loss information to an operation platform to which the charging pile belongs;
and step 16, operating the charging pile by using all parameters in the current use area.
In the method for storing and backing up parameters in the charging pile, after the operation platform receives the parameter loss information reported by the charging pile, the operation platform re-issues the parameters corresponding to the parameter loss information to the charging pile.
Specifically, in the method for storing and backing up parameters in the charging pile, in step 8, the error correction of the current use area by using the hamming code includes the following steps:
step a1, reading the parameter content in the current use area;
step a2, calculating hamming codes corresponding to the contents of each parameter;
step a3, carrying out mutation bit search on the calculated hamming code:
when the mutation position of the hamming code is 0, returning the prompt that the parameter is normal;
when the burst bit of the hamming code is 1 bit, executing error correction and resetting, and returning a prompt that the parameter is normal after error correction;
and when the burst bit of the hamming code is more than 1 bit, returning an abnormal prompt that the parameter cannot be corrected.
Preferably, in the storage and backup method for parameters in the charging pile, the parameter storage area for storing the first-level parameter backup file includes a 508-byte parameter area [11] + 4-byte CRC [12] + 512-byte hamming code [13 ]; the parameter storage area for storing the second-level parameter backup file comprises a 508-byte parameter area [21] + 4-byte CRC [22] + 512-byte Hamming code [23 ]; the parameter storage area for storing the third-level parameter backup file comprises a 508-byte parameter area [31] + 4-byte CRC [32] + 512-byte Hamming code [33 ].
In step 15, when the charging pile uses the program default parameter, the program default parameter is written into the current use area in a manner that the CRC check value and the hamming code correspond to each other.
In step 9, when the current use area is valid, the validity of the backup area is determined according to the manner from step 11 to step 12: and if the first backup area is invalid, overwriting the parameters of the current use area into the first backup area.
And then, in the method for storing and backing up parameters in the charging pile, in step 9, when the current use area is valid, the validity of the backup area II is judged according to the modes of step 13 to step 14: and if the second backup area is invalid, overwriting the parameters of the current use area into the second backup area.
In step 12, writing the parameter overlay of the backup area into the current use area when the parameter in the backup area is valid; and meanwhile, according to the modes from the step 13 to the step 14, carrying out validity judgment on the backup second area: and if the second backup area is invalid, overwriting the parameters of the current use area into the second backup area.
In step 14, when the parameters in the second backup area are valid, overwriting the parameters in the second backup area into the current use area; and simultaneously overwriting the backup two area to the backup one area.
Further, in the method for storing and backing up parameters in the charging pile, the charging pile writes program default parameters into the current use area in a mode that a CRC (cyclic redundancy check) value and a hamming code correspond to each other, and synchronously writes the program default parameters into the first backup area and the second backup area.
Compared with the prior art, the invention has the advantages that:
firstly, the storage backup method for the parameters in the charging pile adopts three-level backup, namely, the parameters to be stored are divided into three parameter backup files with the same content, so that the condition that the parameters cannot be repaired when the parameters in a single parameter backup file are abnormal is avoided;
secondly, three parameter storage areas are established in the charging pile, each parameter storage area stores one parameter backup file, when the first parameter backup file (namely the first-level parameter backup file) used by the charging pile is checked to be wrong, the CRC check value and the hamming code are used for correspondingly checking and correcting the parameters in the other two storage areas respectively, and the parameters which are successfully corrected are written into the other parameter storage areas in an overlaying manner, so that the self-recovery work of the originally stored parameters in the charging pile is realized, at least two parameter backup files are ensured to have effective parameters, and the condition that all the parameter backup files are completely invalid is prevented;
finally, even if the parameter correction in each parameter storage area can not be realized by utilizing the hamming code, the charging pile still uses the program default parameters, writes the program default parameters into the current use area of the charging pile in a covering manner, and simultaneously reports the parameter loss information to the operation platform to which the charging pile belongs.
Drawings
Fig. 1 is a schematic diagram illustrating corresponding storage between three parameter backup files and three corresponding parameter storage areas according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying examples.
The embodiment provides a storage and backup method for parameters in a charging pile, which comprises the following steps:
step 1, a charging pile performs three-level storage on parameters needing to be stored to obtain three parameter backup files aiming at the parameters needing to be stored; wherein, the three parameter backup files are respectively marked as first-level parameter backup File files1Second level parameter backup File2And third-level parameter backup File3(ii) a The contents of the three parameter backup files are the same;
step 2, establishing three parameter storage areas in the charging pile so as to respectively and correspondingly store the three parameter backup files; wherein, the three parameter storage areas are respectively marked as the current use area A1Backup a zone A2And backup second area A3(ii) a Each parameter storage area comprises a parameter area, a CRC (cyclic redundancy check) value area and a hamming code area; for example, in this embodiment, the parameter storage area storing the first level parameter backup file includes a 508 byte parameter area [11]]+4 byte CRC [12]+512 bytes hamming code [13](ii) a The parameter storage area for storing the second level parameter backup file comprises a 508 byte parameter area [21]]+4 byte CRC [22]+512 bytes hamming code [23](ii) a The parameter storage area for storing the third-level parameter backup file comprises a 508-byte parameter area [31]]+4 byte CRC [32]]+512 bytes hamming code [33];
Step 3, respectively storing three parameter backup files aiming at the parameters to be stored into corresponding parameter storage areas; wherein, the first level parameter backups the File1Store to the current use area A1Second level parameter backup File2Store to the backup one area A2Third level parameter backup File3Store to backup two area A3(ii) a The corresponding storage relationship between the three parameter backup files and the corresponding three parameter storage areas is shown in fig. 1; it should be noted that, the storage backup method for the parameters in the charging pile adopts three-level backup, that is, the parameters to be stored are divided into three parameter backup files with the same content, so that the condition that the parameters cannot be repaired when the parameters in a single parameter backup file are abnormal is avoided;
step 4, after the charging pile is electrified for the first time, initializing a memory inside the charging pile;
step 5, the charging pile respectively calculates CRC check values of all parameters in each parameter storage area and corresponding Hamming codes; wherein, in the same parameter storage area, the CRC check value and the hamming code are corresponding to each other; specifically, for a parameter storage area, only one CRC check value can be obtained through calculation for all parameters in the parameter storage area;
step 6, writing program default parameters of the charging pile into a parameter storage area consistent with the CRC value and the Hamming code according to a mode that the CRC value and the Hamming code correspond to each other by the charging pile;
step 7, before the charging pile uses the parameters in the current use area, the validity judgment is carried out by using the CRC check value and the hamming code stored in the current use area;
step 8, calculating by the charging pile to obtain the hamming codes of all parameters in the current use area, and comparing and judging the hamming codes obtained by calculation with the hamming codes stored in the current use area:
when the hamming code is the same as the hamming code stored in the current use area, step 9 is executed; otherwise, the hamming code is used for correcting the error of the current use area: if the error correction is successful, the step 9 is carried out; otherwise, go to step 11;
specifically, in step 8, the error correction of the current usage area by using the hamming code includes the following steps:
a1, reading the parameter content in the current use area;
step a2, calculating hamming codes corresponding to the contents of each parameter;
step a3, carrying out mutation bit search on the calculated hamming code:
when the mutation bit of the hamming code is 0 bit, returning the prompt that the parameter is normal;
when the mutation bit of the hamming code is 1 bit, executing error correction and resetting, and returning a prompt that the parameter is normal after error correction;
and when the burst bit of the hamming code is more than 1 bit, returning an abnormal prompt that the parameter cannot be corrected.
Step 9, the charging pile calculates the CRC check values of all the parameters in the current use area, and compares the calculated CRC check values with the stored CRC values of the current use area to judge the validity of all the parameters in the current use area:
when the CRC value is the same as the stored CRC value of the current use area, judging that all the parameters in the current use area are valid, and turning to the step 10; otherwise, turning to step 11;
step 10, performing error correction operation according to the error correction condition in the step 8, writing all parameters after error correction, CRC (cyclic redundancy check) values and Hamming codes into the current use area by the charging pile in a covering manner, using all the parameters in the updated current use area by the charging pile, and turning to the step 16; otherwise, the charging pile directly transfers to the step 16 by using all parameters in the current use area; the coverage writing aiming at the current use area is the updating of all parameters in the current use area;
step 11, calculating to obtain the hamming codes of all parameters in the backup first area, and comparing and judging the hamming codes calculated with the hamming codes stored in the backup first area:
when the hamming code is the same as the hamming code stored in the backup area, step 12 is executed; otherwise, using the hamming code to correct the error of the backup area: if the error correction is successful, the step 12 is carried out; otherwise, turning to step 13;
step 12, the charging pile calculates the CRC check values of all the parameters in the backup first area, and compares the CRC check values with the stored CRC values in the backup first area to judge the validity of all the parameters in the backup first area:
when the CRC value is the same as the stored CRC value of the first backup area, judging that all parameters in the first backup area are valid, performing error correction operation according to the error correction condition in the step 11, writing all parameters after error correction, the CRC value and the hamming code into the first backup area in a covering manner by a charging pile, writing all parameters in the first updated backup area into the current use area in the step 10 in a covering manner, and using all parameters in the current use area after update by the charging pile;
step 13, calculating to obtain the hamming codes of all parameters in the second backup area, and comparing and judging the hamming codes calculated with the hamming codes stored in the second backup area:
when the hamming code is the same as the hamming code stored in the backup second area, step 14 is carried out; otherwise, the hamming code is used for correcting errors of the backup second area: if the error correction is successful, go to step 14; otherwise, turning to step 15;
step 14, the charging pile calculates the CRC check values of all the parameters in the second backup area, and compares the CRC check values with the stored CRC values in the second backup area to judge the validity of all the parameters in the second backup area:
when the CRC value is the same as the CRC value stored in the second backup area, judging that all the parameters in the second backup area are valid, performing error correction operation according to the error correction condition in the step 13, writing all the parameters subjected to error correction, the CRC value and the hamming code into the current use area in the step 10 in a covering manner by the charging pile, and using all the parameters in the updated current use area by the charging pile; otherwise, go to step 15;
step 15, the charging pile uses program default parameters and reports parameter loss information to an operation platform to which the charging pile belongs; when the charging pile uses the program default parameters, the program default parameters are written into the current use area according to the mode that the CRC check value and the Hamming code correspond to each other. Specifically, in this embodiment, the charging pile writes the program default parameter into the current use area in a manner that the CRC check value and the hamming code correspond to each other, and synchronously writes the program default parameter into the first backup area and the second backup area;
and step 16, operating the charging pile by using all parameters in the current use area.
According to the embodiment, three parameter storage areas are established in the charging pile, each parameter storage area stores one parameter backup file, when the first parameter backup file (namely the first-level parameter backup file) used by the charging pile is checked to be wrong, the CRC check value and the hamming code are used for correspondingly checking and correcting the parameters in the other two storage areas, and the parameters which are successfully corrected are written into the other parameter storage areas in a covering manner, so that the self-recovery work of the originally stored parameters in the charging pile is realized, at least two parameter backup files are ensured to have effective parameters, and the condition that all the parameter backup files are completely invalid is prevented.
Of course, after receiving the parameter loss information reported by the charging pile, the operation platform re-issues the parameter corresponding to the parameter loss information to the charging pile.
In step 9, when the current use area is valid, the charging pile performs validity judgment on the backup area according to the manner from step 11 to step 12: and if the backup one area is invalid, overwriting the parameters of the current use area into the backup one area. In step 9, when the currently used area is valid, the validity of the backup second area is determined in the manner of steps 13 to 14: and if the second backup area is invalid, overwriting the parameters of the current use area into the second backup area.
Of course, in step 12, when the parameter in the backup area is valid, the parameter of the backup area is written into the current use area in an overwriting manner; and meanwhile, according to the modes from the step 13 to the step 14, carrying out validity judgment on the backup second area: and if the second backup area is invalid, overwriting the parameters of the current use area into the second backup area. In addition, in step 14, when the parameters in the second backup area are valid, overwriting the parameters in the second backup area into the current use area; and simultaneously writing the parameter coverage of the backup second area into the backup first area.
Although preferred embodiments of the present invention have been described in detail hereinabove, it should be clearly understood that modifications and variations of the present invention are possible to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A storage and backup method for parameters in a charging pile is characterized by comprising the following steps:
step 1, a charging pile performs three-level storage on parameters needing to be stored to obtain three parameter backup files aiming at the parameters needing to be stored; the three parameter backup files are respectively marked as a first-level parameter backup file, a second-level parameter backup file and a third-level parameter backup file; the contents of the three parameter backup files are the same;
step 2, establishing three parameter storage areas in the charging pile so as to respectively and correspondingly store the three parameter backup files; the three parameter storage areas are respectively marked as a current use area, a first backup area and a second backup area; each parameter storage area comprises a parameter area, a CRC (cyclic redundancy check) value area and a hamming code area;
step 3, storing three parameter backup files aiming at the parameters needing to be stored into corresponding parameter storage areas respectively; the first-level parameter backup file is stored in a current use area, the second-level parameter backup file is stored in a first backup area, and the third-level parameter backup file is stored in a second backup area;
step 4, after the charging pile is electrified for the first time, initializing a memory inside the charging pile;
step 5, the charging pile respectively calculates CRC check values of all parameters in each parameter storage area and corresponding Hamming codes; wherein, in the same parameter storage area, the CRC check value and the hamming code are corresponding to each other;
step 6, writing program default parameters of the charging pile into a parameter storage area consistent with the CRC value and the Hamming code according to a mode that the CRC value and the Hamming code correspond to each other by the charging pile;
step 7, before the charging pile uses the parameters in the current using area, the validity judgment is carried out by using the CRC check value and the hamming code stored in the current using area;
step 8, calculating by the charging pile to obtain the hamming codes of all parameters in the current use area, and comparing and judging the hamming codes obtained by calculation with the hamming codes stored in the current use area:
when the hamming code is the same as the hamming code stored in the current use area, the step 9 is carried out; otherwise, the hamming code is used for correcting the error of the current use area: if the error correction is successful, the step 9 is carried out; otherwise, go to step 11;
step 9, the charging pile calculates the CRC check values of all the parameters in the current use area, and compares the calculated CRC check values with the stored CRC values of the current use area to judge the validity of all the parameters in the current use area:
when the CRC value is the same as the stored CRC value of the current use area, judging that all the parameters in the current use area are valid, and turning to the step 10; otherwise, turning to step 11;
step 10, performing error correction operation according to the error correction condition in the step 8, writing all parameters after error correction, CRC (cyclic redundancy check) values and Hamming codes into the current use area in a covering manner by the charging pile, using all updated parameters in the current use area by the charging pile, and turning to a step 16; otherwise, the charging pile uses all the parameters in the current use area, and the step 16 is directly carried out; the coverage writing aiming at the current use area is the updating of all parameters in the current use area;
step 11, calculating to obtain the hamming codes of all parameters in the backup first area, and comparing and judging the hamming codes calculated with the hamming codes stored in the backup first area:
when the hamming code is the same as the hamming code stored in the backup area, step 12 is executed; otherwise, the hamming code is used for correcting the error of the backup first area: if the error correction is successful, the step 12 is carried out; otherwise, turning to step 13;
step 12, the charging pile calculates the CRC check values of all the parameters in the backup first area, and compares the CRC check values with the stored CRC values of the backup first area to judge the validity of all the parameters in the backup first area:
when the CRC value is the same as the CRC value stored in the first backup area, judging that all parameters in the first backup area are valid, performing error correction operation according to the error correction condition in the step 11, writing all parameters subjected to error correction, the CRC value and the hamming code in the first backup area in a covering manner by a charging pile, writing all parameters in the first backup area subjected to update in the current use area in the step 10 in a covering manner, and using all parameters in the current use area subjected to update by the charging pile;
step 13, calculating to obtain the hamming codes of all parameters in the second backup area, and comparing and judging the hamming codes calculated with the hamming codes stored in the second backup area:
when the hamming code is the same as the hamming code stored in the backup second area, the step 14 is carried out; otherwise, the hamming code is used for correcting the error of the backup second area: if the error correction is successful, go to step 14; otherwise, turning to step 15;
step 14, the charging pile calculates CRC check values of all parameters in the second backup area, and compares the CRC check values with CRC values stored in the second backup area to determine validity of all parameters in the second backup area:
when the CRC value is the same as the CRC value stored in the second backup area, judging that all the parameters in the second backup area are valid, performing error correction operation according to the error correction condition in the step 13, writing all the parameters subjected to error correction, the CRC value and the hamming code into the current use area in the step 10 in a covering manner by the charging pile, and using all the parameters in the updated current use area by the charging pile; otherwise, go to step 15;
step 15, the charging pile uses program default parameters and reports parameter loss information to an operation platform to which the charging pile belongs;
and step 16, operating the charging pile by using all parameters in the current use area.
2. The method for storing and backing up parameters in the charging pile according to claim 1, wherein after the operation platform receives the parameter loss information reported by the charging pile, the operation platform re-issues the parameters corresponding to the parameter loss information to the charging pile.
3. The method for storing and backing up parameters in a charging pile according to claim 1, wherein the step 8 of correcting the current use area by using hamming codes comprises the following steps a 1-a 3:
step a1, reading the parameter content in the current use area;
step a2, calculating hamming codes corresponding to the contents of each parameter;
step a3, carrying out mutation bit search on the calculated hamming code:
when the mutation position of the hamming code is 0, returning the prompt that the parameter is normal;
when the burst bit of the hamming code is 1 bit, executing error correction and resetting, and returning a prompt that the parameter is normal after error correction;
and when the burst bit of the hamming code is more than 1 bit, returning an abnormal prompt that the parameter cannot be corrected.
4. The method for storing and backing up parameters in the charging pile according to any one of claims 1 to 3, wherein the parameter storage area for storing the first-level parameter backup file comprises a 508-byte parameter area [11] + 4-byte CRC [12] + 512-byte Hamming code [13 ]; the parameter storage area for storing the second-level parameter backup file comprises a 508-byte parameter area [21] + 4-byte CRC [22] + 512-byte Hamming code [23 ]; the parameter storage area for storing the third-level parameter backup file comprises a 508-byte parameter area [31] + 4-byte CRC [32] + 512-byte Hamming code [33 ].
5. The method for storing and backing up parameters in the charging pile according to claim 1, wherein in step 15, when the charging pile uses program default parameters, the program default parameters are written into the current use area in a manner that a CRC check value and a hamming code correspond to each other.
6. The method for storing and backing up parameters in the charging pile according to claim 1, wherein in step 9, when the current use area is valid, the validity judgment is performed on the backup area according to the method from step 11 to step 12: and if the first backup area is invalid, overwriting the parameters of the current use area into the first backup area.
7. The method for storing and backing up parameters in the charging pile according to claim 1, wherein in step 9, when the current use area is valid, the validity of the backup second area is judged according to the methods from step 13 to step 14: and if the second backup area is invalid, overwriting the parameters of the current use area into the second backup area.
8. The method for storing and backing up parameters in a charging pile according to claim 1, wherein in step 12, when the parameters in the backup first area are valid, the parameters in the backup first area are overwritten into the current use area; and meanwhile, according to the modes from the step 13 to the step 14, carrying out validity judgment on the backup second area: and if the second backup area is invalid, overwriting the parameters of the current use area into the second backup area.
9. The method for storing and backing up parameters in a charging pile according to claim 1, wherein in step 14, when the parameters in the second backup area are valid, the parameters in the second backup area are overwritten into the current use area; and simultaneously overwriting the backup two area to the backup one area.
10. The method for storing and backing up parameters in the charging pile according to claim 5, wherein the charging pile writes the program default parameters into the current use area according to a mode that a CRC (cyclic redundancy check) value and a Hamming code correspond to each other, and synchronously writes the program default parameters into the first backup area and the second backup area.
CN201911371738.8A 2019-12-27 2019-12-27 Storage and backup method for parameters in charging pile Pending CN111209136A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911371738.8A CN111209136A (en) 2019-12-27 2019-12-27 Storage and backup method for parameters in charging pile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911371738.8A CN111209136A (en) 2019-12-27 2019-12-27 Storage and backup method for parameters in charging pile

Publications (1)

Publication Number Publication Date
CN111209136A true CN111209136A (en) 2020-05-29

Family

ID=70786413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911371738.8A Pending CN111209136A (en) 2019-12-27 2019-12-27 Storage and backup method for parameters in charging pile

Country Status (1)

Country Link
CN (1) CN111209136A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198269A (en) * 2012-01-06 2013-07-10 上海华虹集成电路有限责任公司 Anti-failure key storage module
CN108874576A (en) * 2017-05-10 2018-11-23 中国航空工业集团公司西安飞行自动控制研究所 A kind of data-storage system based on Error Correction of Coding
CN110083479A (en) * 2018-01-25 2019-08-02 宁波三星医疗电气股份有限公司 A kind of EEPROM data guard method of intelligent electric energy meter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198269A (en) * 2012-01-06 2013-07-10 上海华虹集成电路有限责任公司 Anti-failure key storage module
CN108874576A (en) * 2017-05-10 2018-11-23 中国航空工业集团公司西安飞行自动控制研究所 A kind of data-storage system based on Error Correction of Coding
CN110083479A (en) * 2018-01-25 2019-08-02 宁波三星医疗电气股份有限公司 A kind of EEPROM data guard method of intelligent electric energy meter

Similar Documents

Publication Publication Date Title
CN108062259B (en) MCU internal data storage ECC processing system and processing method thereof
EP2550745B1 (en) Non-regular parity distribution detection via metadata tag
US6883131B2 (en) XOR processing incorporating error correction code data protection
US8347179B2 (en) Selective storage of additional inversion data or EDC data
US8280579B2 (en) Memory management apparatus
JP2830308B2 (en) Information processing device
US6622205B1 (en) Process for the secure writing of a pointer for a circular memory
CN111176890B (en) Satellite-borne software data storage and anomaly recovery method
CN104978534A (en) Method and system for preventing vehicle mileage tampering
US5721739A (en) Method for detecting read errors, correcting single-bit read errors and reporting multiple-bit read errors
WO2017008501A1 (en) Method for recovering data when error occurring in nand flash cannot be corrected by ecc
TW201305809A (en) Flash memory controller and data read method
CN111459708A (en) Bad block processing method and device
CN111209136A (en) Storage and backup method for parameters in charging pile
US6941413B2 (en) Nonvolatile memory, its data updating method, and card reader equipped with such nonvolatile memory
CN111966071A (en) Data classification, storage and verification method for vehicle-mounted controller
CN101128802B (en) Method for data protection and device for carrying out the same
JP3106947B2 (en) Nonvolatile semiconductor memory device
US6654288B2 (en) Method and device for backing up data in a memory module and memory module
CN101366009B (en) Data processing system and a method for the operation thereof
CN112559059B (en) BIOS (basic input output System) option configuration method and related device
CN112099833B (en) Remote updating method for firmware of spaceborne computer
US20100083073A1 (en) Data processing apparatus, memory controlling circuit, and memory controlling method
CN112286550A (en) Security signature algorithm for system upgrade of embedded equipment
US10866867B2 (en) Method of error correction in a flash memory

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