Information storage method, system and mobile power supply

CN122924664APending Publication Date: 2026-10-16SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610893521.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本发明实施例提供一种适配移动电源应用场景、低闪存损耗、支持数据溯源、断电后可快速恢复的信息存储方法、系统及移动电源,以解决现有整块覆写存储损耗闪存、瞬时掉电丢失数据,常规日志无法区分普通数据与异常数据、开机恢复需全量扫描耗时久的问题

Benefits of technology

[0016] The beneficial effects of the information storage method provided in this invention are as follows: This solution uses anchor points combined with differential chains to record running data, and combines sealing to complete micro-era archiving, abandoning the traditional whole-chip overwrite storage solution; running data is written to flash memory in an element-order append manner, significantly reducing the number of flash erase and write cycles, effectively reducing chip wear and extending the lifespan of storage devices; with the help of sealing, complete and valid micro-era metadata can be quickly located. When the device powers on to restore data, it only needs to retrieve the anchor point data of the most recently sealed micro-era and superimpose the corresponding differential data to quickly restore the running parameters for the entire period without having to traverse the entire storage space. This can adapt to application scenarios with low-cost mobile power supplies and limited main control microcontroller resources, taking into account both storage reliability and data recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122924664A_ABST
    Figure CN122924664A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of mobile power supply, and particularly relates to an information storage method, system and mobile power supply; comprising the following steps: collecting operation data of the mobile power supply; constructing a micro-epoch with an anchor element, a differential element and a seal element, the anchor element records the operation data of the mobile power supply at a certain time, the differential element is used for recording the change amount of the operation data after the time, and the seal element is used for writing the seal of the micro-epoch; when the device is restarted or power-off recovery, the micro-epoch of the last seal is located according to the seal element, the anchor element of the micro-epoch is read, and the differential element after the anchor element is sequentially superimposed, so as to restore the operation data at each time in the micro-epoch; the anchor differential chain is used to write the operation data into the flash memory in the form of element sequence addition, so that the number of erasing and writing is effectively reduced; in combination with the seal element, the operation parameters can be quickly located and restored, the storage space does not need to be traversed, and the application scene of the mobile power supply with low cost and limited main control resources is adapted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile power technology, and in particular to an information storage method, system, and mobile power supply. Background Technology

[0002] During long-term operation, power banks need to record voltage, temperature, output current, battery cycle status, various abnormal events, and their corresponding occurrence times in real time. Traditional storage methods use whole-block data overwriting and updating, which leads to frequent flash memory erasures due to frequent parameter changes, shortening the lifespan of the flash memory. Furthermore, power outages and fault protection can easily cause real-time data loss. Although conventional log storage supports appending data to the end, it has two shortcomings: First, storing all data uniformly cannot distinguish the storage priority of frequently changing operating parameters and important abnormal data; second, when the device powers on to restore data, it needs to completely traverse the entire log from beginning to end, resulting in low data recovery efficiency.

[0003] Based on the aforementioned deficiencies in the existing technology, this invention proposes an information storage method, system, and power bank that are adapted to mobile power bank application scenarios, have low flash memory loss, support data traceability, and can be quickly recovered after power failure. Summary of the Invention

[0004] This invention provides an information storage method, system, and power bank that are adapted to power bank application scenarios, have low flash memory loss, support data traceability, and can be quickly recovered after power failure. This solves the problems of existing full-block overwrite storage causing flash memory loss, data loss during instantaneous power failure, inability of regular logs to distinguish between normal and abnormal data, and time-consuming full scan required for power-on recovery.

[0005] An information storage method for storing operational data of a mobile power bank includes the following steps:

[0006] Real-time collection of power bank operating data; A micro-era is constructed with anchor elements, difference elements, and sealing elements. The anchor elements are used to record the operating data of the power bank at a certain moment. The difference elements are used to record the change in the operating data after that moment relative to the anchor elements. The sealing elements are used to write the seal into the micro-era. When the device restarts or recovers from a power outage, the most recently sealed micro-era is located based on the sealing element. The anchor element of that micro-era is read, and the difference element after the anchor element is superimposed in sequence to restore the running data at each moment in that micro-era.

