CN113220234B - Terminal data storage management method and manager - Google Patents

Terminal data storage management method and manager Download PDF

Info

Publication number
CN113220234B
CN113220234B CN202110532325.4A CN202110532325A CN113220234B CN 113220234 B CN113220234 B CN 113220234B CN 202110532325 A CN202110532325 A CN 202110532325A CN 113220234 B CN113220234 B CN 113220234B
Authority
CN
China
Prior art keywords
data
storage
file
integer
value
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
Application number
CN202110532325.4A
Other languages
Chinese (zh)
Other versions
CN113220234A (en
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.)
Jiangsu Linyang Energy Co ltd
Nanjing Linyang Power Tech Co ltd
Original Assignee
Jiangsu Linyang Energy Co ltd
Nanjing Linyang Power Tech 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 Jiangsu Linyang Energy Co ltd, Nanjing Linyang Power Tech Co ltd filed Critical Jiangsu Linyang Energy Co ltd
Priority to CN202110532325.4A priority Critical patent/CN113220234B/en
Publication of CN113220234A publication Critical patent/CN113220234A/en
Application granted granted Critical
Publication of CN113220234B publication Critical patent/CN113220234B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides a terminal data storage management method and a manager, wherein the manager comprises the following steps: the terminal data configuration module is used for configuring a storage file for the part of the divided terminal data; and the terminal data storage module is used for acquiring the real-time power data of the terminal, and directly recording or mapping the corresponding storage file for storage according to the divided part of the terminal. The invention uses the file system to manage the storage data, and uses the same value data to carry out mapping and pointer, thereby saving the storage space, reducing the erasing frequency, and achieving the purposes of balanced erasing, increasing the storage capacity and prolonging the service life of the terminal.

Description

