A storage method and system

By initializing and verifying the storage formats of different storage areas in memory and synchronizing data to random access memory, the problem of memory adapting to complex needs in the field of remote acquisition control is solved, and efficient data interaction and service execution are achieved.

CN113419680BActive Publication Date: 2025-04-15NANJING XINLIAN ENERGY CLOUD SERVICES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110719604.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-28
Publication Date
2025-04-15
Estimated Expiration
2041-06-28

AI Technical Summary

Technical Problem

In the field of remote acquisition control, memory needs to adapt to complex and variable work site needs. It is difficult for the prior art to effectively realize personalized adjustment of memory, resulting in high production costs and prone to data interaction errors.

Method used

By initializing the storage formats based on different storage areas in the memory and checking and backing up the initialized memory format, it is ensured that the memory can adapt to different storage needs. After inputting the stored data, the data is synchronized to the random access memory to improve data interaction efficiency.

Benefits of technology

It realizes that memory can adapt to different storage needs and functions without personalized hardware adjustments, improves the efficiency of data interaction and business execution efficiency, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113419680B_ABST
    Figure CN113419680B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a storage method and system, which are applied to a memory. The method includes: initializing the memory based on the storage formats corresponding to different storage areas in the memory; verifying the format of the initialized memory; if the verification passes, storing the format information of the initialized memory to a backup storage medium; when the storage data is input into the memory, synchronizing the storage data to the running storage medium; the running storage medium includes a random access memory. The above storage method enables the memory to adapt to different storage requirements and realize different functions without requiring hardware personalization of the memory, quickly and effectively completing the interactive processing of data, improving the execution efficiency of the business, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of data storage technology, and more particularly to a storage method and system. Background Art

[0002] Memory is a widely used module for data storage. It is an indispensable part in both large computing devices and small civilian devices. Using memory to store data in the corresponding working environment can ensure the effective progress of work.

[0003] Due to the requirements of different application environments, the storage algorithm corresponding to the memory often needs to be adjusted according to the requirements of the application environment. In the field of remote acquisition control, the requirements of the work site are complex, changeable and non-uniform, which is not suitable for batch production of unified formats. The complex interaction process for different embedded devices is also prone to errors. If the corresponding personalized memory is generated in sequence based on different requirements, the production cost will be greatly increased. Therefore, how to conveniently and effectively adapt to different storage requirements based on the memory is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of the embodiments of this specification is to provide a storage method and system to solve the problem of how to conveniently and effectively adapt to different storage requirements based on memory.

[0005] In order to solve the above technical problems, an embodiment of the present specification proposes a storage method, which is applied to a memory, and the method includes: initializing the memory based on the storage formats corresponding to different storage areas in the memory; verifying the format of the initialized memory; if the verification passes, storing the format information of the initialized memory to a backup storage medium; when storage data is input into the memory, synchronizing the storage data to a running storage medium; the running storage medium includes a random access memory.

[0006] The embodiment of this specification also proposes a storage system, including a memory and a processing chip; the processing chip is used to implement the following steps based on the memory: initialize the memory based on the storage formats corresponding to different storage areas in the memory; verify the format of the initialized memory; if the verification passes, store the format information of the initialized memory to a backup storage medium; when storage data is input into the memory, synchronize the storage data to an operating storage medium; the operating storage medium includes a random access memory.

[0007] It can be seen from the technical solution provided by the above embodiments of this specification that the embodiments of this specification first initialize the memory based on the storage format corresponding to different storage areas, so that the initialized memory can adapt to the requirements corresponding to different storage formats. After initialization, the memory is verified to ensure the availability of the memory. By storing the format information of the initialized memory in the backup storage medium, the requirements corresponding to the storage format of the memory are retained, so that the memory can be effectively restored when the memory is temporarily unavailable. After the storage data is input into the memory, by synchronizing the storage data to the running storage medium, when the running storage medium is a random access memory, the running storage medium has a faster data interaction capability, which ensures the effective use of the stored data. Through the above method, without the hardware personalization requirements for the memory, the memory can adapt to different storage requirements, and can realize different functions, quickly and effectively complete the interactive processing of data, improve the execution efficiency of the business, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0009] Figure 1 This is a flowchart of a storage method according to an embodiment of this specification;

[0010] Figure 2 This is a schematic diagram of the structure of a memory according to an embodiment of this specification;

[0011] Figure 3 This is a schematic diagram of the structure of a storage system according to an embodiment of this specification. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0013] The following is combined with Figure 1A storage method in an embodiment of this specification is introduced. The method is applied to a memory, and the execution subject of the method may be a processing chip corresponding to the memory, and the processing chip may be pre-set with corresponding calculation logic to implement the storage method based on the calculation logic. The storage method includes the following specific steps.