[0007] Optionally, the following steps are also included: When abnormal operation data is collected, a freeze event token is inserted into the current micro-era, and the freeze event token in the micro-era is read first when locating the abnormal moment.

[0008] Optionally, the following steps are also included: When the first preset condition is met, a new micro-era begins; The first preset conditions include the differential amplitude exceeding a preset range, the number of differential elements exceeding a preset threshold, the occurrence of a frozen event token, insufficient remaining space in the current micro-era, and reaching a preset maximum time span threshold.

[0009] Optionally, the following steps are also included: When switching to a new micro-era, the original micro-era is written into the seal, and the currently running data is packaged into a new anchor element; Write the changes in the running data at subsequent time points into the difference element after the new anchor element.

[0010] Optionally, the following steps are also included: Configure at least one append cache with a fixed capacity; When the current buffer space is insufficient, switch to the next append buffer to append elements.

[0011] Optionally, the following steps are also included: The forward write pointer indicates the position to write the next element; The pointer is reversed to indicate the location of the most recently sealed micro-epoch.

[0012] Optionally, the following steps are also included: Once the micro-era is written into the seal, the reverse recovery pointer is updated; Write the mirror image of the reverse recovery pointer to the pointer shadow area and mark the micro-epoch as recoverable.

[0013] Optionally, the following steps are also included: When the device restarts or recovers from a power outage, the most recent reverse recovery pointer is located based on the pointer shadow area; Verify the sealed elements backward based on the most recent reverse recovery pointer position to locate the micro-era of the most recent seal; Read the anchor element of the most recently sealed micro-epoch and replay the difference elements following that anchor element as needed.

[0014] To address the problems existing in the prior art, the present invention also provides an information storage system, the solution of which is used to implement the information storage method described above, comprising: The anchor point generation module is used to write the operating data of the power bank at a certain moment as anchor point elements. The differential chain encoding module is used to record the change in the running data after this moment relative to the anchor element, as the difference element; The micro-epoch caching module is used to cache the anchor element and the differential elements recorded consecutively after the anchor element as micro-epochs that can be independently committed and restored. The sealing module is used to generate a verification seal at the end of each micro-epoch; The dual-pointer management module includes a forward write pointer and a reverse recovery pointer. The forward write pointer is used to indicate the write position of the next element, and the reverse recovery pointer is used to indicate the micro-epoch position of the most recent seal.

[0015] To address the problems existing in the prior art, the present invention also provides a mobile power supply, which includes the information storage system described above.

[0016] The beneficial effects of the information storage method provided in this invention are as follows: This solution uses anchor points combined with differential chains to record running data, and combines sealing to complete micro-era archiving, abandoning the traditional whole-chip overwrite storage solution; running data is written to flash memory in an element-order append manner, significantly reducing the number of flash erase and write cycles, effectively reducing chip wear and extending the lifespan of storage devices; with the help of sealing, complete and valid micro-era metadata can be quickly located. When the device powers on to restore data, it only needs to retrieve the anchor point data of the most recently sealed micro-era and superimpose the corresponding differential data to quickly restore the running parameters for the entire period without having to traverse the entire storage space. This can adapt to application scenarios with low-cost mobile power supplies and limited main control microcontroller resources, taking into account both storage reliability and data recovery efficiency. Attached Figure Description