Terminal data storage management method and manager
Technical Field
The invention belongs to the field of electric power, and particularly relates to a terminal data storage management method and a manager.
Background
The intelligent power grid is a novel power grid which is based on a physical power grid and integrates modern advanced sensing telemetry technology, communication technology, information technology, computer technology and control technology. The method aims at realizing the reliability, safety, economy, high efficiency, environmental friendliness and use safety of the power grid, provides the satisfied electric energy quality for users, starts the electric power market, and optimizes and efficiently operates the assets. In order to adapt to complex operation conditions, meet refined power consumption requirements and accurately predict power consumption loads, a large amount of multidimensional and high-density data are required for supporting a smart power grid. At present, a large number of terminal devices in a power grid, including a concentrator, a collector, an intelligent electric meter and the like, are all embedded devices, and are generally in modes of eeprom, nor flash, nand flash and the like, so that the storage capacity and the erasing times are limited, and the contradiction between the increasing data storage requirement and the storage with the limited capacity is further aggravated.
Disclosure of Invention
The invention aims to provide a terminal data storage management method and a manager aiming at the problems of low storage capacity and limited erasing times of the existing terminal equipment.
The technical scheme of the invention is as follows:
the invention provides a terminal data storage management method, which comprises the following steps:
a configuration step:
s1, dividing power data into an integer part, a decimal part and a pulse number part;
s2, respectively configuring files for an integer part of the power data, a CRC (cyclic redundancy check) value part of the integer part and a pulse number part to store corresponding data, wherein the files comprise an integer storage file F, a CRC value storage file C of the integer part and a pulse number storage file T;
s3, in the terminal data storage system, dividing N data storage fragments for storing reference data structure units of continuous addresses, wherein a reference data structure M stored in each reference data structure unit is as follows:
integer mapping | decimal value | pulse number pointer | CRC
The integer mapping is used for pointing to the corresponding integer storage address in the F file, the decimal value is directly stored in the reference data structure unit, and the pulse number pointer is used for pointing to the corresponding pulse number in the T file; CRC is the check value of the datum data;
a storage step:
s4, acquiring real-time power data of the terminal, and comparing the integer part of the data with the data in the integer storage file F:
if the same value exists, recording the address of the same value;
if the values are not the same, writing the value in F, recording the value address, and regenerating the CRC check value of the integer storage file F set and writing the check value in the CRC check value storage file C of the integer part;
s5, directly recording the decimal part of the data in a corresponding position of the reference data structure unit; the pulse number part of the data searches an address of a corresponding value in a pulse number storage file T and generates a pointer pointing to the corresponding value;
and S6, generating CRC of the data, and storing the CRC in the data storage sub-slice according to the reference data structure M.
Furthermore, 10 continuous fixed addresses are arranged in the pulse number storage file T, and the pulse numbers of 0-9 are configured to be used as the addresses for storing the pulse numbers; the file is a non-erasable file, and data in the file is used as a constant.
Further, in the storage step, the storage sequence is sequentially from top to bottom; when a data memory slice is full, the next piece of data begins to be stored from the beginning of the next data memory slice.
Further, in step S6, after the data is stored, the file manager checks the currently stored data:
calling integer data of the corresponding integer storage address in the F file according to the integer mapping, and calling the corresponding pulse number in the T file according to the pulse number pointer;
splicing the called integer data, the decimal part recorded at the corresponding position in the reference data structure unit and the called pulse number into real-time power data, and generating a CRC value;
and comparing the generated CRC value with a CRC value stored in the data storage structure M, and if the generated CRC value is different from the CRC value stored in the data storage structure M, indicating that the data is in error, and rolling the current data back to the previous data.
Further, when the number of times of erasing the integer storage file F and the number of times of erasing the integer part CRC check value storage file C reach m times respectively, the file manager starts updating, a new address range is designated, and a new address is started from the next data erasing and writing for balanced erasing and writing.
Further, m =10.
A terminal data storage manager, comprising:
the terminal data configuration module is used for configuring a storage file for the part of the divided terminal data;
and the terminal data storage module is used for acquiring the real-time power data of the terminal, and directly recording or mapping the corresponding storage file for storage according to the divided part of the data.
Further, storing the file includes: an integer storage file F, a CRC check value storage file C of an integer part, a pulse number storage file T and a main file set B.
Further, storing the file includes: the main file set B is a file with continuous addresses and is used as a container for storing a reference data structure unit, and the reference data structure M is as follows: integer mapping | decimal value | pulse number pointer | CRC.
The invention has the beneficial effects that:
the invention adopts data segmentation to store, and utilizes the same-value data to carry out mapping and pointer, thereby effectively reducing the data storage capacity and improving the current situation of terminal storage capacity shortage; the erasing times are effectively reduced, and the performance and the service life of the terminal data storage hardware are protected.
The invention uses the file manager to balance the erasing data addresses, improves the use condition of the terminal data storage hardware and reduces the possibility of bad blocks.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
Fig. 1 shows a schematic structural diagram of a terminal data storage tube according to the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein.
The invention provides a terminal data storage management method, which comprises the following steps:
a configuration step:
s1, dividing power data into an integer part, a decimal part and a pulse number part;
s2, respectively configuring files for an integer part of the power data, a CRC (cyclic redundancy check) value part of the integer part and a pulse number part to store corresponding data, wherein the files comprise an integer storage file F, a CRC value storage file C of the integer part and a pulse number storage file T; 10 continuous fixed addresses are arranged in the pulse number storage file T, and the pulse number 0-9 is configured to be used as the address for storing the pulse number; the file is a non-erasable file, and data in the file is used as a constant;
s3, in the terminal data storage system, dividing N data storage fragments for storing reference data structure units of continuous addresses, wherein a reference data structure M stored in each reference data structure unit is as follows:
integer mapping | decimal value | pulse number pointer | CRC
The integer mapping is used for pointing to a corresponding integer storage address in the F file, the decimal value is directly stored in the reference data structure unit, and the pulse number pointer is used for pointing to a corresponding pulse number in the T file; CRC is the check value of the datum data;
a storage step:
s4, acquiring real-time electric power data of the terminal, and comparing the integer part of the data with the data in the integer storage file F:
if the same value exists, recording the address of the same value;
if the values are not the same, writing the value in F, recording the value address, and regenerating the CRC check value of the integer storage file F set and writing the check value in the CRC check value storage file C of the integer part;
s5, directly recording the decimal part of the data in a corresponding position of the reference data structure unit; the pulse number part of the data searches an address of a corresponding value in a pulse number storage file T and generates a pointer pointing to the corresponding value;
and S6, generating CRC of the data, and storing the CRC in the data storage sub-slice according to the reference data structure M.
In the storage process, the storage sequence is sequentially from top to bottom; when one data storage slice is full, the next piece of data begins to be stored from the beginning of the next data storage slice.
After data storage, the file manager checks the current storage data:
calling integer data of the corresponding integer storage address in the F file according to the integer mapping, and calling the corresponding pulse number in the T file according to the pulse number pointer;
splicing the called integer data, the decimal part recorded at the corresponding position in the reference data structure unit and the called pulse number into real-time power data, and generating a CRC value;
and comparing the generated CRC value with a CRC value stored in the data storage structure M, and if the generated CRC value is different from the CRC value stored in the data storage structure M, indicating that the data is in error, and rolling the current data back to the previous data.
In the embodiment, a plurality of management files are used for storing data, and a mode of mapping and pointing by using the same-value data is utilized, so that the storage space is saved, the storage capacity is increased, the service life of equipment is prolonged, the data storage capacity is effectively reduced, and the current situation that the storage capacity of the terminal is in shortage is improved.
Further, when the number of times of erasing the integer storage file F and the number of times of erasing the integer part CRC check value storage file C respectively reach m times, the file manager starts updating, a new address range is designated, and from the next data erasing, a new address is started for balanced erasing. Preferably, m =10.
In the embodiment, the file manager is used for effectively managing the storage addresses of the integral storage file F and the check value storage file C, and balancing the erasing data addresses, so that the use condition of the terminal data storage hardware is improved, and the possibility of bad blocks is reduced.
A terminal data storage manager, comprising:
the terminal data configuration module is used for configuring a storage file for the part of the divided terminal data;
and the terminal data storage module is used for acquiring the real-time power data of the terminal, and directly recording or mapping the corresponding storage file for storage according to the divided part of the data.
Wherein storing the file comprises: an integer storage file F, a CRC check value storage file C of an integer part, a pulse number storage file T and a main file set B;
the main file set B is a file with continuous addresses and is used as a container for storing a reference data structure unit, and the reference data structure M is as follows: integer mapping | decimal value | pulse number pointer | CRC.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.