[0014] S110: Initializing the memory based on storage formats corresponding to different storage areas in the memory.

[0015] The memory can be a module for realizing data storage, specifically a random access memory RAM, which can be used to store program instructions for the device to run.

[0016] In some specific application scenarios, the memory may be a small storage chip NVRAM, which is used in embedded devices, such as instruments, IoT devices, low-power devices, and other devices involved in the field of remote acquisition and control. In actual applications, the type and application environment of the memory are not limited to the above examples and are not limited here.

[0017] The memory may include different storage areas, which may be used to store different types of data and have different storage permissions. For example, the data in some storage areas cannot be changed, while the data in some storage areas can be read and written.

[0018] Different storage areas may correspond to different storage formats, which can be used to describe the data arrangement and data modification permissions used by these storage areas when storing data. After initializing different storage areas based on the storage format, the corresponding storage areas can better realize data storage in combination with corresponding requirements and the cooperation between different storage areas.

[0019] In some implementations, the storage area may include at least one of a partition table, a directory table, a global variable storage area, a buffer variable storage area, an application data storage area, and a reserved storage area.

[0020] In some practical application scenarios, the storage area is initialized, and the first partition including the partition table, directory table, global variable storage area, and buffer variable storage area is initialized. Figure 2 As shown, the memory includes a partition table, a directory table, a global variable storage area, a first partition including a buffer variable storage area, other partitions including an application data storage area, and a reserved partition including a reserved storage area.

[0021] The partition table is mainly used to support dynamic adjustment of the memory itself and management of the memory. It is generally fixed to the first 4 bytes of the partition and is divided into fixed partitions and variable partitions. Fixed partitions and variable partitions can correspond to different storage space sizes. Among them, fixed partitions correspond to platform permissions and can generally only be modified during factory settings or factory restore operations with higher permissions. Variable partition modifications can belong to application permissions and can be dynamically adjusted through script files or commands when there are corresponding modification requirements for applications or services. Variable partitions are generally used to store real-time data, temporary variables, and other data that can continue business execution after the device is restarted.

[0022] The directory table is mainly used to store the corresponding information corresponding to the directory, such as directory name, file location, file size, file size limit, etc. Information that can be directly viewed in the directory. The information in the directory is used to indicate the file storage information in the memory.

[0023] The global variable storage area is mainly used to store some variables that need to be reused when restarting or powering off, as well as variables that can be used conservatively when the system architecture cannot use external storage and execution storage normally. The global variable storage area can effectively utilize and save data without relying on media such as file systems that may cause errors or data loss.

[0024] Buffer variable storage is mainly used to store index information of the buffers of various storage media, such as directory indexes or RAM address indexes, for interaction between applications.

[0025] When initializing the partition table, corresponding initialization operations may be implemented based on the storage requirements of the above-mentioned storage areas to better target different application environments.

[0026] In some embodiments, in order to ensure the storage effect of the memory and save storage space in the memory, the partitions in the memory can be implemented using the number of sectors and the number of sector bytes. The number of sector bytes can be defined by a script file or an implicit fixed number of sector bytes. The partition size is the product of the number of sectors and the number of sector bytes. The actual value of the number of sectors can be implemented by adding 1 to the sector bit field value. For example, 2 bits of 0 represent 1 sector. If the corresponding number of sector bytes is 512 bytes, the corresponding size of the partition is 512 bytes.

[0027] The storage space in the memory is effectively planned in the above manner, the storage performance of the memory is improved, and the business processing effect based on the memory is improved.

[0028] S120: Verify the format of the initialized memory.

[0029] After the memory is initialized, the format of the memory can be verified. The purpose of the verification is to ensure that the format and storage function after initialization are normal. Specifically, verification can be performed on each partition to prevent data in different storage areas from being illegally modified. The verification value used in the verification needs to be written back frequently, so when implementing it, the bytes that need to be isolated can be estimated based on the media life to achieve storage.

[0030] In some implementations, when checking the format of the memory, each partition may be checked using a CRC check algorithm. The CRC check algorithm is a data transmission error detection function that performs polynomial calculations on the data and appends the obtained results to the back of the frame. The receiving device also executes a similar algorithm to ensure the correctness and integrity of data transmission. Specifically, for example, a check code may be appended to the frame to be sent, and the check code enables the generated frame to be divisible by a specific number. If it is found that it cannot be divided during the verification process, it indicates that the data has been modified, otherwise it indicates that the data is correct.