[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart of the information storage method in an embodiment of the present invention. Figure 1 ; Figure 2 This is a flowchart of the information storage method in an embodiment of the present invention. Figure 2 ; Figure 3 This is a flowchart of the information storage method in an embodiment of the present invention. Figure 3 ; Figure 4 This is a flowchart of the information storage method in an embodiment of the present invention. Figure 4 ; Figure 5 This is a flowchart of the information storage method in an embodiment of the present invention. Figure 5 ; Figure 6 This is a flowchart of the information storage method in an embodiment of the present invention. Figure 6 ; Figure 7 This is a system block diagram of the information storage system in an embodiment of the present invention.

[0018] The labels for the attached figures are as follows: 1. Anchor point generation module; 2. Differential chain encoding module; 3. Micro-epoch cache module; 4. Sealing module; 5. Dual pointer management module; 51. Forward write pointer; 52. Reverse recovery pointer. Detailed Implementation

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0020] like Figures 1 to 6 As shown, the present invention provides a specific embodiment of an information storage method.

[0021] An information storage method for storing operational data of a mobile power bank, referenced. Figure 1 The information storage method includes the following steps: S1. Collect the operating data of the power bank; S2. Construct a micro-era with anchor elements, difference elements, and seal elements. Anchor elements are used to record the operating data of the power bank at a certain moment. Difference elements are used to record the change in the operating data after that moment relative to the anchor elements. Seal elements are used to write seals into the micro-era. S3. When the device restarts or recovers from a power outage, locate the most recently sealed micro-era based on the sealing element, read the anchor element of the micro-era, and then superimpose the difference element after the anchor element in sequence to restore the running data of each moment in the micro-era.

[0022] Step 1 forms the foundation for the data source in the information storage method. It is used to continuously collect key operational data of the power bank during its operation. The key operational data specifically includes the power bank's output voltage, input current, output current, cell temperature, remaining battery capacity, battery charge / discharge status, and cycle count. This step continuously acquires changes in the device's operating status through periodic real-time sampling, providing a continuous, complete, and reliable original data source for subsequent micro-era construction, benchmark data recording, and differential data calculation, ensuring that the subsequent storage and data recovery processes are based on solid evidence.

[0023] Step 2 addresses the technical problems of high wear and tear, high data redundancy, and inability to guarantee data integrity caused by frequent overwriting in traditional flash memory. This step divides the continuous operating data of the power bank into independent data storage units, namely micro-epochs, according to time segments. Each micro-epoch is a complete, independent, and individually verifiable and recoverable data time segment. Each micro-epoch contains only one anchor element, multiple differential elements, and a final sealing element, resulting in a unified, regular, and traceable structure.

[0024] The anchor element serves as the baseline data source for this micro-era, recording the complete operating parameters of the mobile power supply at the start of the micro-era. This serves as the calculation benchmark for all subsequent changes in operating data within this micro-era, replacing the traditional method of storing the entire dataset and significantly reducing data storage redundancy. The difference element records the difference between the operating data at each sampling time after the anchor point and the anchor reference data. When the device's operating parameters fluctuate slightly, only the change is recorded, not the complete data, greatly reducing the amount of data written and the number of flash memory writes. The seal element is the integrity verification mark for this micro-era, written uniformly after the data acquisition and difference recording of the current micro-era are completed. It identifies the completion of the current micro-era metadata writing and is the core identifier distinguishing between valid, complete data and power-loss incomplete data. The difference element includes at least the difference value, field identifier, time offset, length field, and verification field.

[0025] Meanwhile, this step adopts a sequential append-write mechanism. All anchor elements, differential elements, and seal elements are continuously written to the end of the cache in chronological order, without in-situ erasure or in-situ overwrite. This avoids frequent flash memory erase and write from the source, significantly reduces flash memory wear, and extends the lifespan of the memory.

[0026] Step 3 enables high-speed, accurate, and complete historical data recovery after a power outage, overcoming the shortcomings of traditional solutions such as full data traversal upon startup, slow recovery speed, and easy data loss during power outages. When the power bank experiences an unexpected power outage, abnormal restart, or power-on / off recovery, the system no longer scans the entire storage area. Instead, it prioritizes identifying micro-epoch metadata with valid seal elements within the storage area. Since seal elements only mark complete and normally written micro-epochs, it can quickly filter out incomplete and invalid data caused by power outages, accurately locating the latest and most complete valid micro-epochs.

