Method for balancing storage data and vehicle-mounted refrigerator applying method for balancing storage data

By using frame headers, frame counts and check bits to encapsulate data in vehicle electronic products, and periodically train erecting, the problems of data loss and erasing in the prior art are solved, and the data is balanced storage and backup are realized, and customized functions are provided.

CN120144050APending Publication Date: 2025-06-13FOSHAN ALPICOOL ELECTRIC APPLIANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510154507.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, when storing and backing up dynamically changing data of on-board electronic products, frequent rewritten fixed intervals lead to data loss and it is easy to exceed the flash rewritten limit.

Method used

By recording data variables in nonvolatile memory, adding frame headers, frame counts and check bits to encapsulate them into one frame of data, and erasing the data in a periodic training manner to form a storage area of ​​N data storage units.

Benefits of technology

It effectively solves the limitation of flash erasing times, realizes balanced storage and backup of data, reduces users' operations after turning on the refrigerator, and provides customized functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144050A_ABST
    Figure CN120144050A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of vehicle-mounted electronic control, and particularly relates to a method for storing data in a balanced mode and a vehicle-mounted refrigerator applying the method for storing the data in the balanced mode. Data variables are recorded and stored in a nonvolatile memory, the nonvolatile memory comprises Flash, EEPROM and other address intervals, a frame header, a frame count and a check bit are added into a data unit needing to be stored and packaged into a frame of data, whether read-write data is valid or not is judged through the frame header and the check bit, and latest storage data is obtained through the frame count. A storage area is composed of a plurality of data units, the frame count is offset, and the mode that the storage area is sequentially and circularly erased, written and stored is adopted. By storing and memorizing the data, a user can select whether the refrigerator needs to operate according to the working state of the last power failure when the refrigerator is powered on each time; in this way, a customized function is provided for a user, and operation after the refrigerator is started each time can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of vehicle-mounted electronic control, and particularly relates to a method for evenly storing data and a vehicle-mounted refrigerator applying the method for evenly storing data. Background Art

[0002] Before a vehicle-mounted electronic product needs to store data, it is usually stored in a fixed interval of flash by the main control program before powering off in such a simple way; when it is necessary to save dynamic changing data in real time, using this method to frequently erase and write a fixed interval cannot effectively back up the data and is prone to data loss, and is also prone to exceeding the flash erase count limit. Summary of the Invention

[0003] In order to solve the defects and deficiencies of the prior art; the purpose of the present invention is to provide a method for evenly storing data and a vehicle-mounted refrigerator applying the method for evenly storing data.

[0004] To achieve the above purpose, the technical solution adopted by the present invention is: it records the stored data variables in a non-volatile memory, and the non-volatile memory includes address intervals such as Flash and EEPROM. A frame header, a frame count, and a check bit are added to the data unit to be stored to encapsulate it into a frame of data. The read and written data is judged whether it is valid through the frame header and the check bit, and the latest stored data is obtained through the frame count.

[0005] The method for evenly storing data and the vehicle-mounted refrigerator applying the method for evenly storing data are realized as follows: S1. Power on and start, initialize the stored unit data (frame header, frame count (from 0x00 - 0xFE), data, check byte) S2. Initialize the data variables stored in flash (store N (less than the maximum value 0xFE of the frame count) data units, mark the storage unit order and the corresponding unit address) S3. Read the data in the flash storage area S4. Judge whether the frame header and the check byte of the data unit match If they do not match, the application data is initially the default state data; and data (frame header, frame count (from 0x00 - 0xFE), data, check byte) is written at the starting position of the storage unit; If they match, sort the frame counts of the data units; S5. Obtain the last written data unit to obtain the application data value.

[0006] The present invention provides a method for balanced data storage and a vehicle-mounted refrigerator applying the method for balanced data storage. By using a storage medium, such as a continuous interval or multiple discontinuous intervals of flash, a storage area of N data storage units is formed. By erasing and writing data in a cyclic polling manner, the limitation of the number of flash erasing and writing times can be effectively solved, and the function of backing up old data can be achieved.

[0007] The present invention is particularly applied to the storage of operation data of a vehicle-mounted refrigerator, such as: power-off memory flag, working switch, working mode (refrigeration, heating), refrigeration set temperature, heating set temperature, child lock switch, and off-vehicle working time, etc.; by storing and memorizing these data, users can choose whether the refrigerator needs to operate according to the working state at the last power-off each time it is powered on; in this way, customized functions are provided for users, which can reduce the operations after each time the refrigerator is turned on, greatly facilitating the users. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be described in detail by the following specific embodiments and the accompanying drawings.

[0009] Figure 1 It is a flow chart of the present invention; Figure 2 It is a specific implementation flow chart of the present invention; Figure 3 It is a flow chart of obtaining the latest unit data of two frame data in the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS

[0010] To make the purpose, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be described by the specific embodiments shown in the accompanying drawings. However, it should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.

[0011] Here, it should also be noted that in order to avoid obscuring the present invention due to unnecessary details, only the structures and / or processing steps closely related to the solution of the present invention are shown in the drawings, and other details less related to the present invention are omitted.

[0012] Refer to as Figures 1-3 shown, the following technical solutions are adopted in this specific embodiment: It records data variables stored in a non-volatile memory. The non-volatile memory includes address intervals such as Flash and EEPROM. A frame header, frame count, and check bit are added to the data unit to be stored to encapsulate it into a frame of data. Whether the read and written data is valid is judged through the frame header and check bit, and the latest stored data is obtained through the frame count; Embodiment