[0031] In actual applications, other verification methods may also be used to verify the format of the memory, which will not be described in detail.

[0032] S130: When the verification is passed, the format information of the initialized memory is stored in a backup storage medium.

[0033] If the verification is passed, it indicates that the memory can store data in a normal format and the initialization of the memory has been completed normally. Therefore, in order to ensure the fault tolerance rate in the subsequent process and improve the reliability of the actual data, the format information of the initialized memory can be stored in the backup storage medium. In the subsequent process, if the storage medium in the memory fails or data is lost, the backup data stored in the memory can be restored based on the format information in the backup storage medium, and the memory can be restored to obtain a usable memory.

[0034] In some embodiments, the backup storage medium includes at least one of internal storage of the single-chip microcomputer, external storage of the single-chip microcomputer, running storage medium, mobile storage and cloud storage. The internal storage of the single-chip microcomputer can be other storage media inside the single-chip microcomputer where the memory is set, and the external storage of the single-chip microcomputer can be a storage medium contained in other devices connected to the single-chip microcomputer. When data transmission can be achieved between the single-chip microcomputer, the format information of the memory can also be effectively backed up. The running storage medium can be a storage medium that directly interacts with the processor, such as volatile storage media such as cache and memory. Mobile storage can be a removable storage device, such as a mobile storage medium such as an SD card and a U disk. Cloud storage can be stored by connecting the single-chip microcomputer to the network to transmit it to the cloud. The above storage media can all achieve the backup effect for the format information, and are not limited to the above examples in practical applications, so they will not be repeated here.

[0035] By storing the format information in the backup storage medium, the reliability of the actual data can be effectively guaranteed, and the partition can be effectively restored when a storage error occurs, thereby improving the availability of the device.

[0036] In some embodiments, after the initialized memory format information is stored in the backup storage medium, the directory table of the memory may also be verified. Since the directory table is used to save the corresponding data received when the subsequent memory receives the data, it may be further verified. The specific verification process may be to verify the storage function of the directory table and / or to verify the creation function of the directory table and / or to determine whether the storage medium exists and / or to determine whether the size of the stored file exceeds the limit size.

[0037] Verifying the storage function of the directory table can be to determine whether data can be stored in the directory table; verifying the creation function of the directory table can be to determine whether a new directory can be constructed in the directory table; determining whether the medium exists can be to determine whether the storage medium corresponding to the directory table can be found; determining whether the storage file size exceeds the limit size can be to determine whether the data stored in the current directory exceeds the pre-set storage size limit.

[0038] When the size of a storage file exceeds the limit, in order to ensure that the corresponding information can be effectively recorded in the subsequent process, some information in the directory table can be released. Specifically, the storage file can be deleted and / or compressed based on the storage date corresponding to the storage file. Based on the storage date corresponding to the storage file, the storage file stored earlier can be deleted; compressing the storage file can be compressing the storage file to release a certain amount of storage space. The specific implementation process can be operated based on the actual application environment, which will not be repeated here.

[0039] If the corresponding data is lost in the memory in the subsequent process, or the memory itself fails, the data in the backup storage medium can be transferred to the memory or other alternative storage medium to continue the normal execution of the work, ensuring the smooth progress of the storage process of the corresponding business.

[0040] S140: After the storage data is input into the memory, the storage data is synchronized to the operation storage medium; the operation storage medium includes a random access memory.

[0041] After the storage data is input into the memory, the storage data can be synchronized to the running storage medium. The running storage medium can be a random access memory (RAM), such as a cache or memory that directly interacts with the processor, which often has a faster data processing speed. After synchronizing the data in the memory, application access and concurrent access can be accelerated.

[0042] When writing is required, the data in the memory can be locked exclusively, and the critical area can be controlled. After the above steps are completed, a loop can be performed to wait for receiving the dynamic storage status, and the written data can be treated differently in conjunction with the hardware backup battery or supercapacitor. When the same area accumulates to a certain size or the scheduled transfer time meets the conditions, the data temporarily written in the running storage will be written to the non-volatile medium. For media with high erase and write life such as ferroelectric FRAM, it can be written appropriately and timely while ensuring performance. Through the above steps, both the efficient use of data in the memory and the effective backup of data are guaranteed, which is conducive to the processing of corresponding services.

[0043] In some implementations, after the storage data is input into the memory, it can be managed based on the variable data identifier. Specifically, it can be determined that the data item type corresponding to the storage data; the data item type includes at least one of a data item, a basic data item, and a composite data item; the basic data item is used to identify the data content; the data item is used to reference the basic data item; the composite data item is defined through an independent storage area; based on the data item type, the storage data is stored and managed.