[0027] After locating the valid micro-epoch, the unique anchor element within that micro-epoch is first read to obtain the baseline data and the initial complete device operating parameters for that time segment. Then, all differential element data after the anchor element are read sequentially in chronological order. By successively superimposing the numerical changes at each moment using the baseline data, the actual voltage, current, temperature, operating status, and other operating data corresponding to each sampling time point within this micro-epoch are accurately restored. The entire recovery process does not require traversing all stored data; it only performs local analytical calculations for the valid micro-epoch, significantly improving the speed of power outage recovery. In scenarios where the microcontroller resources of the mobile power supply are limited and the computing power is low, it ensures both the accuracy of data restoration and greatly improves the recovery efficiency, while also achieving complete traceability of device operating data.

[0028] In this embodiment, runtime data is recorded using an anchor point combined with a differential chain, and micro-era archiving is completed by sealing, abandoning the traditional storage scheme of full-wave overwriting. Runtime data is written to flash memory in an element-order append manner, significantly reducing the number of flash erase and write cycles, effectively reducing chip wear and extending the lifespan of storage devices. With the help of sealing, complete and valid micro-era metadata can be quickly located. When the device powers on to restore data, it only needs to retrieve the anchor point data of the most recently sealed micro-era and overlay the corresponding differential data to quickly restore the runtime parameters for the entire period without having to traverse the entire storage space. This approach is suitable for application scenarios with low-cost power banks and limited microcontroller resources, balancing storage reliability and data recovery efficiency.

[0029] In one embodiment, reference Figure 2 The information storage method also includes the following steps: S4. When abnormal operation data is collected, insert a freeze event token into the current micro-era and prioritize reading the freeze event token in the micro-era when locating the abnormal moment.

[0030] Specifically, during the operation of the power bank, parameters such as voltage, current, and temperature are monitored in real time. Once abnormal data such as overvoltage, overtemperature, overcurrent, or undervoltage is triggered, the system immediately inserts a freeze event token at the corresponding data node position of the currently effective micro-era. The token, together with the synchronous anchor point and differential data, is added to the cache area in sequence according to the storage rules. The original stored content is not modified, and the existing anchor point and differential records are not overwritten. Abnormal points and normal operating data are bound and archived within the same micro-era.

[0031] The freeze event token is a unique marker for abnormal data, used to accurately mark the time node of the fault occurrence in the entire micro-epoch data stream, distinguishing between normal operating condition data and fault operating condition data, and realizing partitioned marking and storage of normal data and abnormal data. This compensates for the deficiency that relying solely on anchor points and differentials cannot quickly distinguish the fault location. When it is necessary to trace back the fault and locate the time of the anomaly, the master controller first traverses and retrieves the freeze event tokens in each micro-epoch, and directly locks the micro-epoch and the fault time point, without having to calculate the parameters for the entire time period by stacking all differential data item by item starting from the anchor point element. After determining the fault location, the operating state before and after the fault can be restored by retrieving only the anchor point and differential data before and after that point.

[0032] The event token freeze includes at least the event type, time level, timestamp, current micro-epoch number, and snapshot trigger identifier. If the event level is higher than the preset threshold, a high-priority snapshot element is written immediately after the event token freezes to record the complete value of the current key fields and the last valid anchor reference before the event occurred, so that the abnormal moment can be quickly located without relying on long differential chain replay.

[0033] In this embodiment, abnormal points are individually marked by freezing event tokens, eliminating the need to parse massive differential data line by line for fault diagnosis, significantly reducing the time spent on fault tracing and improving the efficiency of power bank fault repair; at the same time, abnormal data is stored in the original micro-era storage architecture, eliminating the need to open an additional independent storage partition, saving microcontroller storage space, and adapting to the low-cost, low-resource hardware application environment of power banks.