Claims (9)

1. A terminal data storage management method is characterized by comprising the following steps:
a configuration step:
s1, dividing power data into an integer part, a decimal part and a pulse number part;
s2, respectively configuring files for an integer part of the power data, a CRC (cyclic redundancy check) value part of the integer part and a pulse number part to store corresponding data, wherein the files comprise an integer storage file F, a CRC value storage file C of the integer part and a pulse number storage file T;
s3, in the terminal data storage system, dividing N data storage fragments for storing reference data structure units of continuous addresses, wherein a reference data structure M stored in each reference data structure unit is as follows:
integer mapping | decimal value | pulse number pointer | CRC
The integer mapping is used for pointing to the corresponding integer storage address in the F file, the decimal value is directly stored in the reference data structure unit, and the pulse number pointer is used for pointing to the corresponding pulse number in the T file; CRC is the check value of the datum data;
a storage step:
s4, acquiring real-time power data of the terminal, and comparing the integer part of the data with the data in the integer storage file F:
if the same value exists, recording the address of the same value;
if the values are not the same, writing the value in F, recording the value address, and regenerating the CRC check value of the integer storage file F set and writing the check value in the CRC check value storage file C of the integer part;
s5, directly recording the decimal part of the data in a corresponding position of the reference data structure unit; the pulse number part of the data searches an address of a corresponding value in a pulse number storage file T and generates a pointer pointing to the corresponding value;
and S6, generating CRC of the data, and storing the CRC in the data storage sub-slice according to the reference data structure M.
2. The terminal data storage management method according to claim 1, wherein 10 consecutive fixed addresses are provided in the pulse number storage file T, and pulse numbers 0 to 9 are configured as addresses for storing pulse numbers; the file is a non-erasable file, and data in the file is used as a constant.
3. The terminal data storage management method according to claim 1, characterized in that: in the storage step, the storage sequence is sequentially from top to bottom; when one data storage slice is full, the next piece of data begins to be stored from the beginning of the next data storage slice.
4. The terminal data storage management method according to claim 1, characterized in that: in step S6, after the data is stored, the file manager checks the currently stored data:
calling integer data of the corresponding integer storage address in the F file according to the integer mapping, and calling the corresponding pulse number in the T file according to the pulse number pointer;
splicing the called integer data, the decimal part recorded at the corresponding position in the reference data structure unit and the called pulse number into real-time power data, and generating a CRC value;
and comparing the generated CRC value with a CRC value stored in the data storage structure M, and if the generated CRC value is different from the CRC value stored in the data storage structure M, indicating that the data is in error, and rolling the current data back to the previous data.
5. The terminal data storage management method according to claim 1, characterized in that: and when the erasing times of the integer storage file F and the CRC check value storage file C of the integer part respectively reach m times, the file manager starts updating, specifies a new address range, starts a new address from the next data erasing and writing, and performs balanced erasing and writing.
6. The terminal data storage management method according to claim 5, wherein: m =10.
7. A terminal data storage manager for use in a terminal data storage management method according to any one of claims 1 to 6, comprising:
the terminal data configuration module is used for configuring a storage file for the part of the divided terminal data;
and the terminal data storage module is used for acquiring the real-time power data of the terminal, and directly recording or mapping the corresponding storage file for storage according to the divided part of the data.
8. The terminal data storage manager of claim 7, wherein: the storage file comprises: an integer storage file F, a CRC check value storage file C of an integer part, a pulse number storage file T and a main file set B.
9. The terminal data storage manager of claim 7, wherein: the storage file comprises: the main file set B is a file with continuous addresses and is used as a container for storing a reference data structure unit, and the reference data structure M is as follows: integer mapping | decimal value | pulse number pointer | CRC.
CN202110532325.4A 2021-05-17 2021-05-17 Terminal data storage management method and manager Active CN113220234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110532325.4A CN113220234B (en) 2021-05-17 2021-05-17 Terminal data storage management method and manager

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110532325.4A CN113220234B (en) 2021-05-17 2021-05-17 Terminal data storage management method and manager