[0013] Find the latest stored data unit through frame counting. The method is as follows: A storage area consisting of 4 data units, with the frame count being offset. The storage area is written in a cyclic overwrite manner in sequence. When the storage area is not full, the area immediately preceding the invalid data unit read at this time is the data of the latest storage unit; when all areas have been stored, it is necessary to compare the frame counts before and after to find the data of the latest storage unit; By analyzing the sorting in the following situations, as shown in Table 1: The unit data corresponding to the offset value in bold and underlined in Table 1 is the latest data. The frame counts before and after are offset1 and offset2 respectively, and the number of data units is n; it can be obtained according to the Figure 3 process to get the latest unit data of the two frame data.

[0014] The present invention is particularly applied to storing the operating data of a vehicle-mounted refrigerator, such as: power-off memory flag, working switch, working mode (refrigeration, heating), refrigerator operating time, refrigeration set temperature, heating set temperature, child lock switch, and off-vehicle working time, etc. The steps for implementing the refrigerator data storage function are as follows: 01. Power on the refrigerator 02. Call the balanced storage module program to read the data in the storage area 03. Read the data of the latest storage unit; 031. If no data is read, assign the initial default value to the status variable, encapsulate it into a data frame, erase the FLASH storage area, and write it into the storage unit; 032. If data is read, assign values to the status variables, including power-off memory flag, working switch, working mode (refrigeration, heating), refrigerator operating time, refrigeration set temperature, heating set temperature, child lock switch, and off-vehicle working time; 04. Call variables to process each application function; 05. Change occurs through external adjustment or accumulated status data; 06. If a change occurs, encapsulate the status variable into a data frame and write it into the storage unit.

[0015] The present invention provides a method for balanced storage of data and a vehicle-mounted refrigerator applying the method for balanced storage of data. Through a storage medium, such as a continuous interval or multiple discontinuous intervals of flash, a storage area consisting of N data storage units is formed. By cyclically polling to erase and write data, it can effectively solve the limitation of the number of flash erase and write times, and can also play a role in backing up old data.

[0016] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, in any aspect, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention.

[0017] In addition, it should be understood that although this specification is described in terms of embodiments, not every embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for storing data in a balanced manner and a vehicle refrigerator using the method for storing data in a balanced manner, characterized in that: It is stored in non-volatile memory through data variable records. A frame header, frame count, and check bit are added to the data unit that needs to be stored to encapsulate it into a frame of data. The frame header and check bit are used to determine whether the read and written data is valid, and the frame count is used to obtain the latest stored data.

2. The method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 1 are characterized in that: The implementation steps are as follows: (S1), power on and start, initialize the stored unit data, frame header, frame count, data, and check byte; (S2), initializing the data variables stored in the flash, storing N data units, marking the order of the storage units and the corresponding unit addresses; (S3), read the flash storage interval data; (S4), judging whether the data unit frame header and the check byte are consistent; If it does not match, the application data is initialized to the default state data; and the data, frame header, frame count, data, and check byte are written at the beginning of the storage unit; If they match, the data unit frame counts are sorted; (S5) Acquire the last written data unit to obtain the application data value.

3. According to the method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 2, the steps for implementing the function of storing refrigerator data are as follows: (01) Turn on the refrigerator; (02) Call the balanced storage module program to read the storage area data; (03) Read the latest storage unit data; (031) If no data can be read, the state variable is assigned an initial default value, encapsulated into a data frame, the FLASH storage area is erased, and the storage unit is written; (032) If data is read, the state variables are assigned values, such as power-off memory flag, working switch, working mode, refrigerator operation time, cooling setting temperature, heating setting temperature, child lock switch and vehicle leaving working time; (04) Call variables to process various application functions; (05) Changes in status data through external adjustments or accumulation; (06) If a change occurs, the state variable is encapsulated in a data frame and written into the storage unit.

4. The method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 3 are characterized in that: The method to find the latest stored data unit by frame counting is as follows: The storage area consists of several data units, and the frame count is the offset. The storage area is erased and written in sequence in a cyclic manner. When the storage area is not full, the previous area of ​​the invalid data unit is read as the data of the latest storage unit; when all areas have been stored, it is necessary to compare the frame counts before and after to find the latest storage unit data.

5. The method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 4 are characterized in that: Through the storage medium, a continuous interval or multiple discontinuous intervals of the flash constitute the storage area of ​​N data storage units, and the data is erased and written in a periodic rotation manner.

6. The method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 5 are characterized in that: The non-volatile memory includes Flash and EEPROM address ranges.

7. The method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 6 are characterized in that: It is stored in a non-volatile memory through data variable records. The non-volatile memory includes address intervals such as Flash and EEPROM. A frame header, frame count, and check bit are added to the data unit that needs to be stored to encapsulate it into a frame of data. The validity of the read and written data is determined by the frame header and the check bit, and the latest stored data is obtained by the frame count.

8. The method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 7 are characterized in that: It finds the latest stored data unit by frame count as follows: The storage area consists of 4 data units, and the frame count is offset. The storage area is erased and written in sequence in a cyclic manner. When the storage area is not full, the previous area of ​​the invalid data unit is read as the data of the latest storage unit; when all areas have been stored, it is necessary to compare the frame counts before and after to find the latest storage unit data.

9. The method for balanced data storage and the vehicle refrigerator using the method for balanced data storage according to claim 7, characterized in that: It uses a storage medium, such as a continuous interval or multiple discontinuous intervals of flash, to form a storage area of ​​N data storage units, and erases data by periodic rotation training, which can effectively solve the limitation of the number of flash erase and write times, and can also play the role of backing up old data.