[0034] In one embodiment, reference Figure 3 The information storage method also includes the following steps: S21. When the first preset condition is met, a new micro-era begins; S22. When switching to a new micro-era, the original micro-era is written into the seal, and the currently running data is packaged into a new anchor element; S23. Write the changes in the running data at subsequent time points into the difference element after the new anchor element; The first preset conditions include the differential amplitude exceeding a preset range, the number of differential elements exceeding a preset threshold, the occurrence of a frozen event token, insufficient remaining space in the current micro-era, and reaching a preset maximum time span threshold.

[0035] Step 21 is used to define the data storage boundary of a single micro-era to avoid excessive data volume in a single micro-era and a continuous widening of the deviation between the anchor benchmark and real-time parameters. The system monitors the running status of the micro-era currently being written in real time. As long as the first preset condition is met, the data entry process of the existing micro-era is immediately terminated and a new independent micro-era is generated.

[0036] The first preset condition includes the differential amplitude exceeding the preset range. That is, when the operating parameters change too much relative to the anchor point element of this micro-epoch at a certain moment, continuing to use differential recording will result in the accumulation of numerical errors and calculation distortion, thus triggering an epoch switch and generating a new benchmark anchor point.

[0037] The first preset condition also includes the number of differential elements exceeding a preset threshold, that is, the number of differential records stored in a single micro-epoch reaches the upper limit. Too many differentials can easily accumulate calculation errors, thus triggering a new epoch to reset the baseline.

[0038] The first preset condition also includes the occurrence of a freeze event token, that is, collecting abnormal faults and writing an abnormal marker token, in order to isolate fault data, facilitate subsequent individual investigation, and immediately close the current era and start a new era.

[0039] The first preset condition also includes insufficient remaining space in the previous micro-epoch, that is, the cache storage space allocated to the micro-epoch is about to be exhausted, and new differential data cannot be written, thus triggering an epoch switch.

[0040] The first preset condition also includes reaching the preset maximum time span threshold, that is, the continuous recording time of a single micro-epoch reaches the set maximum time limit. Even if the parameter changes are small and the storage space is sufficient, the epoch is periodically divided to prevent the single data period from being too long.

[0041] When any of the above conditions are met, an epoch switch is triggered. The size of a single micro-epoch is constrained from five dimensions: time, data volume, parameter fluctuation, storage space, and abnormal events, to ensure the accuracy of the anchor point benchmark.

[0042] Step 22: Once all anchor elements, differential elements, and freeze event tokens of the original micro-epoch have been stored, write a seal element at the end of the entire micro-epoch metadata. The seal element serves as a data integrity certificate, representing that the old epoch metadata has been completely archived without interruption or loss. After a power outage, the seal can be used to identify valid data and remove incomplete or invalid fragments of data. The seal element includes at least the micro-epoch number, micro-epoch length, tail check value, and the application of the previous valid micro-epoch.

[0043] Furthermore, at the moment of micro-era switching, the current operating data of the power bank is captured and packaged as the sole anchor element of the new micro-era, becoming the new benchmark value for all differential calculations in the next stage, eliminating the numerical deviation caused by long-term differential accumulation in the early stage.

[0044] Step 23: After the new anchor element is established, the running data obtained by the power bank in each subsequent sampling will no longer be stored in full as complete parameters. Instead, the difference between the real-time data and the new anchor element will be calculated and written sequentially in the form of differential elements following the storage address. The anchor and the existing data will not be overwritten. The storage logic will continue to rely on the anchor and differential elements to significantly reduce storage usage and flash memory erase / write frequency.

[0045] In this embodiment, by flexibly dividing the micro-epoch under multiple conditions, the data scale of a single micro-epoch is controlled to ensure the accuracy of anchor point and difference calculations. At the same time, each segment of historical data is sealed and solidified, and anomalies are isolated by freezing event tokens. This approach takes into account flash memory lifespan, storage space utilization, and the convenience of fault tracing, making it suitable for the low-cost and low-computing-power usage scenarios of mobile power banks.

