Implantable medical device data storage system and method
By introducing the design of BLOCK subunit, event subunit and index table in implantable medical devices, the problems of shortened memory life and high power consumption are solved, and efficient and low-power data storage is achieved, which improves the utilization of storage space and the accuracy of data storage.
Patent Information
- Application Number
- CN202510709199.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-29
AI Technical Summary
The existing storage methods of implantable medical devices lead to shortened memory life, high power consumption and increased communication time, and space waste is easily caused when manual and automatic trigger events overlap.
The structural design of storage units and cache units is adopted, including BLOCK subunits, event subunits, index tables and loop queues, and the storage space is managed through index items, reducing the number of reads and writes, and optimizing the data storage process.
Extend memory life, reduce power consumption, improve storage space utilization, reduce redundant data storage, and improve the accuracy and efficiency of data storage.
Smart Images

Figure CN120233955B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage, and in particular to a data storage system and method for an implantable medical device. Background Art
[0002] Implantable medical devices (such as ICMs) detect heartbeat signals, determine if an event has occurred, and store the event if it has. Events are categorized as manually triggered events and detected events. When a patient experiences discomfort, a manual trigger is sent to the medical device via a trigger. Upon detecting the trigger signal, the implantable medical device stores the ECG signals for 6.5 minutes before and 1 minute after the trigger. These signals are not cleared until they are uploaded to an external device during a follow-up visit. Current implantable medical device storage methods allocate one address space within the memory area for event caching and another for storage. Once storage is confirmed, events are copied from the cache space to the storage space, and some storage space is released before the storage space is full. However, memory cells have a limited erase and write lifespan. Repeated erases and writes reduce the memory's lifespan and increase power consumption. Overlapping manual and automatic trigger events can lead to wasted memory space. This large amount of storage space also increases data transmission time during communication with external devices, increasing communication power consumption. Summary of the Invention
[0003] The purpose of this application is to overcome the shortcomings of the prior art and provide an implantable medical device data storage system and method.
[0004] In a first aspect, the present application provides an implantable medical device data storage system, comprising: a storage unit and a cache unit, wherein the storage unit is connected to the cache unit;
[0005] The storage unit includes a BLOCK subunit and an event subunit, wherein the BLOCK subunit includes a plurality of BLOCKs, each BLOCK being used to store an electrocardiogram segment per unit time; the event subunit includes a plurality of event headers and a plurality of event index items, each event header corresponding to an event index item in a one-to-one manner;
[0006] The cache unit includes an index table and a queue, and the index table is connected to the BLOCK subunit, the queue, and the event index item;
[0007] The index table includes multiple index items, and each index item is uniquely connected to a corresponding BLOCK.
[0008] Optionally, the number of the index items is the same as the number of BLOCKs, and the positions of the index items are the same as the positions of the BLOCKs.
[0009] Optionally, the index item is used to store the number of times the corresponding BLOCK is referenced.
[0010] Optionally, the queue includes a queue head and multiple queue index items, the queue head is connected to the first queue index item and points to the position of the first queue index item; the queue index item is connected to the index item and is used to store the position of the empty BLOCK.
[0011] Optionally, the queue is a circular queue.
[0012] Optionally, one event index item is linked to multiple index items.
[0013] Optionally, a part or all of the storage unit is divided into BLOCK sub-units.
[0014] In a second aspect, the present application further provides an implantable medical device data storage method, which is applied to the implantable medical device data storage system described in any one of the first aspects, comprising the following steps:
[0015] Burn initialization, burn the hardware encoding parameters into the memory;
[0016] Initialize a cyclic redundancy check, traverse the index table, obtain an index item with an index value of zero, and rebuild the queue according to the index item with an index value of zero;
[0017] detecting electrocardiogram segments by a sensing module of an implantable medical device to obtain raw electrocardiogram segments, and processing the raw electrocardiogram segments by using a diagnostic algorithm to obtain processed electrocardiogram segments;
[0018] Writing the processed electrocardiogram segment into BLOCK;
[0019] Check whether the queue length meets the conditions for triggering storage. If not, adjust the queue length by adding and releasing operations to trigger storage.
[0020] The event data is transmitted through the diagnostic algorithm in the implantable medical device, the BLOCK is traversed, the BLOCK related to the event data is determined, and the index item value corresponding to the BLOCK is updated to realize data storage.
[0021] Optionally, check whether the queue length meets the conditions for triggering storage. If not, adjust the queue length by adding and releasing operations to trigger storage, including:
[0022] Check the queue length to determine whether it is greater than or equal to a preset length. If so, trigger storage; if not, traverse the index table;
[0023] Determine whether there is an index entry with a value of zero in the index table. If so, add the corresponding queue index entry to the queue. If not, release the earliest generated index entry in the index table that is not the longest and has more than 3 of the same type, and add the released index entry to the queue.
[0024] Continue to determine the length of the queue and repeat the above steps until the length of the queue is greater than or equal to the preset length, triggering storage.
[0025] Optionally, the event data is transmitted through a diagnostic algorithm in the implantable medical device, the BLOCK is traversed, the BLOCK related to the event data is determined, and the index item value corresponding to the BLOCK is updated to implement data storage, including:
[0026] Analyze and process events through diagnostic algorithms to obtain event data, and temporarily store the processed event data in the event header;
[0027] Based on the event data, starting from the current block, traverse X blocks forward and Y blocks backward to determine the block related to the event;
[0028] The corresponding index item is determined according to the BLOCK related to the event, the event data is written into the BLOCK related to the event, and the corresponding index value is increased by one to realize data storage.
[0029] This application provides a data storage system and method for implantable medical devices. By setting an index table and BLOCK subunits, frequent data read and write operations are reduced, the data storage process is optimized, and reasonable cache management and event storage methods can reduce the number of read and write operations, reduce memory wear, and extend the memory life. It can effectively utilize storage space, avoid the storage of redundant data, improve storage space utilization, reduce the active time of the memory, and reduce the power consumption of the entire system. This method can effectively improve the accuracy, reliability, and efficiency of data storage, reduce power consumption, and save storage space.
[0030] In order to make the above features and advantages of the present invention more clearly understood, embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0032] Figure 1This is a structural diagram of an implantable medical device data storage system provided in another embodiment of the present application.
[0033] Figure 2 This is a flowchart of a data storage method for an implantable medical device provided in one embodiment of the present application.
[0034] Figure 3 This is a flowchart of step S5 in the implantable medical device data storage method provided in one embodiment of the present application.
[0035] Figure 4 This is a flowchart of step S6 in the implantable medical device data storage method provided in one embodiment of the present application. DETAILED DESCRIPTION
[0036] To make the purpose and technical solutions of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be clearly and completely described below in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the described embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] In one embodiment, see Figure 1 The present application provides an implantable medical device data storage system, which may include: a storage unit 1 and a cache unit 2, the storage unit 1 is connected to the cache unit 2; the storage unit 1 includes a BLOCK subunit 11 and an event subunit 12, the BLOCK subunit 11 includes multiple BLOCKs, each BLOCK is used to store an electrocardiogram (ECG) segment per unit time, the event subunit 12 includes multiple event headers and multiple event index items, each of the event headers corresponds one-to-one to the event index item; the cache unit 2 includes an index table 21 and a queue 22, the index table 21 is connected to the BLOCK subunit 11, the event index item, and the queue 22; the index table 21 includes multiple index items, each index item corresponds to a BLOCK, and each index item is uniquely connected to the corresponding BLOCK, and is used to store the number of times the corresponding BLOCK is referenced.
[0038] As an example, part or all of the storage unit 1 can be divided into BLOCK sub-units 11 (for example, 1M storage units can be divided), and the BLOCK sub-unit 11 includes multiple BLOCKs (BLOCK1, BLOCK2, ..., BLOCKN), each of which stores an ECG segment of unit time T0.
[0039] As an example, the unit time T0 is determined according to demand.
[0040] In this embodiment, the storage unit 1 is divided into 608 BLOCKs, ie, N=608, and each BLOCK stores an ECG segment with a unit time T0 of 10 seconds, ie, T0=10 seconds.
[0041] As an example, ECG segments are sequentially written into an empty BLOCK, and the corresponding BLOCK is marked from the “empty” state to the “occupied” state.
[0042] As an example, a BLOCK in an occupied state is set to be write-protected, and ECG segments can no longer be written.
[0043] As an example, storage unit 1 may be set to a "cache" attribute.
[0044] As an example, the storage unit 1 may be an external memory.
[0045] As an example, the event sub-unit 12 includes multiple event headers (event header 1 to event header n) and multiple event index items (event index item 1 to event index item n). Each event header corresponds to an event index item, which is used to store an event. For example, event header 1 corresponds to event index item 1, which is used to store an event. Where n is the number of events.
[0046] As an example, the event header is used to store event data, including event start timestamp, end timestamp, manual trigger position, event type, onset time, RR interval, waveform matching parameters, and other data or parameters related to the currently recorded ECG segment.
[0047] As an example, the event index item is used to point to the index item in the index table 21 .
[0048] As an example, the event subunit 12 can store multiple events, for example, 50 automatic events and 10 manual events. Event types may include: tachycardia, bradycardia, premature beats, atrial fibrillation, etc.
[0049] As an example, one event may correspond to multiple ECG segments, that is, one event index item may be connected to multiple index items in the index table 21 .
[0050] As an example, manually triggering an event may include the event triggering time forward Period and Backward ECG segments of the period, automatic trigger events can include event trigger time forward Period and Backward ECG segments of the period.
[0051] As an example, you can set 、 、 、 , then the maximum event length is , where T0 is the unit time and can be set to T0=10 seconds.
[0052] As an example, index table 21 may include multiple index items, namely, index item 1 to index item N. The number of index items is the same as the number of blocks, and the index items uniquely correspond to the blocks, that is, the position of each index item is the same as the position of the block. For example, index item 1 uniquely corresponds to block 1, and the position of index item 1 is the first in index table 21. The position of block 1 is the first in block subunit 11, and the position of index item 1 is also set to the first in index table 21.
[0053] For example, an index item is used to record the number of times a corresponding block is referenced, i.e., the index value. For example, index item 1 is used to store the number of times block 1 is referenced. The maximum number of times each block is referenced is M, i.e., the maximum index value is M.
[0054] For example, when multiple event indexes point to the same index, meaning an ECG segment is referenced by multiple events, the ECG segment only needs to be stored once in the block. This is indicated by incrementing the number of times the block in the ECG segment is referenced by one, i.e., by increasing the index value by one. This reduces write and erase times and saves storage space.
[0055] As an example, the theoretical maximum value of the index count can be set to M = 15. Each BLOCK can be indexed M times, so the theoretical equivalent maximum storage space is the number of BLOCKs N times the unit time T0 times the number of indexes, that is, seconds, which is equivalent to M times the theoretical storage space.
[0056] As an example, for automatically triggered events and manually triggered events, when the time of these two events overlaps, that is, the two events correspond to ECG segments of the same time period, the index item value corresponding to the BLOCK storing the overlapping ECG segments will be increased, and the status of the BLOCK will be "occupied".
[0057] In one example, at a certain moment, an implantable medical device automatically detects cardiac arrest, generating an automatic trigger event. The patient, feeling uncomfortable, also manually triggers the device, generating a manual trigger event. At this point, both automatic and manual trigger events exist. The manual trigger event is stored in an event subunit, corresponding to event header 17 and event index item 17. ECG segments 6.5 minutes before and 1 minute after the event trigger moment represent the manual trigger event, i.e., the ECG segments stored in BLOCK25 to BLOCK70 are referenced. The index values of index items 25 to 70 corresponding to BLOCK25 to BLOCK70 in the index table are incremented by one. Event index item 17 points to the position of index items 25 to 70 in the index table, i.e., the position of BLOCK25 to BLOCK70. Event header 17 stores the event data for the manual trigger event. The automatic trigger event is stored in the event sub-unit, corresponding to the event header 18 and the event index item 18. The ECG fragments 30 seconds before and 30 seconds after the event triggering time represent the automatic triggering event, that is, the ECG fragments stored in BLOCK40 to BLOCK70 are referenced, and the index values of index items 40 to index items 70 corresponding to BLOCK40 to BLOCK70 in the index table are increased by one. The event index item 18 points to the position of index items 40 to index items 70 in the index table, and the position of index items 40 to index items 70 is the position of BLOCK40 to BLOCK70. The event header 18 stores the event data of the automatic triggering event.
[0058] As an example, the index table 21 may be in the RAM of the microcontroller or the RAM of the CPU. The index table 21 of the present application is set in the RAM of the microcontroller.
[0059] As an example, queue 22 includes a queue head and multiple queue index items. The queue index items are connected to the index items in index table 21 and are used to store the positions of the empty BLOCKs corresponding to the index items. The queue head is used to point to the position of queue index item 1.
[0060] As an example, queue 22 is used to store the index item position corresponding to an empty BLOCK. Specifically, the queue index item stores the position of the index item corresponding to the BLOCK with a reference count of zero. It maintains an index item queue, with the queue head pointing to the position of queue index item 1. When storage is required, queue index item 1 is located according to the queue head, the empty BLOCK is determined according to the index item position stored in queue index item 1, the data is stored in the empty BLOCK, and the index value of the index item corresponding to the empty BLOCK is increased by one. After the increase, queue index item 1 is dequeued from queue 22, and queue index item 2 becomes the new queue index item 1, realizing the self-increment of queue 22. The queue head points to the new queue index item 1, waiting for the next storage instruction.
[0061] As an example, before storing, you need to check the queue length L. If the queue length L is less than the maximum event length K max ,Right now , T0 is the unit time, then the index table 21 is traversed, and the index items with index value zero in the index table 21 are added to the queue 22 in order, that is, a queue index item is added to the end of the queue 22.
[0062] As an example, the queue 22 is maintained by the index table 21 , that is, when the index table 21 is updated, the queue 22 is also updated accordingly.
[0063] As an example, the queue 22 may be stored in the RAM of the microcontroller.
[0064] For example, queue 22 can be implemented as a circular queue, managed by a tail pointer. When the tail pointer reaches the end of queue 22, if there is free space at the head of queue 22, storage can continue from queue index 1. This recycles queue 22 space and prevents "false overflow." Specifically, when the next position (modulo operation) of the tail pointer equals the head of the queue, queue 22 is full. At this point, if a new index item needs to be added to the queue, queue index item 1 will overwrite the tail of queue index item L, maintaining the normal operation of queue 22 and continuous data storage.
[0065] In the above-mentioned implantable medical device data storage system, by dividing the storage unit 1 into multiple BLOCKs, a unique corresponding index item is set in the index table 21 according to the BLOCK to record the number of times the BLOCK is referenced, thereby achieving efficient reuse of storage space, saving storage space, and reducing the number of read and write operations; the index items with an index value of zero in the index table 21 constitute a queue 22, and the queue index items in the queue 22 are connected to the index items in the index table 21 to store data in the empty BLOCK position pointed to by the index item, thereby ensuring the timeliness of data storage; by connecting the event index item with the index item, duplicate storage is reduced and storage space is saved; the system of the present application can improve the space utilization of data storage, save storage space, reduce the number of read and write operations, reduce power consumption, enhance storage timeliness and data security, and can better meet the needs of implantable medical devices for ECG data storage and management, thereby improving the storage and management capabilities of implantable medical devices for ECG data.
[0066] In another embodiment, see Figure 2 The present application provides a data storage method for an implantable medical device. The data storage method for an implantable medical device may include the following steps: step S1 to step S6.
[0067] Step S1: Burning initialization, burning the hardware encoding parameters into the memory.
[0068] Step S2: Initialize a cyclic redundancy check, traverse the index table, obtain an index item with an index value of zero, and rebuild the queue according to the index item with an index value of zero.
[0069] Step S3: Detecting the electrocardiogram segments through the sensing module of the implantable medical device to obtain original electrocardiogram segments, and processing the original electrocardiogram segments using the diagnostic algorithm to obtain processed electrocardiogram segments.
[0070] Step S4: Write the processed ECG segment into BLOCK.
[0071] Step S5: Check whether the queue length meets the conditions for triggering storage. If not, adjust the queue length through increase and release operations to trigger storage.
[0072] Step S6: The event data is transmitted through the diagnostic algorithm in the implantable medical device, the BLOCK is traversed, the BLOCK related to the event data is determined, and the index item value corresponding to the BLOCK is updated to realize data storage.
[0073] In the data storage method for implantable medical devices of the present application, the hardware encoding parameters are burned into the memory by burning initialization, which can provide the necessary basic parameter settings for subsequent data storage and ensure the accuracy and standardization of storage operations; initializing the cyclic redundancy check and rebuilding the queue according to the index table can effectively restore the system state, ensure the normal operation of data verification and storage queues, and improve data reliability; using the perception module and diagnostic algorithm to process the original ECG fragments, the required ECG fragments can be accurately obtained and processed; the processed ECG fragments are written into the BLOCK in sequence, realizing the perception storage of data and accurate data storage; judging the queue length and handling it flexibly, when the queue length is insufficient, by reasonably releasing and adding index items, ensuring that the queue length reaches the preset length, thereby triggering the storage process in time and improving storage efficiency. The method of the present application can effectively improve the accuracy, reliability and efficiency of data storage, reduce power consumption, and save storage space.
[0074] In step S1, see Figure 2 Step S1 in the program is initialization, in which the hardware encoding parameters are written into the memory.
[0075] As an example, the storage algorithm is written into the memory in the form of executable instructions, and the executable instructions include hardware encoding parameters, and the hardware encoding parameters include: index table 21, queue 22, the number N of index items in index table 21, and the length L of queue 22.
[0076] As an example, the memory may be a CPU external memory.
[0077] In step S2, see Figure 2 In step S2, a cyclic redundancy check is initialized, the index table is traversed, an index item with an index value of zero is obtained, and a queue is rebuilt according to the index item with an index value of zero.
[0078] As an example, find the storage location of the cyclic redundancy check (CRC) reference table in the memory, and determine the number N of index items in the index table based on the hard-coded parameters set during initialization. Perform a logical consistency check on the index table, for example, check whether the index items in the index table are within a reasonable range and whether the correspondence between each index item and the BLOCK is correct.
[0079] Furthermore, the index table is traversed to find the index item with an index value of zero. The index items with an index value of zero are sequentially arranged to form queue index items, resulting in a queue of length L. The queue is equivalent to the index item set of the empty block. The queue head points to the position of queue index item 1, and the queue index item points to the index item position with an index value of zero, which is the position of the empty block.
[0080] As an example, a queue follows the first-in-first-out (FIFO) principle.
[0081] As an example, the queue can be a circular queue. The queue is maintained by an index table, that is, when the index table is updated, the queue is also updated accordingly.
[0082] In step S3, see Figure 2 In step S3, the sensing module of the implantable medical device detects the electrocardiogram segment to obtain the original electrocardiogram segment, and the diagnostic algorithm is used to process the original electrocardiogram segment to obtain the processed electrocardiogram segment.
[0083] For example, the sensing module of an implantable medical device can consist of highly sensitive electrodes and related sensors. These electrodes are in close contact with the biological tissue surrounding the heart, capturing the bioelectrical activity generated by the heart during its beating. The sensing module of the implantable medical device keenly detects these weak bioelectrical activities and converts the electrical signal changes into electrical signal data, thereby generating raw electrocardiogram (ECG) segments. Raw ECG segments often contain various interferences and noises, necessitating the use of diagnostic algorithms to process them. Diagnostic algorithms can employ signal processing techniques and machine learning algorithms. Signal processing can use filtering techniques, such as low-pass filtering, high-pass filtering, and band-pass filtering, to remove noise interference in different frequency ranges while preserving the effective components of the ECG segments. Noise reduction algorithms, such as wavelet transform denoising, can also be employed to further improve signal quality. After processing by these diagnostic algorithms, interference and noise in the raw ECG segments are effectively removed, and the features of the raw ECG segments are enhanced and optimized, resulting in processed ECG segments. The processed ECG segments are clearer and more accurate, providing doctors with more reliable diagnostic basis, helping them to more accurately judge the patient's heart health status and detect potential heart diseases in a timely manner.
[0084] In step S4, see Figure 2 In step S4, the processed ECG segments are written into BLOCK.
[0085] Specifically, the queue head points to the position of queue index item 1, and writes the processed electrocardiogram segments into the empty BLOCK pointed to by the corresponding index item position in the order of the queue index items. After writing is completed, the corresponding queue index item is dequeued, and the queue head moves back one position, that is, queue index item 2 becomes the new queue index item 1, and the queue head points to the position of the new queue index item 1.
[0086] In step S5, see Figure 2 In step S5, it is checked whether the queue length meets the conditions for triggering storage. If not, the queue length is adjusted by adding and releasing operations to trigger storage.
[0087] As an example, see Figure 3 , step S5 may include the following steps: step S51 to step S53.
[0088] Step S51: Check the queue length to determine whether the queue length is greater than or equal to the preset length. If so, trigger storage; if not, traverse the index table.
[0089] Step S52: Determine whether there is an index item with a value of zero in the index table. If so, add the corresponding queue index item to the queue. If not, release the earliest generated index item in the index table, which is not the longest and has a number of the same type greater than 3, and add the released index item to the queue.
[0090] Step S53: Continue to determine the length of the queue, and repeat the above steps until the length of the queue is greater than or equal to the preset length, triggering storage.
[0091] Specifically, in step S51, the queue length L is checked and compared with a preset length, which is the maximum event length. K max , the expression is:
[0092]
[0093] Among them, T0 is the unit time, The forward tracking period for manually triggered events. The backward period for manually triggered events. The forward tracking period for automatically triggering events, The retrospective period for automatically triggering events.
[0094] As an example, if the queue length , then trigger storage; if the queue length , then traverse the index table.
[0095] Furthermore, in step S52, the index table is traversed, starting from index item 1 in the index table, and each index item is traversed in sequence. Specifically, the index value of index item 1 is checked to determine whether the index value of index item 1 is zero. If it is zero, index item 1 is added to the queue, and a queue index item is generated in the queue to point to the position of index item 1. The position of index item 1 is the position of BLOCK1 corresponding to index item 1. If the index value of index item 1 is not zero, the index value of index item 2 is checked and determined, and so on until all index items N are checked, thereby adding all index items in the index table with an index value of zero to the queue.
[0096] As an example, if there is no index item with an index value of zero in the index table, the earliest generated index item in the index table, which is not the longest and has a number of the same type greater than 3, will be released, and the released index item will be added to the queue, and the corresponding queue index item will be generated at the end of the queue.
[0097] Further, in step S53, the queue length is checked and the queue length L is compared with the preset length K max For comparison, if the queue length , then trigger storage; if the queue length , then continue to traverse the index table and repeat the above steps until the queue length L ≥ the preset length K max , triggering storage.
[0098] In one example, if three atrial fibrillation events and five arrest events occur, alternating in time, the earliest two arrest events are deleted and the three atrial fibrillation events are retained.
[0099] In step S6, refer to Figure 2 In step S6, the event data is transmitted through the diagnostic algorithm in the implantable medical device, the BLOCK is traversed, the BLOCK related to the event data is determined, and the index item value corresponding to the BLOCK is updated to realize data storage.
[0100] As an example, see Figure 4 , step S6 may include the following steps: step S61 to step S63.
[0101] Step S61: Analyze and process the event using a diagnostic algorithm to obtain event data, and temporarily store the processed event data in the event header.
[0102] Step S62: Based on the event data, starting from the current block, traverse X blocks forward and Y blocks backward to determine the block related to the event.
[0103] Step S63: Determine the corresponding index item according to the BLOCK related to the event, write the event data into the BLOCK related to the event, and increase the corresponding index value by one to realize data storage.
[0104] Specifically, in step S61, when the implantable medical device automatically detects an event, or the patient manually alarms an event through the implantable medical device, the diagnostic algorithm in the implantable medical device analyzes and processes the event, such as filtering, feature extraction, etc., to extract useful information and obtain event data. The diagnostic algorithm outputs a storage instruction and temporarily stores the obtained event data in the event header in chronological order.
[0105] As an example, the event data may include: an event start timestamp, an end timestamp, and an event type; the event type includes a manually triggered event and an automatically triggered event.
[0106] Furthermore, in step S62, based on the event start timestamp in the event data, starting from the current block, traverse forward X blocks, and the expression is:
[0107]
[0108] Among them, T1 is the time length of the event triggering in the forward traversal state; T0 is the unit time, the time of the electrocardiogram signal data stored in each BLOCK.
[0109] Furthermore, traversing Y blocks backward from the block corresponding to the event start timestamp, the expression is:
[0110]
[0111] Among them, T2 is the time length of the event triggering in the backward traversal state; T0 is the unit time, that is, the time length of the electrocardiogram signal data stored in each BLOCK.
[0112] Furthermore, the forward X blocks to the backward Y blocks are determined as blocks related to the event.
[0113] Furthermore, in step S63, a corresponding index item is determined according to the BLOCK related to the event, and the index value of the corresponding index item is increased by one; the event index item is pointed to the corresponding index item to realize data storage.
[0114] As an example, when traversing backward, it is necessary to wait for the write to complete before adding one to the index value, so the backward traversal time is slower than the forward traversal time.
[0115] As an example, all data can be manually deleted by the program controller, wherein deleting all data includes setting all index values of the index table to zero and setting the queue index of the queue to point to all BLOCKs.
[0116] In another example, the unit time T0 can be set to 10 seconds. For a cardiac arrest event, when the patient manually triggers, the triggering time length in the forward traversal state is T 1手 = 6.5 minutes, the time length of the trigger in the backward traversal state is T 2手 =1 minute, then starting from the current BLOCK, that is, BLOCK500, traverse 40 BLOCKs forward and traverse 7 BLOCKs backward, determine that the BLOCKs related to this arrest event are BLOCK460 to BLOCK457, add one to the index values of index items 460 to index items 457 corresponding to BLOCK460 to BLOCK457, and synchronize the positions of index items 460 to index items 457 to the event index items corresponding to the arrest event to realize data storage.
[0117] In the data storage method of the implantable medical device of the present application, the hardware encoding parameters are burned into the memory by burning initialization, which can provide the necessary basic parameter settings for subsequent data storage and ensure the accuracy and standardization of the storage operation; the original ECG segment is processed by the perception module and the diagnosis algorithm, which can accurately obtain and process the required ECG segment, obtain a clearer and more accurate processed ECG segment, and provide a reliable basis for the doctor's diagnosis; the queue length is judged and flexibly processed, and when the queue length is insufficient, the queue length is ensured to reach the preset length by reasonably releasing and adding index items, thereby triggering the storage process in time, improving storage efficiency, reducing the number of read and write times, and extending the service life of the memory; through reasonable cache management and event storage methods, unnecessary write operations can be reduced, thereby reducing memory wear and extending the service life of the memory; through the index item and cache mechanism, the data storage process is optimized, the storage space is effectively utilized, and the storage of redundant data is avoided, thereby improving the utilization rate of the storage space; by reducing frequent data read and write operations and optimizing the management of storage space, the active time of the memory is reduced, thereby reducing the power consumption of the overall system. The method of the present application can effectively improve the accuracy, reliability and efficiency of data storage, and can also save storage space and reduce power consumption.
[0118] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The order of execution of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with other steps or at least a portion of the sub-steps or stages of other steps.
[0119] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0120] Although the present application has been disclosed above with reference to the embodiments, they are not intended to limit the present application. Anyone with ordinary knowledge in the technical field may make slight changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be determined by the scope of the appended patent application.
Claims
1. An implantable medical device data storage system, characterized in that: include: a storage unit and a cache unit, wherein the storage unit is connected to the cache unit; The storage unit includes a BLOCK subunit and an event subunit, wherein the BLOCK subunit includes a plurality of BLOCKs, each BLOCK being used to store an electrocardiogram segment per unit time; the event subunit includes a plurality of event headers and a plurality of event index items, each event header corresponding to an event index item in a one-to-one manner; The cache unit includes an index table and a queue, and the index table is connected to the BLOCK subunit, the queue, and the event index item; The index table includes multiple index items, each index item is uniquely connected to a corresponding BLOCK, and the index item is used to store the number of times the corresponding BLOCK is referenced; The event header is used to store event data, the event index item is used to point to the index item in the index table, and the queue is used to store the index item position corresponding to the empty BLOCK.
2. The implantable medical device data storage system according to claim 1, wherein: The number of the index items is the same as the number of BLOCKs, and the positions of the index items are the same as the positions of the BLOCKs.
3. The implantable medical device data storage system according to claim 1, wherein: The queue includes a queue head and multiple queue index items. The queue head is connected to the first queue index item and points to the position of the first queue index item. The queue index item is connected to the index item and is used to store the position of an empty BLOCK.
4. The implantable medical device data storage system according to claim 3, characterized in that: The queue is a circular queue.
5. The implantable medical device data storage system according to claim 1, wherein: An event index item is connected with multiple index items.
6. The implantable medical device data storage system according to claim 1, characterized in that: Part or all of a storage unit is divided into BLOCK subunits.
7. A method for storing data in an implantable medical device, characterized in that: The implantable medical device data storage method is applied to the implantable medical device data storage system according to any one of claims 1 to 6, comprising the following steps: Burn initialization, burn the hardware encoding parameters into the memory; Initialize a cyclic redundancy check, traverse the index table, obtain an index item with an index value of zero, and rebuild the queue according to the index item with an index value of zero; detecting electrocardiogram segments by a sensing module of an implantable medical device to obtain raw electrocardiogram segments, and processing the raw electrocardiogram segments by using a diagnostic algorithm to obtain processed electrocardiogram segments; Writing the processed electrocardiogram segment into BLOCK; Checking whether the queue length meets the conditions for triggering storage; if not, adjusting the queue length by adding and releasing operations to trigger storage, including: checking the queue length and determining whether the queue length is greater than or equal to a preset length; if so, triggering storage; if not, traversing the index table; determining whether there is an index item with a value of zero in the index table; if so, adding the corresponding queue index item to the queue; if not, releasing the earliest generated index item in the index table that is not the longest and has a number of the same type greater than 3, and adding the released index item to the queue; continuing to determine the queue length and looping the above steps until the queue length is greater than or equal to the preset length, triggering storage; The event data is transmitted through the diagnostic algorithm in the implantable medical device, the BLOCK is traversed, the BLOCK related to the event data is determined, and the index item value corresponding to the BLOCK is updated to realize data storage.
8. The implantable medical device data storage method according to claim 7, characterized in that: The diagnostic algorithm in the implantable medical device transmits event data, traverses the blocks, determines the blocks related to the event data, and updates the index item value corresponding to the blocks to implement data storage, including: Analyze and process events through diagnostic algorithms to obtain event data, and temporarily store the processed event data in the event header; Based on the event data, starting from the current block, traverse X blocks forward and Y blocks backward to determine the block related to the event; The corresponding index item is determined according to the BLOCK related to the event, the event data is written into the BLOCK related to the event, and the corresponding index value is increased by one to realize data storage.
Citation Information
Patent Citations
Hard disk file system suitable for security application and operation method thereof
CN104063187A
FLASH memory
CN110134323A