Publications (2)

Publication Number Publication Date
CN113220234A CN113220234A (en) 2021-08-06
CN113220234B true CN113220234B (en) 2022-10-21

Family

ID=77092147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110532325.4A Active CN113220234B (en) 2021-05-17 2021-05-17 Terminal data storage management method and manager

Country Status (1)

Country Link
CN (1) CN113220234B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055806A (en) * 2010-12-31 2011-05-11 重庆亚德科技股份有限公司 Remote intelligent terminal service control system
CN103425546A (en) * 2013-08-14 2013-12-04 江苏林洋电子股份有限公司 General high-efficient reliable Nor Flash data memory management method
CN106446126A (en) * 2016-09-19 2017-02-22 哈尔滨航天恒星数据系统科技有限公司 Massive space information data storage management method and storage management device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055806A (en) * 2010-12-31 2011-05-11 重庆亚德科技股份有限公司 Remote intelligent terminal service control system
CN103425546A (en) * 2013-08-14 2013-12-04 江苏林洋电子股份有限公司 General high-efficient reliable Nor Flash data memory management method
CN106446126A (en) * 2016-09-19 2017-02-22 哈尔滨航天恒星数据系统科技有限公司 Massive space information data storage management method and storage management device

Also Published As

Publication number Publication date
CN113220234A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
WO2021091489A1 (en) Method and apparatus for storing time series data, and server and storage medium thereof
CN201387448Y (en) Multi-functional electric energy meter with high-reliability data storage function
US6742078B1 (en) Management, data link structure and calculating method for flash memory
CN111177143B (en) Key value data storage method and device, storage medium and electronic equipment
CN113419675B (en) Write operation method and read operation method for memory
CN113419975B (en) Control system of memory, address mapping method and address mapping device
CN110515542A (en) Date storage method, calculates equipment, storage system and storage medium at device
CN104659881A (en) Charging method and device for mobile terminal
CN114138193A (en) Data writing method, device and equipment for solid state disk with partitioned name space
CN114647534B (en) Data storage method and device based on digital control equipment
CN114253871A (en) Method, system and device for storing and managing data of intelligent electric meter
JP7058786B1 (en) Storage battery control device
CN113220234B (en) Terminal data storage management method and manager
CN112486861B (en) Solid state disk mapping table data query method and device, computer equipment and storage medium
CN108365283A (en) Device battery and unmanned plane
CN115129244B (en) FLASH chip-based battery management system data storage management method
CN107678977A (en) The reading/writing method and device of a kind of counter
CN116301614A (en) Memory data access method, system, device and storage medium
CN106293530B (en) A kind of method for writing data and device
CN105224471B (en) The method of power information acquisition terminal storage data based on built-in Linux
CN115686362A (en) Data freezing method of intelligent electric meter
CN111078128A (en) Data management method and device and solid state disk
CN112269549B (en) Flash memory management method of light embedded system
CN112463051A (en) Management method and data storage method of battery storage system
CN110851447B (en) Flexible storage method of II-type concentrator

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