[0046] In one embodiment, reference Figure 4 The information storage method also includes the following steps: S51. Configure at least one append buffer with a fixed capacity; S52. When the current buffer space is insufficient, switch to the next append buffer to append elements.

[0047] Specifically, one or more storage spaces are pre-allocated in the flash memory as an additional cache area. The cache area capacity is fixed in advance (e.g., commonly 4KB). This area uniformly follows the write rule of only writing to the end and prohibiting in-situ erasure and overwriting. All elements such as anchors, differentials, freeze event tokens, and seals are stored consecutively in the cache area in chronological order. Each micro-epoch is arranged serially in the cache space. By setting a fixed capacity cache, the upper limit of data written in a single batch can be uniformly controlled, avoiding disordered and scattered data storage, and reducing frequent flash memory erase operations from the storage architecture perspective.

[0048] Furthermore, the system monitors the remaining storage space of the cache in real time. If the remaining space is insufficient to accommodate the next element to be written, the current cache write channel is closed and the next pre-allocated free fixed cache area is activated. Subsequent newly generated storage elements are appended to the end of the new cache area, and the data in the original full cache area is permanently retained and will not be modified or overwritten.

[0049] By using a multi-caching rotation mechanism, large amounts of data are split into multiple fixed blocks for storage. This prevents old data from being erased when a single cache block is full, thus preserving all historical micro-elemental data. At the same time, it continues the sequential write storage logic, continuously reducing the number of flash memory erase / write cycles.

[0050] In one embodiment, reference Figure 5 The information storage method also includes the following steps: S241, The forward write pointer indicates the write position of the next element, and the reverse recovery pointer indicates the position of the most recently sealed micro-epoch.

[0051] S242. After the micro-era is written to the seal, update the reverse recovery pointer; S243. Write the mirror image of the reverse recovery pointer to the pointer shadow area and mark the micro-epoch as recoverable.

[0052] Specifically, the forward write pointer is used to mark the storage address of the next data in the cache in real time. After each storage element is written, the forward write pointer automatically shifts backward, and the next set of data is appended to the position pointed to by the forward write pointer. By relying on the forward write pointer to control the write address, the rules of sequential storage and no in-place overwriting are strictly implemented, and the arrangement order of micro-epochs in the cache is standardized. The reverse recovery pointer is used to point to the starting address of the latest completed sealed archive of micro-epochs, and does not change frequently with the daily writing of differential elements. When the device needs to recover data or query faults, the main controller can directly read the reverse recovery pointer to locate the complete and valid micro-epoch starting position without traversing the entire space to search for seals, thus shortening the data search time.

[0053] Furthermore, once all data for a micro-era has been written, a sealing element has been added at the end, and the micro-era has been officially sealed, the reverse recovery pointer is immediately refreshed to the starting address of the newly sealed micro-era. The pointer shadow area is an independent backup storage area. After the micro-era is sealed and the reverse recovery pointer is updated, the value of the current reverse recovery pointer is copied and stored in the shadow area for backup to prevent data loss due to unexpected power outages. The corresponding micro-era is simultaneously marked as recoverable. After the system recognizes the mark, it confirms that the micro-era anchor point and differential data are complete and valid. After a power outage and restart, the operating parameters can be restored normally by overlaying the differential data through the anchor point.

[0054] In one embodiment, reference Figure 6 The information storage method also includes the following steps: S31. When the device restarts or recovers from a power outage, locate the most recent reverse recovery pointer based on the pointer shadow area; S32. Verify the sealed elements backward based on the most recent reverse recovery pointer position to locate the micro-era of the most recent seal; S33. Read the anchor element of the most recently sealed micro-epoch and replay the difference elements after the anchor element as needed.