[0044] Data items are divided into compound data items, basic data items, and data items. Basic data items are usually used to identify data content, and data items usually reference basic data items to express data storage; compound data items are defined using independent 4 bytes; basic data items are usually only related to the protocol type, etc., and generally do not change or rarely change; data items are used to read and write an identification (ID) definition of a data item or buffer; data items usually include but are not limited to: data item type, grouping, numbering, referenced data items, length, etc.; empty data items or invalid data items are uniformly identified as 0xEEEEEEEE. When used, the bytes occupied by the ID are calculated, and the bytes occupied by the data area are not calculated.

[0045] In some implementations, after the storage data is input into the memory, the storage data in the memory may be managed based on a script file and / or a unified data structure and / or an information file.

[0046] The script file can be a file that is pre-set in the processing chip to process some services, and is used to process some specific services. The script file usually uses a json file, which is small and lightweight, and is very suitable for embedded product migration and traffic communication. The use of json objects and arrays with data item definitions can be flexibly configured, maintained and managed.

[0047] Starting from portability, loose coupling, and high clustering, a unified data structure is used, and a unified data structure pointer is sent by email. Users can decide whether to expand the structure again based on the content of the unified data structure. The unified data structure is combined with unified data storage to achieve separation of program and data, and the unified data structure is transmitted between applications and systems. The content of the unified data structure can be post-constructed by the unified data storage, so that the transmission and merging, storage and reading, parsing and construction of various versions of data can be headless. All data is implemented based on the data item ID. When reporting, it will be summarized into the data script format that is finally issued. When storing, there may be different versions of data items, and only the current version format is seen when using the object. The unified data structure reduces testing pressure, scalability, and ease of use. The basic data structure type is added with a parameter pointer. At the same time, according to the use stage, it can support the use of extended parameters, extended names, extended linked lists, and output log function callback pointers, which is convenient for unit testing and subsequent problem troubleshooting.

[0048] Information files are mainly divided into curve files and parameter files, with similar basic definitions, including: namespace, file name, file unified storage identification (ID) definition, namespace; each day's data corresponds to a directory, and the curve file name is: density (1 byte) + number of data item bytes (2 half bytes) + index number (half byte) + start (3 bytes) + identification (1 byte). If there is a change in the data item, a new curve file will be generated; data item change: a data item represents a measurement data, a measurement point may include several measurement data, and the measurement data is the smallest unit. Data item changes include: adding, deleting, and modifying, and using ID to uniquely identify the data item; curve file: each curve file is preceded by The 256-byte file header is used to record information, plus the data area; the number of bytes is represented by two bytes in hexadecimal, and the maximum supported data item length is 2047. If the number of bytes of a data item exceeds 2047, please split it into two data items for storage; the index number is represented by one byte in hexadecimal, and the same data length in the same directory supports a maximum of 16 changes; the density sequence number is represented by three bytes in hexadecimal at the beginning, of which the highest bit is used to indicate whether it is base58 encoding, and the rest can represent 11-bit density sequence numbers. When it is in hexadecimal, it can represent a maximum of 2048 density sequence numbers; when the data item is changed, a new curve file will be regenerated from the current start time.

[0049] In some embodiments, the memory can also be inspected based on a certain frequency. When the storage medium of the memory fails, a mobile storage medium can be used to replace the storage medium of the memory. The mobile storage medium can be a removable storage medium, and data transmission is achieved between the single-chip microcomputer and the single-chip microcomputer through an interface on the single-chip microcomputer. When the storage medium of the memory fails, data storage cannot be achieved. In order to ensure the continuation and effective execution of the work, a mobile storage medium can be used to replace the memory. The processing method for the mobile storage medium can refer to the processing method for the memory in the above steps to improve the fault tolerance rate in the actual working process.

[0050] The above method is explained based on a specific scenario example. Figure 3As shown, the core component can be the storage part corresponding to the single-chip microcomputer, including the internal storage of the single-chip microcomputer (MCU ROM), the running storage (RAM or cache), the external storage (SPI Nor Flash), the running storage (QSPI XIP Flash) and the memory (NVRAM). The core component is connected with the business component, including the exchange chip (RN8302), the analog sampling (ADI), the remote signal (Pin Input) and the other input and output (OtherIO), which are used to transmit the corresponding data to the core component. The interactive component includes a serial port display (SPI LCD) and a management button (Pin Key), which are used to receive the corresponding instructions from the outside world and transmit them to the core component. The removable device includes a memory card (SDCard) and a USB flash drive (USB sevice), which are used as alternative storage devices.

