A hybrid storage and paging display method and system for historical data
By combining a hybrid doubly linked list and a static page memory pool, the problem of efficient storage and convenient paging display of historical records in embedded devices is solved, achieving a balance between efficient storage and flexible operation, and improving the stability and real-time performance of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DALIAN ZONGYI TECH DEV
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-17
AI Technical Summary
In embedded devices with stringent resource constraints, existing technologies struggle to achieve efficient updating and convenient pagination of historical records while ensuring Flash storage efficiency and memory security.
It adopts a hybrid doubly linked list structure, combined with a static page memory pool and filtering algorithm, to realize the continuous storage of data in memory and linking them through pointers, supporting efficient Flash storage and flexible paging display.
It achieves efficient and secure data storage in resource-constrained environments, and simplifies pagination operations, reducing false alarm rates and improving system stability and real-time performance.
Smart Images

Figure CN121541834B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data storage and display technology, specifically relating to a method and system for hybrid storage and paginated display of historical data. Background Technology
[0002] Embedded devices are a core component of industrial control, often undertaking critical data acquisition, logic control, and human-machine interaction tasks. For example, airport navigation light dimmers are a type of embedded device. Embedded devices are typically designed based on low-power processors, with severely limited hardware resources. ROM / RAM is often only in the KB to MB range, and storage is limited, with small Flash memory capacity. Taking dimmers as an example, their integrated serial port display needs to record and display fault alarm information generated during device operation in real time. This historical data is crucial for operators to assess device status and make maintenance decisions. Since serial port displays typically do not run an operating system to ensure real-time performance, and their memory and storage resources are extremely limited, achieving efficient and reliable storage, real-time updates, and user-friendly pagination browsing of historical data under these stringent resource constraints becomes a specific and prominent technical challenge.
[0003] Currently, embedded software primarily relies on two basic data structures for processing such data sets: arrays and linked lists. When using a pure array approach, the system allocates a contiguous, fixed space in memory for storage. The advantage of this approach is that the memory layout matches the physical page structure of the Flash memory, resulting in extremely high efficiency in writing or reading the entire array from Flash and good storage reliability. However, its disadvantages are particularly evident in data update and display logic: when a new fault occurs requiring insertion at the beginning of the array (or scrolling to cover the oldest record), a large number of subsequent elements may need to be moved, resulting in a time complexity of O(n) and low efficiency. More importantly, when implementing paginated display, calculating the array index offset for each page is complex, and page turning operations cannot be directly located, leading to bloated and error-prone code.
[0004] The pure linked list approach attempts to address the flexibility issue. Linked lists connect data nodes via pointers; inserting or deleting a node only requires modifying the pointer, resulting in a time complexity of O(1), and is logically easy to traverse and paginate. However, this approach has two major drawbacks in embedded environments: First, the linked list nodes are scattered throughout memory, contradicting the physical characteristics of Flash memory's continuous page programming, preventing the storage process from utilizing the efficiency of page write operations, leading to slow write speeds and uneven wear. Second, linked lists typically rely on runtime dynamic memory management (such as using C's malloc() / free() functions for dynamic memory allocation and release), which easily generates memory fragmentation over long-term operation. This can ultimately lead to system crashes even when total memory seems sufficient, due to the inability to allocate contiguous node space to meet requirements, which is unacceptable for industrial equipment requiring long-term stable operation.
[0005] In summary, in specific application scenarios of industrial embedded devices such as airport navigation light dimmers, existing technical solutions face a dilemma: pure array solutions, while efficient in storage, are rigid in operation and struggle to support flexible paging displays; pure linked list solutions, while flexible in operation, sacrifice storage efficiency and memory safety. Therefore, there is an urgent need for an innovative data management method that can achieve efficient updating of historical records and convenient paging displays while ensuring Flash storage efficiency and memory safety, thereby resolving the aforementioned contradictions. Summary of the Invention
[0006] This invention addresses the aforementioned problems and overcomes the shortcomings of existing technologies by providing a method and system for hybrid storage and paginated display of historical data.
[0007] To achieve the above objectives, the present invention adopts the following technical solution.
[0008] In a first aspect, the present invention provides a method for hybrid storage and paginated display of historical data, comprising the following steps;
[0009] Step S1: Create a static page memory pool in the memory of the embedded device. The size of the static page memory pool is matched with the preset number of pages and the data capacity per page.
[0010] Step S2: Read historical data from non-volatile memory;
[0011] Step S3: If historical data exists, execute the data structure construction step to construct the historical data into a hybrid doubly linked list; if no historical data exists, initialize the list head and do not process it; wherein, each node of the hybrid doubly linked list corresponds to a display page, the data stored in the node is continuous in memory, and the nodes are linked by pointers;
[0012] Step S4: Receive real-time information sent by external devices in real time, and use a filtering algorithm to determine the stability of the real-time information. If it is confirmed to be valid information, insert it into the hybrid doubly linked list in chronological order and update it synchronously to the non-volatile memory.
[0013] Step S5: Based on user operation or default settings, determine the current display page, locate the corresponding node from the hybrid doubly linked list, and output the data stored in the node to the display device in chronological order for paginated display;
[0014] Step S6: In response to the user's page-turning command, traverse the nodes forward or backward along the hybrid doubly linked list, update the currently displayed page, and re-output the corresponding data to the display device.
[0015] Furthermore, the construction of the hybrid doubly linked list in step S3 includes the following sub-steps:
[0016] Sub-step S31: Initialize the head pointer of the linked list;
[0017] Sub-step S32: Load the read historical data into the static page memory pool. If the amount of data is insufficient to fill all pages, initialize the remaining memory area to a preset null value.
[0018] Sub-step S33: Calculate the page to which the latest record belongs and its offset within the page based on the position information of the latest record;
[0019] Sub-step S34: Construct a linked list of nodes in units of pages, with each node containing one page of data and pointers to the nodes before and after it;
[0020] Sub-step S35: Link the nodes according to the time order to form a doubly linked list structure.
[0021] Furthermore, the filtering algorithm in step S4 includes:
[0022] Set the trust level for the current information;
[0023] Compare the current information with the previous information for consistency;
[0024] If they match, the trust level is increased; if they do not match, the trust level is decreased.
[0025] When the trust level is lower than the preset threshold, the previous information is used as the current valid information.
[0026] When the trust level reaches the confirmation threshold, the current information is deemed valid and an insertion operation is performed.
[0027] Furthermore, in step S4, when inserting real-time information into the hybrid doubly linked list, if the list is full, the earliest record is deleted and the new record is inserted at the end of the list.
[0028] Furthermore, in step S5, when displaying the page, each record includes a timestamp and event content, and is displayed in chronological order from oldest to newest.
[0029] Furthermore, the static page memory pool has 5 pages, each page stores 8 records, and the total capacity is 40 records.
[0030] Furthermore, the embedded device is a serial port screen, the non-volatile memory is a Flash memory, and the external device communicates with the serial port screen via a 485 bus.
[0031] Furthermore, the nodes of the hybrid doubly linked list have contiguous memory addresses, supporting overall read and write operations to the Flash memory on a page-by-page basis.
[0032] Furthermore, the method for hybrid storage and paginated display of historical data automatically executes steps S1 to S3 when the embedded device starts up, and continuously executes steps S4 to S6 during device operation.
[0033] Secondly, the present invention also provides a hybrid storage and paginated display system for historical data, for implementing the hybrid storage and paginated display method for historical data, including a memory pool creation module, a data reading module, a linked list construction module, a real-time processing module, a paginated display module, and a page turning control module;
[0034] The memory pool creation module is used to create a static page memory pool in the memory of the embedded device. The size of the static page memory pool is matched with the preset number of pages and the data capacity per page.
[0035] The data reading module is used to read historical data from non-volatile memory;
[0036] The linked list construction module is used to construct a hybrid doubly linked list when historical data exists; when no historical data exists, the linked list head is initialized and no processing is performed; wherein, each node of the hybrid doubly linked list corresponds to a display page, the data stored in the node is contiguous in memory, and the nodes are linked by pointers;
[0037] The real-time processing module is used to receive real-time information sent by external devices in real time, perform stability judgment on the real-time information through a filtering algorithm, and if it is confirmed to be valid information, insert it into the hybrid doubly linked list in chronological order and update it synchronously to the non-volatile memory.
[0038] The pagination display module is used to determine the current display page based on user operation or default settings, locate the corresponding node from the hybrid doubly linked list, and output the data stored in the node to the display device in chronological order for pagination display.
[0039] The page-turning control module is used to respond to the user's page-turning command, traverse the nodes forward or backward along the hybrid doubly linked list, update the currently displayed page, and control the pagination display module to re-output the corresponding data to the display device.
[0040] Beneficial effects of this invention:
[0041] 1. This invention utilizes the "hybrid doubly linked list" data structure, where the data within each node is stored contiguously in a static page memory pool, ensuring efficient overall page read / write operations with Flash memory and inheriting the high storage efficiency of arrays. Simultaneously, the nodes are logically linked by pointers, reducing the time complexity of record insertion, deletion, and page traversal (page turning) operations to O(1), thus inheriting the flexibility of linked list operations. Therefore, on resource-constrained embedded platforms, this invention simultaneously satisfies the requirements of efficient data storage, security, and flexible interface interaction; that is, it achieves a balance between storage efficiency and operational flexibility.
[0042] 2. This invention introduces a filtering algorithm into the real-time information processing flow. By setting and dynamically adjusting the "trust level" of information, it effectively filters out jitter signals caused by momentary interference in communication lines. Only fault information confirmed as stable and valid is included in the historical database and stored. This mechanism significantly reduces the false alarm rate, ensures the accuracy and reliability of the stored and displayed historical data, and provides equipment maintenance personnel with a more reliable basis for decision-making; that is, this invention improves the system's anti-interference capability and data reliability.
[0043] 3. Based on the hybrid doubly linked list structure, the pagination display algorithm of this invention can respond to the user's page-turning command with extremely low time overhead (O(1)). The pagination display module can directly locate the corresponding linked list node (page) and continuously read and render all records of that page without performing complex global index calculations. This not only ensures the smoothness of user interface operation and simplifies the work complexity of maintenance personnel, but also ensures that the embedded device, as a real-time system, can concentrate its main computing resources on core control tasks and meet high real-time requirements; that is, this invention optimizes human-computer interaction efficiency and system real-time performance.
[0044] 4. By employing a pre-allocated static page memory pool to support the entire data structure, this invention completely avoids frequent dynamic memory allocation and release during runtime. This fundamentally eliminates the risk of system crashes due to memory fragmentation accumulation, greatly enhancing the stability and reliability of embedded devices under unattended, long-term continuous operation conditions; in other words, this invention enhances the long-term operational stability of the system. Attached Figure Description
[0045] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of the overall process of a method for hybrid storage and paginated display of historical data provided in an embodiment of the present invention.
[0047] Figure 2 This is a schematic diagram illustrating the construction of a hybrid doubly linked list data structure provided in an embodiment of the present invention.
[0048] Figure 3 This is a schematic diagram illustrating the historical alarm information storage and update process provided in an embodiment of the present invention.
[0049] Figure 4 This is a schematic diagram of the historical information pagination display and page turning control process provided in an embodiment of the present invention.
[0050] Figure 5 This is a schematic diagram of a filtering algorithm for determining the stability of alarm information, provided in an embodiment of the present invention.
[0051] Figure 6 This is a schematic block diagram of a hybrid storage and paginated display system for historical data provided in an embodiment of the present invention.
[0052] The diagram is labeled as follows: 100 is the mixed storage and pagination display system for historical data, 101 is the memory pool creation module, 102 is the data reading module, 103 is the linked list construction module, 104 is the real-time processing module, 105 is the pagination display module, and 106 is the page turning control module. Detailed Implementation
[0053] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0054] like Figures 1 to 5 As shown in the figure, an embodiment of the present invention provides a method for hybrid storage and paginated display of historical data, which specifically includes the following steps;
[0055] Step S1: Create a static page memory pool in the memory of the embedded device. The size of the static page memory pool is matched with the preset number of pages and the data capacity per page.
[0056] Step S2: Read historical data from non-volatile memory; the historical data is stored in chronological order;
[0057] Step S3: If historical data exists, execute the data structure construction step to construct the historical data into a hybrid doubly linked list; if no historical data exists, initialize the list head and do not process it; wherein, each node of the hybrid doubly linked list corresponds to a display page, the data stored in the node is continuous in memory, and the nodes are linked by pointers;
[0058] Step S4: Receive real-time information sent by external devices in real time, and use a filtering algorithm to determine the stability of the real-time information. If it is confirmed to be valid information, insert it into the hybrid doubly linked list in chronological order and update it synchronously to the non-volatile memory.
[0059] Step S5: Based on user operation or default settings, determine the current display page, locate the corresponding node from the hybrid doubly linked list, and output the data stored in the node to the display device in chronological order for paginated display;
[0060] Step S6: In response to the user's page-turning command, traverse the nodes forward or backward along the hybrid doubly linked list, update the currently displayed page, and re-output the corresponding data to the display device.
[0061] Specifically, constructing the hybrid doubly linked list in step S3 includes the following sub-steps:
[0062] Sub-step S31: Initialize the head pointer of the linked list;
[0063] Sub-step S32: Load the read historical data into the static page memory pool. If the amount of data is insufficient to fill all pages, initialize the remaining memory area to a preset null value.
[0064] Sub-step S33: Calculate the page to which the latest record belongs and its offset within the page based on the position information of the latest record;
[0065] Sub-step S34: Construct a linked list of nodes in units of pages, with each node containing one page of data and pointers to the nodes before and after it;
[0066] Sub-step S35: Link the nodes according to time order to form a doubly linked list structure; combined with Figure 2 As shown in the diagram, the continuous historical data stored in Flash is organized into a doubly linked list structure in the static page memory pool according to its time order and page affiliation. The nodes are connected internally by pointers (such as forward and backward pointers). This design makes each node (corresponding to a display page) continuous in memory, which is convenient for reading and writing Flash as a whole. At the same time, the linked list structure provides a direct channel for fast page turning.
[0067] Specifically, the filtering algorithm in step S4 includes:
[0068] Set the trust level of the current information to 3 (the highest level);
[0069] Compare the current information with the previous information for consistency;
[0070] If they match, the trust level is increased (maximum 3); if they do not match, the trust level is decreased (minimum 0).
[0071] When the trust level is lower than the preset threshold (2), the previous information is used as the current valid information;
[0072] When the trust level reaches the confirmation threshold (3), the current information is deemed valid and an insertion operation is performed; combined with Figure 5 As shown in the flowchart, this algorithm illustrates the decision-making logic of the filtering algorithm. By introducing a trust level mechanism (e.g., initially high, maximum 3), the algorithm can effectively distinguish between stable real fault signals and transient communication interference. For example, only when the same fault information appears consecutively a sufficient number of times (trust level rises to the confirmation threshold) is it adopted, thereby ensuring the authenticity and reliability of information in the historical record database at the data source and reducing invalid records and false alarms caused by signal jitter.
[0073] Specifically, in step S4, when inserting real-time information into the hybrid doubly linked list, if the list is full, the earliest record is deleted, and the new record is inserted at the end of the list; combined with Figure 3 As shown, this process demonstrates the handling path after a new fault message is generated. When the 40 records managed by the linked list are full, this rolling update mechanism automatically removes the oldest data and ensures that the latest data is added in chronological order. This process is performed entirely within a pre-defined static page memory pool, involving only pointer modification and overwriting of specified memory blocks. It eliminates the need for large-scale data migration, achieving both limited database capacity management and extremely high update efficiency.
[0074] Specifically, in step S5, during pagination, each record includes a timestamp and event content, and is arranged in chronological order from oldest to most recent. This display order aligns with the operator's cognitive habits of tracing fault paths from history to the present, making the information presented on each page logical and readable, greatly improving the user's efficiency in obtaining information when viewing multiple pages of historical records. Combined with... Figure 4 The diagram showing the pagination and page-turning control flow of historical information illustrates the core process of pagination and page-turning control based on a hybrid doubly linked list. The pagination and page-turning control flow also intuitively demonstrates the user interaction process. When the user interface is on a certain display page (corresponding to a node in the linked list), if the user triggers the "page up" command, the forward pointer of the linked list will be used to locate the previous node; if the "page down" command is triggered, the backward pointer will be used to locate the next node. After locating, the entire page of continuous data (e.g., 8 records) stored in the new node is directly output to the fixed display area of the screen. This process completely avoids the complex global index recalculation required in traditional array schemes, and its page-turning operation has a constant time complexity of O(1), ensuring the immediacy and smoothness of the user interface response.
[0075] Specifically, the static page memory pool has 5 pages, with each page storing 8 records, for a total capacity of 40 records. This specific parameter design is derived from the needs of actual application scenarios (such as airport navigation light dimmers). It satisfies the need to record enough historical information (40 records) while keeping memory usage within a reasonable range (5 pages). At the same time, the display density of 8 records per page is suitable for the typical display area of a serial port screen, achieving an optimized match between storage space, memory resources, and human-machine interface friendliness.
[0076] Specifically, the embedded device is a serial port screen, the non-volatile memory is Flash memory, and the external device communicates with the serial port screen via a RS-485 bus. This hardware configuration clarifies the typical application environment of this invention. The serial port screen, as a display terminal without an operating system and with limited resources, communicates with a host computer (such as a dimmer controller) via a stable RS-485 bus to receive fault information. The method of this invention is optimized for the resource constraints and communication characteristics of this specific hardware, ensuring the practicality and efficiency of the technical solution.
[0077] Specifically, the nodes of the hybrid doubly linked list have contiguous memory addresses, supporting overall read and write operations to the Flash memory in units of pages. The contiguous memory of the nodes allows programming (writing) and reading from the Flash memory to be performed efficiently in units of "pages," perfectly matching the physical storage characteristics of Flash memory. This avoids the multiple fragmented write operations caused by the scattered nodes in traditional linked lists, thereby significantly improving the throughput efficiency of the storage subsystem and reducing the wear and tear on the Flash memory.
[0078] Specifically, the method for hybrid storage and paging display of historical data automatically executes steps S1 to S3 when the embedded device starts up, and continuously executes steps S4 to S6 during device operation. This execution logic ensures that the system can immediately restore the historical working state after power-on, and can complete the real-time update, storage and display control of data without manual intervention throughout the entire life cycle. This reflects the high degree of autonomy and reliability of the system, and is very suitable for the requirements of long-term stable operation in industrial sites.
[0079] like Figure 6 As shown, an embodiment of the present invention provides a hybrid storage and paging display system for historical data, used to implement the hybrid storage and paging display method for historical data. This hybrid storage and paging display system 100 for historical data includes a memory pool creation module 101, a data reading module 102, a linked list construction module 103, a real-time processing module 104, a paging display module 105, and a page turning control module 106.
[0080] The memory pool creation module 101 is used to create a static page memory pool in the memory of the embedded device. The size of the static page memory pool is matched with the preset number of pages and the data capacity per page.
[0081] The data reading module 102 is used to read historical data from non-volatile memory;
[0082] The linked list construction module 103 is used to construct a hybrid doubly linked list when historical data exists; and to initialize the linked list head and do not perform any processing when no historical data exists; wherein, each node of the hybrid doubly linked list corresponds to a display page, the data stored in the node is continuous in memory, and the nodes are linked by pointers.
[0083] The real-time processing module 104 is used to receive real-time information sent by external devices in real time, perform stability judgment on the real-time information through a filtering algorithm, and if it is confirmed as valid information, insert it into the hybrid doubly linked list in chronological order and update it synchronously to the non-volatile memory.
[0084] The pagination display module 105 is used to determine the current display page according to user operation or default settings, locate the corresponding node from the hybrid doubly linked list, and output the data stored in the node to the display device in chronological order for pagination display.
[0085] The page turning control module 106 is used to respond to the user's page turning command, traverse the nodes forward or backward along the hybrid doubly linked list, update the currently displayed page, and control the pagination display module 105 to re-output the corresponding data to the display device.
[0086] The hybrid storage and paging display system 100 for historical data of the present invention, through the coordinated operation of the memory pool creation module 101, the data reading module 102, the linked list construction module 103, the real-time processing module 104, the paging display module 105, and the page turning control module 106, deeply integrates static memory management, efficient Flash storage, anti-interference filtering, and linked list traversal logic to form a complete solution for resource-constrained embedded scenarios, and ultimately solidifies the technical advantages of "continuous storage, flexible operation, and convenient display" at the hardware level.
[0087] It is understood that the above specific description of the present invention is only for illustrating the present invention and is not limited to the technical solutions described in the embodiments of the present invention. Those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention to achieve the same technical effect; as long as the use needs are met, they are all within the protection scope of the present invention.
Claims
1. A method for hybrid storage and paginated display of historical data, characterized in that, Includes the following steps: Step S1: Create a static page memory pool in the memory of the embedded device. The size of the static page memory pool is matched with the preset number of pages and the data capacity per page. Step S2: Read historical data from non-volatile memory; Step S3: If historical data exists, execute the data structure construction step to construct the historical data into a hybrid doubly linked list; if no historical data exists, initialize the list head and do not process it; wherein, each node of the hybrid doubly linked list corresponds to a display page, the data stored in the node is continuous in memory, and the nodes are linked by pointers; The construction of the hybrid doubly linked list in step S3 includes the following sub-steps: Sub-step S31: Initialize the head pointer of the linked list; Sub-step S32: Load the read historical data into the static page memory pool. If the amount of data is insufficient to fill all pages, initialize the remaining memory area to a preset null value. Sub-step S33: Calculate the page to which the latest record belongs and its offset within the page based on the position information of the latest record; Sub-step S34: Construct a linked list of nodes on a page-by-page basis. Each node contains one page of data and pointers to the nodes before and after it. Sub-step S35: Link the nodes according to the time order to form a doubly linked list structure; Step S4: Receive real-time information sent by external devices in real time, and use a filtering algorithm to determine the stability of the real-time information. If it is confirmed to be valid information, insert it into the hybrid doubly linked list in chronological order and update it synchronously to the non-volatile memory. The filtering algorithm in step S4 includes: Set the trust level for the current information; Compare the current information with the previous information for consistency; If they match, the trust level is increased; if they do not match, the trust level is decreased. When the trust level is lower than the preset threshold, the previous information is used as the current valid information. When the trust level reaches the confirmation threshold, the current information is deemed valid and an insertion operation is performed. Step S5: Based on user operation or default settings, determine the current display page, locate the corresponding node from the hybrid doubly linked list, and output the data stored in the node to the display device in chronological order for paginated display; Step S6: In response to the user's page-turning command, traverse the nodes forward or backward along the hybrid doubly linked list, update the currently displayed page, and re-output the corresponding data to the display device.
2. The method for hybrid storage and paginated display of historical data according to claim 1, characterized in that, In step S4, when inserting real-time information into the hybrid doubly linked list, if the list is full, the earliest record is deleted and the new record is inserted at the end of the list.
3. The method for hybrid storage and paginated display of historical data according to claim 1, characterized in that, In step S5, when displaying the page, each record includes a timestamp and event content, and is arranged and displayed in chronological order from oldest to newest.
4. The method for hybrid storage and paginated display of historical data according to claim 1, characterized in that, The static page memory pool has 5 pages, each page stores 8 records, and the total capacity is 40 records.
5. The method for hybrid storage and paginated display of historical data according to claim 1, characterized in that, The embedded device is a serial port screen, the non-volatile memory is a Flash memory, and the external device communicates with the serial port screen via a 485 bus.
6. The method for hybrid storage and paginated display of historical data according to claim 1, characterized in that, The nodes of the hybrid doubly linked list have contiguous memory addresses, supporting overall read and write operations to the Flash memory on a page-by-page basis.
7. The method for hybrid storage and paginated display of historical data according to claim 1, characterized in that, The method automatically executes steps S1 to S3 when the embedded device starts up, and continuously executes steps S4 to S6 during device operation.
8. A hybrid storage and paginated display system for historical data, characterized in that, include: A memory pool creation module is used to create a static page memory pool in the memory of an embedded device. The size of the static page memory pool is matched with the preset number of pages and the data capacity per page. The data reading module is used to read historical data from non-volatile memory; The linked list construction module is used to construct a hybrid doubly linked list when historical data exists; when no historical data exists, the head of the linked list is initialized and no further processing is performed; wherein, each node of the hybrid doubly linked list corresponds to a display page, the data stored in the node is contiguous in memory, and the nodes are linked by pointers; Constructing a hybrid doubly linked list involves the following sub-steps: Sub-step S31: Initialize the head pointer of the linked list; Sub-step S32: Load the read historical data into the static page memory pool. If the amount of data is insufficient to fill all pages, initialize the remaining memory area to a preset null value. Sub-step S33: Calculate the page to which the latest record belongs and its offset within the page based on the position information of the latest record; Sub-step S34: Construct a linked list of nodes on a page-by-page basis. Each node contains one page of data and pointers to the nodes before and after it. Sub-step S35: Link the nodes according to the time order to form a doubly linked list structure; The real-time processing module is used to receive real-time information sent by external devices, perform stability judgment on the real-time information through a filtering algorithm, and if it is confirmed to be valid information, insert it into the hybrid doubly linked list in chronological order and update it synchronously to the non-volatile memory. Filtering algorithms include: Set the trust level for the current information; Compare the current information with the previous information for consistency; If they match, the trust level is increased; if they do not match, the trust level is decreased. When the trust level is lower than the preset threshold, the previous information is used as the current valid information. When the trust level reaches the confirmation threshold, the current information is deemed valid and an insertion operation is performed. The pagination display module is used to determine the current display page based on user operation or default settings, locate the corresponding node from the hybrid doubly linked list, and output the data stored in the node to the display device in chronological order for pagination display. The page turning control module is used to respond to the user's page turning command, traverse the nodes forward or backward along the hybrid doubly linked list, update the currently displayed page, and control the pagination display module to re-output the corresponding data to the display device.
Citation Information
Patent Citations
Optimization method and device of embedded linked list container, electronic equipment and storage medium
CN120872251A
PDF document generation method and device, electronic equipment and storage medium
CN121118837A