[0055] Specifically, when the device restarts or recovers from a power outage, the main controller can retrieve the reverse recovery pointer backup data stored in the pointer shadow area. Based on this backup data, it obtains the latest reverse recovery pointer address information before the power outage. Then, using the pointer's position as a reference, it searches forward to verify the validity of the corresponding sealing element, accurately locating the most recent micro-era that has been legally sealed. Subsequently, it reads the anchor point reference data stored inside the micro-era and retrieves the corresponding differential elements according to the data retrieval needs. By superimposing the reference values ​​with the differential changes, it restores the power bank's operating parameters for the corresponding period. The shadow area backup avoids the risk of pointer loss and failure due to power outages. At the same time, it removes incomplete data due to write interruptions through seal verification, efficiently completing the restoration of historical data.

[0056] In this embodiment, the complete process of the above information storage method is described using the total voltage, temperature, output current, and state of charge of the power bank as its operating data: 1. Treat the total voltage, temperature, output current, and state of charge of the power bank as high-variable fields and write them into the anchor element during the first record. ; 2. Each subsequent sample only writes relative to... Difference elements , , ; 3. When the rate of temperature increase exceeds a preset threshold, insert a freeze event token. ; 4. If both scenarios reach a high-risk level, then add a high-priority snapshot element. ; 5. When the number of differential elements exceeds a preset threshold, the current micro-era is sealed and sealed elements are written. Then, the new micro era was ushered in and written into... ; 6. When power is restored, read the reverse recovery pointer. Locate the most recent validly sealed micro-era and, based on the anchor element within that micro-era. Sum of difference elements , , Reconstruct the operational data for each period within this micro-era; 7. When it is necessary to restore the state before and after the exception, then according to... and Prioritize locating the target time and then replay the corresponding differential chain.

[0057] The formula for calculating the difference is: ;in, For the k-th sample value, This is the j-th anchor element.

[0058] The anchor point switching formula is: ,when At that time, a new micro-era begins, which means switching to a new anchor element.

[0059] like Figure 7 As shown, the present invention also provides a specific embodiment of an information storage system.

[0060] An information storage system, reference Figure 7 The information storage system is used to implement the above information storage method, including an anchor point generation module 1, a differential chain encoding module 2, a micro-epoch caching module 3, a sealing module 4, and a dual-pointer management module 5. The anchor point generation module 1 is used to write the running data of the power bank at a certain moment as the anchor point element. The differential chain encoding module 2 is used to record the change of the running data after that moment relative to the anchor point element as the differential element. The micro-epoch caching module 3 is used to cache the anchor point element and the differential elements continuously recorded after the anchor point element as micro-epochs that can be independently committed and restored. The sealing module 4 is used to generate a verification seal at the end of each micro-epoch. The dual-pointer management module 5 includes a forward write pointer 51 and a reverse recovery pointer 52. The forward write pointer is used to indicate the writing position of the next element, and the reverse recovery pointer 52 is used to indicate the position of the most recently sealed micro-epoch.

[0061] Specifically, after the power bank is powered on, its operating data is collected in real time. First, the anchor point generation module 1 captures the complete operating parameters at the current moment and generates anchor point elements, which are stored in the micro-era cache module 3. Subsequently, newly collected operating data is handed over to the differential chain encoding module 2 to calculate the numerical change of the relative anchor point elements, generate differential elements, and append them to the micro-era cache module 3 in sequence under the address guidance of the forward write pointer 51. The same anchor point element and all its successive differential elements are collected in the cache to form a single micro-era.

[0062] When any of the following epoch switching conditions are met, such as excessive parameter fluctuation, excessive differential number of records, insufficient cache space, triggering of an abnormal token, or expiration of time, the sealing module 4 adds a seal at the end of the current micro-epoch to complete the data archiving and sealing. Subsequently, the dual pointer management module 5 updates the reverse recovery pointer 52 to point to the starting address of the sealed micro-epoch and backs up the reverse recovery pointer 52 in the pointer shadow area. At the same time, the anchor point generation module 1 immediately collects instantaneous operating condition data to generate a new anchor point and starts the data recording process of the next micro-epoch.