[0051] It can be seen from the introduction of the above method embodiments and scenario examples that the storage method first initializes the memory based on the storage formats corresponding to different storage areas, so that the initialized memory can adapt to the requirements corresponding to different storage formats. After initialization, the memory is verified to ensure the availability of the memory. By storing the format information of the initialized memory in the backup storage medium, the requirements corresponding to the storage format of the memory are retained, so that the memory can be effectively restored when the memory is temporarily unavailable. After the storage data is entered into the memory, the storage data is synchronized to the running storage medium. When the running storage medium is a random access memory, the running storage medium has a faster data interaction capability, which ensures the effective use of the stored data. Through the above method, without the hardware personalization requirements of the memory, the memory can adapt to different storage requirements and realize different functions, quickly and effectively complete the interactive processing of data, improve the execution efficiency of the business, and improve the user experience.

[0052] Based on the above storage method, the embodiment of this specification also proposes a storage system. The storage system may include a memory and a processing chip corresponding to the memory.

[0053] The memory may be Figure 1 The memory in the corresponding example. The processing chip can implement the following steps based on the memory: initialize the memory based on the storage formats corresponding to different storage areas in the memory; verify the format of the initialized memory; if the verification passes, store the format information of the initialized memory to the backup storage medium; when the storage data is input into the memory, synchronize the storage data to the running storage medium; the running storage medium includes a random access memory.

[0054] Although the process flows described above include multiple operations that occur in a particular order, it should be clearly understood that the processes may include more or fewer operations, which may be performed sequentially or in parallel (eg, using parallel processors or a multi-threaded environment).

[0055] Although the process flows described above include multiple operations that occur in a particular order, it should be clearly understood that the processes may include more or fewer operations, which may be performed sequentially or in parallel (eg, using parallel processors or a multi-threaded environment).

[0056] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0057] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0059] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0060] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0061] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0062] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0063] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0064] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0065] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A storage method, characterized in that: Applied to a memory, the method comprises: The memory includes one or more different storage areas, and the memory is initialized based on storage formats corresponding to different storage areas in the memory; Verify the format of the initialized memory; If the verification is passed, the format information of the initialized memory is stored in a backup storage medium; and the directory table in the memory is verified; After the storage data is input into the memory, the storage data is managed based on the variable data identifier or the file type; the storage data is synchronized to the operation storage medium; the operation storage medium includes a random access memory.

2. The method according to claim 1, characterized in that The storage area includes at least one of a partition table, a directory table, a global variable storage area, a buffer variable storage area, an application data storage area and a reserved storage area.

3. The method according to claim 1, characterized in that The verification of the directory table includes: verifying the storage function of the directory table and / or verifying the creation function of the directory table and / or determining whether the storage medium exists and / or determining whether the size of the stored file exceeds the limit size.

4. The method according to claim 3, characterized in that After verifying the directory table, the method further includes: In the case where the size of the stored file exceeds the limited size, the stored file is deleted and / or compressed based on the storage date corresponding to the stored file.

5. The method according to claim 1, characterized in that The checking of the format of the initialized memory includes: Use the CRC check algorithm to check each partition.

6. The method according to claim 1, characterized in that The backup storage medium includes at least one of internal storage of the single-chip microcomputer, external storage of the single-chip microcomputer, running storage medium, mobile storage and cloud storage.

7. The method according to claim 1, characterized in that The storage data is input into the memory, including: Determine the data item type corresponding to the stored data; the data item type includes at least one of a data item, a basic data item and a composite data item; the basic data item is used to identify the data content; the data item is used to reference the basic data item; the composite data item is defined by an independent storage area; The stored data is stored and managed based on the data item type.

8. The method according to claim 1, characterized in that The storage data is input into the memory, including: The stored data in the memory is managed based on the script file and / or the unified data structure and / or the information file.

9. The method according to claim 1, characterized in that The method further comprises: When it is detected that the storage medium of the memory fails, the storage medium of the memory is replaced by a mobile storage medium.

10. A storage system comprising a memory and a processing chip; The processing chip is used to implement the following steps based on the memory: the memory includes one or more different storage areas, and based on the storage formats corresponding to the different storage areas in the memory, the memory is initialized; and the format of the initialized memory is verified; If the verification is passed, the format information of the initialized memory is stored in the backup storage medium; Verifying the directory table in the memory; After the storage data is input into the memory, the storage data is managed based on the variable data identifier or the file type; The stored data is synchronized to an operating storage medium; the operating storage medium includes a random access memory.

Citation Information

Patent Citations

  • Circuit and method for improving service lifetime of memory device

    CN101176075A

  • High-reliability linear file access method based on nand flash

    CN103577121A