[0063] If the current cache space is exhausted, the micro-era cache module 3 automatically switches to the backup fixed cache area to continue writing data sequentially. When the device restarts or recovers from an unexpected power outage, the system can retrieve the backup reverse recovery pointer 52 information from the pointer shadow area, verify the seal validity based on the pointer address, lock the latest intact micro-era, read the corresponding anchor element and retrieve the differential element behind the anchor element as needed, and restore the device operation data at each time by superimposing the difference value on the benchmark, so as to realize the rapid restoration of historical parameters and the tracing of fault information.

[0064] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some of the technical features; and all such modifications and substitutions should fall within the protection scope of the appended claims of the present invention.

Claims

1. An information storage method for storing operational data of a mobile power bank, characterized in that, Includes the following steps: Real-time collection of power bank operating data; A micro-era is constructed with anchor elements, difference elements, and sealing elements. The anchor elements are used to record the operating data of the power bank at a certain moment. The difference elements are used to record the change in the operating data after that moment relative to the anchor elements. The sealing elements are used to write the seal into the micro-era. When the device restarts or recovers from a power outage, the most recently sealed micro-era is located based on the sealing element. The anchor element of that micro-era is read, and the difference element after the anchor element is superimposed in sequence to restore the running data at each moment in that micro-era.

2. The information storage method according to claim 1, characterized in that, It also includes the following steps: When abnormal operation data is collected, a freeze event token is inserted into the current micro-era, and the freeze event token in the micro-era is read first when locating the abnormal moment.

3. The information storage method according to claim 2, characterized in that, It also includes the following steps: When the first preset condition is met, a new micro-era begins; The first preset conditions include the differential amplitude exceeding a preset range, the number of differential elements exceeding a preset threshold, the occurrence of a frozen event token, insufficient remaining space in the current micro-era, and reaching a preset maximum time span threshold.

4. The information storage method according to claim 3, characterized in that, It also includes the following steps: When switching to a new micro-era, the original micro-era is written into the seal, and the currently running data is packaged into a new anchor element; Write the changes in the running data at subsequent time points into the difference element after the new anchor element.

5. The information storage method according to claim 1, characterized in that, It also includes the following steps: Configure at least one append cache with a fixed capacity; When the current buffer space is insufficient, switch to the next append buffer to append elements.

6. The information storage method according to claim 1, characterized in that, It also includes the following steps: The forward write pointer indicates the position to write the next element; The pointer is reversed to indicate the location of the most recently sealed micro-epoch.

7. The information storage method according to claim 6, characterized in that, It also includes the following steps: Once the micro-era is written into the seal, the reverse recovery pointer is updated; Write the mirror image of the reverse recovery pointer to the pointer shadow area and mark the micro-epoch as recoverable.

8. The information storage method according to claim 7, characterized in that, It also includes the following steps: When the device restarts or recovers from a power outage, the most recent reverse recovery pointer is located based on the pointer shadow area; Verify the sealed elements backward based on the most recent reverse recovery pointer position to locate the micro-era of the most recent seal; Read the anchor element of the most recently sealed micro-epoch and replay the difference elements following that anchor element as needed.

9. An information storage system, characterized in that, To implement the information storage method as described in any one of claims 1-8, comprising: The anchor point generation module is used to write the operating data of the power bank at a certain moment as anchor point elements. The differential chain encoding module is used to record the change in the running data after this moment relative to the anchor element, as the difference element; The micro-epoch caching module is used to cache the anchor element and the differential elements recorded consecutively after the anchor element as micro-epochs that can be independently committed and restored. The sealing module is used to generate a verification seal at the end of each micro-epoch; The dual-pointer management module includes a forward write pointer and a reverse recovery pointer. The forward write pointer is used to indicate the write position of the next element, and the reverse recovery pointer is used to indicate the micro-epoch position of the most recent seal.

10. A portable power bank, characterized in that, Including the information storage system as described in claim 9.