Data management method and device based on industrial nonvolatile data hierarchical structure
Through a multi-level index management method based on the industrial nonvolatile data hierarchy, the problem of inefficient data management of single-level data is solved, and efficient and accurate management of data in industrial control system is achieved.
Patent Information
- Application Number
- CN202510512675.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-18
AI Technical Summary
Existing single-level data management methods lead to reduced efficiency and accuracy of data management in nonvolatile storage media.
Using a method based on the industrial nonvolatile data hierarchy, by generating data management tasks, reading and displaying key-value pairs of multi-level index identification, determining the target key-value pairs, and performing data operations on the visual interface, achieving efficient positioning and precise processing of industrial control system data.
It improves the efficiency and accuracy of data management of large-scale industrial control systems in nonvolatile storage media, ensuring accurate search and processing of data operations.
Smart Images

Figure CN120336328A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data management, and particularly to a data management method and device based on an industrial non-volatile data hierarchy. Background Art
[0002] In the technical field of data management, it involves managing a large amount of data in an industrial control system through a non-volatile storage medium.
[0003] In related data management methods, a single-level data management form is used to store or read a large amount of data. However, this method reduces the efficiency and accuracy of data management through a non-volatile storage medium. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a data management method, device, computer device, and computer-readable storage medium based on an industrial non-volatile data hierarchy to improve the efficiency and accuracy of data management through a non-volatile storage medium.
[0005] In a first aspect, the present application provides a data management method based on an industrial non-volatile data hierarchy, including: Generating a data management task, where the data management task represents a task corresponding to at least one of a data storage operation, a data change operation, and a data read operation; Reading each first key-value pair in a preset first storage space and displaying it on the first-layer interface of a preset display interface, and determining a target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-layer interface. The key of each first key-value pair represents a first-level index identifier, and the value of each first key-value pair represents a set of second-level index identifiers; Based on the target first key-value pair, reading each candidate second key-value pair in a preset second storage space and displaying it on the second-layer interface of the display interface, and determining a target second key-value pair corresponding to the data management task among the candidate second key-value pairs displayed on the second-layer interface. The key of each candidate second key-value pair represents a combination of the first-level index identifier of the target first key-value pair and any one of the second-level index identifiers in the corresponding set of second-level index identifiers, and the value of each candidate second key-value pair represents a data block corresponding to the corresponding second-level index identifier; Displaying the target data block of the target second key-value pair on the data interface of the display interface, and executing the data management task based on the target data block displayed on the data interface.
[0006] In a second aspect, the present application further provides a data management device based on an industrial non-volatile data hierarchy, including: A generation module for generating a data management task, where the data management task represents a task corresponding to at least one of a data storage operation, a data change operation, and a data read operation; A first indexing module for reading each first key-value pair in a preset first storage space and displaying it on the first-layer interface of a preset display interface, and determining a target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-layer interface. The key of each first key-value pair represents a first-level index identifier, and the value of each first key-value pair represents a set of second-level index identifiers; A second indexing module for, based on the target first key-value pair, reading each candidate second key-value pair in a preset second storage space and displaying it on the second-layer interface of the display interface, and determining a target second key-value pair corresponding to the data management task among the candidate second key-value pairs displayed on the second-layer interface. The key of each candidate second key-value pair represents a combination of the first-level index identifier of the target first key-value pair and any one of the second-level index identifiers in the corresponding set of second-level index identifiers, and the value of each candidate second key-value pair represents a data block corresponding to the corresponding second-level index identifier; An execution module for displaying the target data block of the target second key-value pair on a data interface in the display interface, and executing the data management task based on the target data block displayed on the data interface.
[0007] In a third aspect, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above steps are implemented.
[0008] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above steps are implemented.
[0009] The above data management method, device, computer equipment and computer-readable storage medium based on the industrial non-volatile data hierarchy first generate data management tasks representing data storage, change or read operations, thereby clarifying the types of data operations to be performed currently and providing a task basis for subsequent data processing; furthermore, determine the target first key-value pair matching the data management task among the read and displayed first key-value pairs, thereby achieving an accurate positioning of relevant data classification in the first-level index structure; furthermore, read each candidate second key-value pair based on the target first key-value pair, and determine the target second key-value pair matching the data management task among the displayed candidate second key-value pairs, thereby achieving an accurate positioning of relevant data classification in the second-level index structure; furthermore, determine the target data block on which the data management task acts based on the target second key-value pair, thereby achieving an accurate search and precise operation of a more fine-grained data operation target; based on this, under the structure system that organizes and manages the industrial control system data stored in the non-volatile storage medium according to different hierarchical relationships, combined with a visual operation interface, the efficient positioning and precise processing of data operation targets are realized, and the efficiency and accuracy of managing a large amount of industrial control system data through the non-volatile storage medium are improved. Brief Description of the Drawings
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0011] Figure 1 It is a flowchart of a data management method based on an industrial non-volatile data hierarchy in an embodiment; Figure 2 It is a flowchart of a data management method based on an industrial non-volatile data hierarchy in another embodiment; Figure 3 It is a structural block diagram of an industrial non-volatile data hierarchy in an embodiment; Figure 4 It is a structural block diagram of a data management device based on an industrial non-volatile data hierarchy in an embodiment. Detailed Embodiments
[0012] In order to make the purpose, technical solutions and advantages of the present application clearer, the following further details the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0013] In one embodiment, asFigure 1 As shown in Figure 1 , a data management method based on an industrial non-volatile data hierarchy is provided. In this embodiment, taking the application of this method to a server as an example, it can be understood that this method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S101 to S104.
[0014] Among them, the industrial non-volatile data hierarchy represents a structural system for organizing and managing industrial control system data stored in a non-volatile storage medium according to different hierarchical relationships in an industrial control system, that is, each piece of data is associated with each other through an index path, so as to form a data management structure with stability and access logic.
[0015] Among them, the industrial control system represents a comprehensive operation system composed of multiple cooperating industrial devices, which is used to achieve the goals of industrial activities such as automatic control of the production process, data collection, equipment management, and operation scheduling; industrial control system data represents the data generated, transmitted, processed, or stored by each industrial device during the operation of the industrial control system.
[0016] Step S101, generate a data management task, where the data management task represents a task corresponding to at least one of a data storage operation, a data change operation, and a data read operation.
[0017] Among them, the data management task represents a task for performing specific data operations, that is, for performing operations such as storing, changing, and reading data. The change operation includes operations such as adding, deleting, modifying, copying, and pasting.
[0018] Step S102, read each first key-value pair in a preset first storage space and display it on the first-layer interface of a preset display interface, and determine the target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-layer interface. The key of each first key-value pair represents the first-level index identifier, and the value of each first key-value pair represents the set of second-level index identifiers.
[0019] Among them, the first key-value pair represents a data item composed of a first-level index identifier as the key and the associated set of second-level index identifiers as the value; the first-level index identifier represents the first-level index that uniquely identifies a certain data classification in the index structure, and the set of second-level index identifiers represents the second-level index that identifies all data belonging to a certain data classification in the index structure, that is, the second-level index identifier; for example, in a certain first key-value pair, the key is the first-level index identifier representing "product model A", and the value is the set of all specific products under this product model A.
[0020] Among them, the first storage space represents a data storage area for storing the first key-value pairs, and the first-layer interface represents a data operation interface for presenting the first key-value pairs.
[0021] Exemplarily, according to the task identification information recorded in the data management task object, among the first key-value pairs displayed on the first-layer interface, the first key-value pair that matches the task identification information is used as the target first key-value pair. That is, the task identification information included in the data management task for indicating the selection of the data range to be processed is determined in advance, such as task objectives, identifiers of the data to be processed, storage paths of the data to be processed, etc. The task identification information of the data management task is matched one by one with the first-level index identifiers of the current displayed first key-value pairs. If the first-level index identifier of a certain first key-value pair exactly corresponds to the structured task identifier, then this first key-value pair is selected as the target first key-value pair.
[0022] Step S103: Based on the target first key-value pair, read each candidate second key-value pair in the preset second storage space and display it on the secondary-layer interface of the display interface. Determine the target second key-value pair corresponding to the data management task among the candidate second key-value pairs displayed on the secondary-layer interface. The key of each candidate second key-value pair represents a combination of the first-level index identifier of the target first key-value pair and any one of the secondary-level index identifier sets corresponding to the secondary-level index identifiers. The value of each candidate second key-value pair represents the data block corresponding to the secondary-level index identifier.
[0023] Among them, the second key-value pair represents a data item composed of a combination of a first-level index identifier and a secondary-level index identifier as the key and a data block associated with the secondary-level index identifier as the value; the key part of the second key-value pair represents the first-level index that uniquely identifies a certain data classification in the index structure, and the data block corresponding to the value part represents the second-level index that identifies all data belonging to a certain data classification in the index structure and is used to carry specific data content; for example, in a certain second key-value pair, the key is a combination of the first-level index identifier representing "specific product B corresponding to product model A" and the level index identifier, and the value is a mapping address representing the detailed information record or specific data of this specific product B.
[0024] Among them, the candidate second key-value pair represents a second key-value pair that matches the target first key-value pair, that is, the first-level index identifier in the candidate second key-value pair matches the first-level index identifier in the target first key-value pair, and the secondary-level index identifier in the candidate second key-value pair matches one of the secondary-level index identifiers in the secondary-level index identifier set in the target first key-value pair.
[0025] Among them, the second storage space represents a data storage area for storing the second key-value pairs, and the secondary-layer interface represents a data operation interface for presenting the candidate second key-value pairs.
[0026] Exemplarily, according to the task identification information recorded in the data management task object, among the various candidate second key-value pairs displayed on the sub-layer interface, the candidate second key-value pair that matches the task identification information is taken as the target second key-value pair. That is, the task identification information included in the data management task for indicating the selection of the data range to be processed is determined in advance, such as task objectives, the identification of the data to be processed, the storage path of the data to be processed, etc. The task identification information of the data management task is matched one by one with the secondary index identification of each currently displayed candidate second key-value pair. If the secondary index identification of a certain candidate second key-value pair exactly corresponds to this structured task identification, then this candidate second key-value pair is selected as the target second key-value pair.
[0027] Step S104, display the target data block of the target second key-value pair in the data interface of the display interface, and execute the data management task based on the target data block displayed in the data interface.
[0028] Among them, the target data block represents the data block corresponding to the value part in the target second key-value pair; the data interface represents a data operation interface for presenting the target data block to perform operations such as data storage, data change, and data reading corresponding to the data management task.
[0029] Exemplarily, load the target data block corresponding to the identified target second key-value pair into the data interface for display, and then perform operations such as data storage, data change, or data reading on the target data block based on the data operation type defined by the data management task; during the data operation process, the original structure of the target data block can be used as the input, and the data storage, data change, or data reading operations required for the data management task can be completed through the internal logic transformation of the target data block. Furthermore, after the data management task is completed, log information about this data operation is recorded, including operation results, data change situations, task execution times, etc., to support the data traceability function.
[0030] In the above data management method based on the industrial non-volatile data hierarchy, first, a data management task representing a data storage, change, or read operation is generated, thereby clarifying the type of data operation to be performed currently and providing a task basis for subsequent data processing; furthermore, in each of the first key-value pairs read and displayed, the target first key-value pair matching the data management task is determined, thereby achieving an accurate positioning of the relevant data classification in the first-level index structure; furthermore, based on the target first key-value pair, each candidate second key-value pair is read, and in each of the displayed candidate second key-value pairs, the target second key-value pair matching the data management task is determined, thereby achieving an accurate positioning of the relevant data classification in the second-level index structure; furthermore, based on the target second key-value pair, the target data block on which the data management task acts is determined, thereby achieving an accurate search and precise operation of a more fine-grained data operation target; based on this, under the structural system of organizing and managing the industrial control system data stored in the non-volatile storage medium according to different hierarchical relationships, combined with a visual operation interface, an efficient positioning and precise processing of the data operation target are achieved, improving the efficiency and accuracy of managing a large amount of industrial control system data through the non-volatile storage medium. In an exemplary embodiment, performing a data management task based on the target data block displayed on the data interface includes steps S201 to S203.
[0031] Step S201, in a preset cache layer, based on the data management task, receive an operation instruction from the data interface, perform corresponding processing on the target data block based on the operation instruction to obtain target data, cache the target data and send it to a preset intermediate storage layer for recording.
[0032] Among them, the cache layer represents a highly responsive storage area for temporarily storing the target data processed by the operation instruction during the data operation; the long-term storage layer represents a bottom storage area for persistently storing the target data during the data operation; the intermediate storage layer represents an intermediate storage area between the cache layer and the long-term storage layer, that is, for recording the target data from the cache layer and sending the target data to the long-term storage layer during the data operation.
[0033] Among them, the operation instruction represents a specific operation request input by the data interface, used to trigger data operations such as adding, deleting, and modifying the target data block.
[0034] Among them, the target data represents the data operation result obtained by processing the target data block based on the operation instruction, and can also represent log information such as the data operation type and operation time for recording this data operation.
[0035] Exemplarily, after receiving an operation instruction, corresponding data processing logic will be executed on the target data block displayed on the data interface. For example, if the operation instruction requires modifying the value of the target data block, the corresponding field in the target data block will be value-replaced or structure-changed, and the data operation result after the change will be marked as the target data; this target data is not immediately written to the underlying storage, but is preferentially written to the cache layer, that is, the cache layer is used to temporarily store the instantaneously obtained data operation results, thereby avoiding the overhead and latency caused by frequent access to the underlying storage; after caching the target data, the target data is sent to the intermediate storage layer for subsequent more stable data recording and transfer processes.
[0036] Step S202, in the intermediate storage layer, record the target data from the cache layer, and send the target data to the preset long-term storage layer for storage according to the preset sending frequency.
[0037] Exemplarily, when the target data is transferred from the cache layer to the intermediate storage layer, first, a data reception queue is established inside the intermediate storage layer, and the timestamp and identification field attached to each target data are recorded, thereby forming structured data record entries; these data record entries are not immediately written to the long-term storage layer, but are temporarily stored in the intermediate storage layer, and then, according to the preset sending frequency, the target data received within the specified time period in the data record entries is periodically packed and sent to the long-term storage layer. Furthermore, the setting of the sending frequency is usually based on a comprehensive consideration of storage performance, system load, and data real-time requirements, ensuring that neither frequent writing affects storage efficiency nor data backlog or loss occurs due to too long an interval.
[0038] Step S203, in the long-term storage layer, store the target data from the intermediate storage layer, and send a synchronization instruction to the intermediate storage layer according to the preset synchronization frequency. Based on the response of the intermediate storage layer to the synchronization instruction, update the stored target data to obtain the updated target data.
[0039] Among them, the synchronization instruction represents a periodic data status request command sent by the long-term storage layer to the intermediate storage layer, which is used to trigger the intermediate storage layer to check the existing data status and return the updated content.
[0040] Exemplarily, after the target data is passed from the intermediate storage layer to the long-term storage layer, the target data is written to the long-term storage layer to achieve persistent storage. Among them, the target data from different sources can be classified according to the identification field, which is convenient for future retrieval and analysis. Furthermore, according to the preset synchronization frequency, the long-term storage layer sends a synchronization instruction to the intermediate storage layer, and this synchronization instruction is used to request the intermediate storage layer to feedback whether there is new data update information or supplementary data to be back-transmitted since the last synchronization.
[0041] Furthermore, after the intermediate storage layer receives the synchronization instruction, if it detects that a certain target data has been updated, it will re-transmit the corresponding updated data to the long-term storage layer. At this time, the long-term storage layer performs operations such as replacement or expansion on the existing data according to the received updated data, so as to use the data operation result as the updated target data. Furthermore, the setting of the synchronization frequency is usually based on a comprehensive consideration of storage performance, system load, and data real-time requirements, ensuring that it will neither affect the storage efficiency due to frequent writing nor cause too large a deviation in data versions due to too long an interval.
[0042] In this embodiment, first, the fast cache layer instantaneously caches the target data obtained by processing the target data block and sends it to the intermediate storage layer for recording, so as to achieve a fast response and temporary storage of the data operation result; furthermore, the intermediate storage layer transmits the recorded target data to the long-term storage layer according to a preset transmission frequency, so as to achieve balanced control of data batch management and storage pressure; furthermore, the long-term storage layer interacts with the intermediate storage layer through a synchronization instruction to achieve data update, so as to ensure the timeliness and consistency of the finally stored data; based on this, efficient caching, stable forwarding, and dynamic synchronization during the process from data generation to persistent storage are realized, which is beneficial to improving data processing efficiency and ensuring data accuracy and integrity.
[0043] In an exemplary embodiment, reading each first key-value pair in a preset first storage space and displaying it on the first-layer interface of a preset display interface includes steps S301 to S304.
[0044] Step S301, read each first key-value pair organized in a preset first-layer structure linked list in the first storage space, and based on the preset structure naming rule, identify the key structure and value structure of each first key-value pair in the first-layer structure linked list.
[0045] Among them, the first-layer structure linked list represents a data structure form used to organize multiple first key-value pairs in the first storage space. It is a linked structure formed by sequentially connecting multiple structure nodes through pointers or link relationships, and is used to achieve ordered traversal and access of the first key-value pairs; for example, each structure node contains a key structure and a value structure, and multiple structure nodes are sequentially connected to form the first-layer structure linked list.
[0046] Among them, the structure naming rule represents a preset specification used to define the field names, positions, and data types inside each structure node in the first-layer structure linked list, and is used to guide the accurate identification of the boundaries and contents of the key structure and value structure when reading each structure node.
[0047] Exemplarily, according to the pre-set structure naming rules, each structure node in the first-layer structure linked list is parsed. That is, the structure naming rules clarify the positions, formats, and recognition methods of the key structure and value structure in the first key-value pair within the structure node. Therefore, when reading each structure node, it is possible to accurately distinguish the structures to which the keys and values in each structure node belong respectively, and extract the corresponding data content therein. Moreover, since the first-layer structure linked list has a clear forward and backward pointing relationship, all the first key-value pairs can be sequentially accessed based on each structure node, ensuring the integrity of the data and the controllability of the traversal during the reading process.
[0048] Step S302: Based on the matching relationship between the key structures of each first key-value pair and each first-level index identifier, identify the first-level index identifier corresponding to the key structure of each first key-value pair.
[0049] Exemplarily, based on the pre-defined relationship rules between the key structure and the first-level index identifier, the matching relationship between the key structure and the first-level index identifier can be determined. That is, the relationship rules define the corresponding logic between specific fields or contents in the key structure and the first-level index identifier. For example, a certain section of naming or coding information in the key structure is preset to be mapped to a certain index meaning in the index structure. Based on the above relationship rules, each key structure is matched one by one, and finally the index meaning represented by each key structure is determined. Then, an association binding relationship is established between each key structure and the first-level index identifier corresponding to the corresponding index meaning.
[0050] Step S303: Based on the pre-set value naming rules of the first key-value pair, identify each field in the value structure of each first key-value pair. Based on the matching relationship between each field in the value structure of each first key-value pair and each second-level index identifier, determine the set of second-level index identifiers corresponding to the value structure of each first key-value pair.
[0051] Among them, the value naming rules of the first key-value pair represent the field naming method used to stipulate the inside of the value structure of the first key-value pair, and are used to guide the extraction of the field content that can represent the second-level index identifier when identifying the value structure.
[0052] Exemplarily, first, based on the value naming rule of the first key-value pair, identify the positions, formats, and meanings of each field in the value structure of the first key-value pair, and parse each field from the structure node to form multiple information units with semantics. Furthermore, based on the relationship rule between the predefined information unit and the sub-level index identifier, determine the matching relationship between each field of the value structure and the sub-level index identifier. That is, this relationship rule defines the corresponding logic between each field of the value structure and the sub-level index identifier. For example, a certain segment of naming or coding information in the value structure is preset to be mapped to a certain index meaning in the index structure. Based on the above relationship rule, perform matching processing on each field of the value structure one by one, finally determine the index meaning represented by each field of the value structure, and then establish an associated binding relationship between each field of the value structure and the sub-level index identifier corresponding to the corresponding index meaning, that is, establish an associated binding relationship between the value structure and the set of sub-level index identifiers corresponding to all corresponding index meanings.
[0053] Optionally, the key-value structure of the first key-value pair can be represented in the data storage form of a BLOB block (Binary Large Object, large-capacity binary data block); splice multiple sub-level index identifiers of the uint8_t data type to obtain the set of hierarchical index identifiers in the BLOB block, and each sub-level index identifier is separated by a preset character (such as 0) in the BLOB block.
[0054] Step S304, based on the top-level index identifier and the set of sub-level index identifiers corresponding to each first key-value pair, display each first key-value pair on the first-level interface of the display interface.
[0055] Exemplarily, in each first key-value pair, based on the associated binding relationship established between the key structure and the top-level index identifier corresponding to the corresponding index meaning, and combined with the associated binding relationship established between the value structure and the set of sub-level index identifiers corresponding to all corresponding index meanings, in the first-level interface, use the top-level index identifiers associated with the key structures of each first key-value pair as the main classification labels and display them in sequence, and respectively display the set of sub-level index identifiers associated with the corresponding value structures under each main classification label.
[0056] In this embodiment, first, the key structure and value structure of each first key-value pair organized in the first-level structure linked list are identified, so as to realize the structured parsing of key-value data; furthermore, according to the matching relationship between the key structure and the first-level index identifier, the first-level index identifier associated with the key structure is identified, and according to the matching relationship between the value structure field and the secondary-level index identifier, the set of secondary-level index identifiers associated with the value structure is identified, so as to realize the accurate identification of multi-level index data in the index structure; furthermore, based on the identified multi-level index data, each first key-value pair is displayed, so as to ensure the orderly presentation of multi-level index data on the first-level interface; based on this, the efficient conversion from structured storage to visual display is realized, and the parsing accuracy of multi-level index data and the operability of interface display are enhanced.
[0057] In an exemplary embodiment, based on a preset structure naming rule, the key structure and value structure of each first key-value pair are identified in the first-level structure linked list, including step S401; based on the target first key-value pair, each candidate second key-value pair in a preset second storage space is read and displayed on the secondary interface of the display interface, including step S402.
[0058] Step S401, based on the structure naming rule, in the header information and body information of each structure node in the first-level structure linked list, determine the header identifier, key structure, and value structure corresponding to each first key-value pair respectively.
[0059] Among them, the header information of the structure node represents the data part located at the starting position in the structure node; the header identifier represents the field value extracted from the header information with uniqueness or classification characteristics.
[0060] Among them, the body information of the structure node represents the main data part in the structure node except the header information, which is used to store the core content of the first key-value pair, that is, the key structure and the value structure.
[0061] Exemplarily, in the structure naming rule, it is determined that each structure node in the first-level structure linked list includes header information containing a header identifier and body information containing a key structure and a value structure, and the arrangement order, field name, and recognition method of the header information, key structure, and value structure in the structure node are clearly specified. Based on this, the structure data in each structure node is read field by field according to the structure naming rule, and the structure data in each structure node is disassembled into three parts with different logical meanings, that is, the header identifier, key structure, and value structure corresponding to each first key-value pair respectively.
[0062] Step S402: Based on the target header identifier of the target first key-value pair, among all the second key-value pairs in the second storage space, the second key-value pairs that match the target header identifier are used as candidate second key-value pairs and are displayed on the secondary interface of the display interface.
[0063] Among them, the target header identifier represents a field value with uniqueness or classification characteristics extracted from the header information of the structure node to which the target first key-value pair belongs.
[0064] Exemplarily, a large number of second key-value pairs are stored in the second storage space. Each second key-value pair includes a key structure composed of a primary-level index identifier and a secondary-level index identifier, and a value structure composed of data blocks. Due to the large quantity and complex structure, in order to improve the matching efficiency, a precise screening criterion needs to be set, that is, the header identifier of the target first key-value pair is used as the screening criterion. By traversing all the second key-value pairs in the second storage space, the second key-value pairs containing the target header identifier are screened as candidate second key-value pairs.
[0065] In this embodiment, first, based on the structure naming rules, the header information and body information of each structure node in the primary structure linked list are identified, so as to accurately parse and distinguish the header identifier, key structure, and value structure in the first key-value pair. Furthermore, candidate second key-value pairs are obtained by matching according to the target header identifier of the target first key-value pair among all the second key-value pairs in the second storage space, so as to achieve precise screening of candidate data. Based on this, efficient extraction and matching of structured data between multiple layers of storage can be realized, and the parsing accuracy and operation efficiency of the indexing process are improved.
[0066] In an exemplary embodiment, based on the target first key-value pair, reading each candidate second key-value pair in the preset second storage space and displaying it on the secondary interface of the display interface includes steps S501 to S504.
[0067] Step S501: Read each candidate second key-value pair organized in the preset secondary structure linked list in the second storage space. Based on the preset structure naming rules, identify the key structure and value structure of each candidate second key-value pair in the secondary structure linked list.
[0068] Among them, the secondary structure linked list represents a data structure form used to organize multiple candidate second key-value pairs in the second storage space. It is a linked structure formed by sequentially connecting multiple structure nodes through pointers or link relationships, and is used to realize ordered traversal and access of candidate second key-value pairs. For example, each structure node includes a key structure and a value structure, and multiple structure nodes are sequentially connected to form the secondary structure linked list.
[0069] Among them, the structure naming rule represents a preset specification for defining the field names, positions, and data types inside each structure node in the sub-layer structure linked list, and is used to guide the accurate identification of the boundaries and contents of the key structure and value structure when reading each structure node.
[0070] Exemplarily, according to the preset structure naming rule, each structure node in the sub-layer structure linked list is parsed. That is, the structure naming rule clarifies the positions, formats, and recognition methods of the key structure and value structure in the candidate second key-value pair within the structure node. Therefore, when reading each structure node, it is possible to accurately distinguish the structures to which the keys and values in each structure node belong respectively, and extract the corresponding data contents therein. Furthermore, since the sub-layer structure linked list has a clear forward and backward pointing relationship, all candidate second key-value pairs can be accessed sequentially based on each structure node, ensuring the integrity of the data and the controllability of the traversal during the reading process.
[0071] Step S502: In the set of the top-level index identifier and sub-level index identifiers corresponding to the target first key-value pair, based on the matching relationship between the key structure of each candidate second key-value pair and each sub-level index identifier in the corresponding sub-level index identifier set, identify the top-level index identifier and sub-level index identifier corresponding to the key structure of each candidate second key-value pair.
[0072] Exemplarily, based on the predefined relationship rule between the key structure and the sub-level index identifier, the matching relationship between the key structure and each sub-level index identifier in the corresponding sub-level index identifier set can be determined. That is, the relationship rule defines the corresponding logic between specific fields or contents in the key structure and the sub-level index identifier. For example, a certain segment of naming or coding information in the key structure is preset to be mapped to a certain index meaning in the index structure. Based on the above relationship rule, each key structure is matched one by one, and finally the index meaning represented by each key structure is determined. Then, an associated binding relationship is established between each key structure, the corresponding top-level index identifier, and the sub-level index identifier corresponding to the corresponding index meaning.
[0073] Step S503: Based on the preset value naming rule of the second key-value pair, identify each sub-data in the data block corresponding to the value structure of each candidate second key-value pair.
[0074] Step S504: Based on the top-level index identifier, sub-level index identifier, and each sub-data in the data block corresponding to each candidate second key-value pair, display each candidate second key-value pair on the sub-layer interface of the display interface.
[0075] Among them, the value naming rule of the second key-value pair represents the way of naming the fields inside the value structure of the second key-value pair, and is used to guide the extraction of the field contents that can represent each sub-data of the data block when identifying the value structure.
[0076] Exemplarily, first, based on the value naming rule of the second key-value pair, identify the positions, formats, and meanings of the fields in the value structure of the candidate second key-value pair, and parse each field from the structure node to form multiple information units with semantics, that is, the field contents of each sub-data of the data block.
[0077] Exemplarily, in each candidate second value pair, based on the association and binding relationship established between the key structure and the corresponding first-level index identifier and the second-level index identifier corresponding to the corresponding index meaning, and combined with multiple information units with semantics parsed from the value structure of the structure node, in the secondary interface, the combination of the first-level index identifier and the second-level index identifier associated with the key structure of each candidate second key-value pair is used as the main classification label and displayed in sequence, and each sub-data of the data block associated with the corresponding value structure is additionally displayed under each main classification label.
[0078] Optionally, the key-value structure of the second key-value pair can be represented in the data storage form of a BLOB block (Binary Large Object, large-capacity binary data block), and the data block of the uint32_t data type is used as the value structure.
[0079] In this embodiment, first, identify the key structure and the value structure of each candidate second key-value pair organized in the secondary structure linked list, so as to realize the structured parsing of the key-value data; furthermore, identify the second-level index identifier associated with the key structure according to the matching relationship between the key structure and the second-level index identifier, and identify each sub-data of the data block associated with the value structure according to the value structure field, so as to realize the accurate identification of the multi-level index data in the index structure; furthermore, display each candidate second key-value pair based on the identified multi-level index data, so as to ensure the orderly presentation of the multi-level index data in the secondary interface; based on this, an efficient conversion from structured storage to visual display is realized, enhancing the parsing accuracy of the multi-level index data and the operability of the interface display.
[0080] In an exemplary embodiment, the method further includes steps S601 to S603.
[0081] Step S601, construct an initial non-volatile storage database based on a preset non-volatile storage medium, and generate a first logical page and a second logical page corresponding to different physical sectors in the non-volatile storage database based on different physical sectors in the non-volatile storage medium.
[0082] Among them, the non-volatile storage database represents a data storage system constructed based on a non-volatile storage medium, which is used to keep the data complete and support structured access to the data after power-off or system restart.
[0083] Wherein, the physical sector represents a physical storage unit formed by partitioning the non-volatile storage medium according to the underlying storage; the first logical page represents a logical access unit for mapping the physical sector and dedicated to storing the first key-value pair; the second logical page represents a logical access unit for mapping the physical sector and dedicated to storing the second key-value pair.
[0084] Exemplarily, the non-volatile storage medium is usually composed of multiple independent physical sectors at the physical level, and each physical sector has a fixed capacity and independent addressing ability. Therefore, during the process of constructing the non-volatile storage database, it is necessary to scan and identify all the physical sectors in the non-volatile storage medium, and based on the physical positions and numbers of each physical sector, establish corresponding logical representation forms for each physical sector in the non-volatile storage database, namely the first logical page and the second logical page.
[0085] Furthermore, the setting of the logical page is a way to abstract the physical structure into a logical access unit, enabling data storage and access operations to be separated from the limitations of the underlying physical structure, thereby simplifying the data management process; different physical sectors correspond to two logical pages with different uses. Among them, the first logical page is used to store the first key-value pair subsequently, and the second logical page is used to store the second key-value pair subsequently. Based on this, through this mapping of the physical and logical structures, a one-to-one correspondence relationship is established between the logical page and the physical address.
[0086] Step S602: Take each first key-value pair as each entry in the first logical page to obtain a first storage space storing each first key-value pair.
[0087] Exemplarily, take each first key-value pair as a complete logical entry and write it into the corresponding record position in the first logical page, that is, take each key-value pair structure as a record and encapsulate it into an entry unit to ensure the integrity and resolvability of the key-value pair structure of each record in the first logical page. Furthermore, the entry writing order of the first logical page can be managed according to the index order, insertion order, or other logical partitioning strategies to improve the retrieval efficiency or optimize the storage space distribution. After the entry writing is completed, the first logical page carrying all the first key-value pairs constitutes the first storage space in the non-volatile storage medium.
[0088] Step S603: Take each second key-value pair as each entry in the second logical page to obtain a second storage space storing each second key-value pair. The key of each second key-value pair represents a combination of any first-level index identifier and any second-level index identifier, and the value of each second key-value pair represents the data block corresponding to the corresponding second-level index identifier.
[0089] Exemplarily, each second key-value pair is taken as a complete logical entry and written into the corresponding record position in the second logical page, that is, each key-value pair structure is taken as a record and encapsulated into an entry unit to ensure the integrity and parsability of the key-value pair structure of each record in the second logical page. Furthermore, the entry writing order of the second logical page can be managed according to the index order, insertion order or other logical partitioning strategies to improve the retrieval efficiency or optimize the storage space distribution. After the entry writing is completed, the second logical page carrying all the second key-value pairs constitutes the second storage space in the non-volatile storage medium.
[0090] In this embodiment, first, a non-volatile storage database is constructed based on the non-volatile storage medium, and different logical pages are generated according to physical sectors, so as to realize physical isolation and logical hierarchical management of the storage space; furthermore, each first key-value pair is taken as an entry of the first logical page, and each second key-value pair is taken as an entry of the second logical page, so as to realize the structuring and ordered persistent storage of multi-level index data; based on this, hierarchical logical modeling and entry-based writing for the non-volatile storage medium can be realized, improving the structural clarity of data access and the stability of storage operations, and enabling the non-volatile storage database to have the addressing ability at the entry level.
[0091] In an exemplary embodiment, the display interface is a graphical user interface designed based on a preset lightweight graphics library; determining a target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-layer interface, including step S701; determining a target second key-value pair corresponding to the data management task among the candidate second key-value pairs displayed on the second-layer interface, including step S702; performing the data management task based on the target data block displayed on the data interface, including step S703.
[0092] Among them, the lightweight graphics library represents a set of graphics rendering and interface construction components with low resource occupancy and high operating efficiency, and is used to implement the loading and interaction of the basic graphical user interface in an embedded system or a resource-constrained environment.
[0093] Among them, the graphical user interface designed based on the lightweight graphics library represents a user interaction interface constructed using the lightweight graphics library, and is used to display data information and receive user operation inputs.
[0094] Step S701: Receive a first selection instruction input through a function control on the first-layer interface, and take the first key-value pair that matches the first selection instruction among the first key-value pairs displayed on the first-layer interface as the target first key-value pair.
[0095] Step S702: Receive a second selection instruction input through a function control on the secondary layer interface, and use the candidate second key-value pair that matches the second selection instruction among the candidate second key-value pairs displayed on the secondary layer interface as the target second key-value pair.
[0096] Among them, a function control refers to an interface component in the display interface for receiving operation inputs or triggering interface responses, such as interface elements like buttons, list items, radio boxes, etc.
[0097] Among them, the first selection instruction refers to a selection command input through a function control on the primary layer interface, used to select an item in the currently displayed first key-value pair.
[0098] Among them, the second selection instruction refers to a selection command input through a function control on the secondary layer interface, used to select an item in the currently displayed candidate second key-value pair.
[0099] Exemplarily, all first key-value pairs are loaded on the primary layer interface. Through the interaction operation between the user and the function control on the primary layer interface, receive the first selection instruction input based on the primary layer interface, so as to select a specific first key-value pair in the primary layer interface according to the first selection instruction, and set the selected first key-value pair as the target first key-value pair.
[0100] Exemplarily, all candidate second key-value pairs are loaded on the secondary layer interface. Through the interaction operation between the user and the function control on the secondary layer interface, receive the second selection instruction input based on the secondary layer interface, so as to select a specific candidate second key-value pair in the secondary layer interface according to the second selection instruction, and set the selected candidate second key-value pair as the target second key-value pair.
[0101] Step S703: Receive an operation instruction input through a function control on the data interface, perform a data operation corresponding to the data management task on the target data block based on the operation instruction, and display a prompt pop-up window corresponding to the task processing status on the data interface according to the task processing status in response to the data operation.
[0102] Among them, the operation instruction refers to a specific operation request input from the data interface, used to trigger data operations such as adding, deleting, and modifying the target data block.
[0103] Among them, the task processing status refers to the task processing status information generated during the execution of the operation instruction, used to reflect whether the execution of the data management task is successful. For example, prompt contents such as "modification successful", "deletion failed", "insufficient permissions", "access exception", "insufficient storage space", etc. are the manifestation forms of the task processing status.
[0104] Among them, the prompt pop-up window refers to an interface element that pops up in the data interface to display the task processing status, so as to feedback the data operation result to the user. For example, the "operation successful" prompt window that pops up after the data writing is completed in the data interface.
[0105] Exemplarily, a data block of the target second key-value pair is loaded on the data interface. Through the interaction operation between the user and the function control on the data interface, a first selection instruction input based on the data interface is received. This operation instruction clearly specifies the data operation type to be performed on the target data block currently, including writing, modifying, deleting, or reading, etc. Furthermore, after receiving this operation instruction, a corresponding data processing process will be triggered, that is, according to the data block structure and the data operation type, the data content is read and extracted or structurally updated, and the task processing status generated during or after the data processing process is monitored in real time, including whether the data operation is successful, whether there is data exception or permission restriction, etc. Furthermore, the monitored task processing status is presented through the prompt pop-up window in the data interface. The content of this prompt pop-up window is prompt and feedback, and its purpose is to inform the user whether the current operation is executed successfully or whether subsequent supplementary operations are required, so as to improve the clarity and closed-loop nature of task interaction.
[0106] In this embodiment, first, a first selection instruction is received through the function control on the first layer interface, and the target first key-value pair is selected based on the first selection instruction. Furthermore, a second selection instruction is received through the function control on the second layer interface, and the target second key-value pair is selected based on the second selection instruction. Furthermore, an operation instruction is received through the function control on the data interface, and a pop-up window prompt is generated based on the task processing status in response to the operation instruction. Based on this, a complete interaction of multi-level data positioning and operation process driven by multiple interfaces can be realized, improving the accuracy of data processing and the visual experience of system response.
[0107] In an exemplary embodiment, as Figure 2 shown, the method further includes steps S801 to S806.
[0108] Step S801, read each first key-value pair organized in the form of a first layer structure linked list in the first storage space, and display each first key-value pair on the first layer interface.
[0109] Step S802, receive the first selection instruction input through the function control on the first layer interface, and use the first key-value pair matching the first selection instruction as the target first key-value pair.
[0110] Step S803, based on the target first key-value pair, read each candidate second key-value pair organized in the form of a second layer structure linked list in the second storage space, and display each candidate second key-value pair on the second layer interface.
[0111] Step S804: Receive a second selection instruction input through a function control on the secondary layer interface, and use the candidate second key-value pair that matches the second selection instruction as the target second key-value pair.
[0112] Step S805: Display the target data block corresponding to the value structure of the target second key-value pair on the data interface.
[0113] Step S806: Receive an operation instruction input through a function control on the data interface, and perform a data operation on the target data block based on the operation instruction.
[0114] In an exemplary embodiment, Figure 3 there is shown an industrial non-volatile data hierarchy that includes a first storage space and a second storage space.
[0115] The first storage space is used to store a plurality of first key-value pairs. The key of the first key-value pair represents a first-level index identifier, and the value represents a set of second-level index identifiers. For example, in Figure 3 a first key-value pair shown in, the key represents the first-level index identifier A, and the value represents a set of second-level index identifiers composed of second-level index identifier A, second-level index identifier B, second-level index identifier C, etc.
[0116] The second storage space is used to store a plurality of second key-value pairs. The key of the second key-value pair represents a combination of a first-level index identifier and a second-level index identifier, and the value represents a data block corresponding to the second-level index identifier. For example, in Figure 3 a second key-value pair shown in, the key represents the combination of first-level index identifier A and second-level index identifier A, and the value represents a data block composed of member data A, member data B, etc. Another example is that in another second key-value pair, the key represents the combination of first-level index identifier A and second-level index identifier C, and the value represents a data block composed of member data C, member data D, etc.
[0117] In the first storage space, each first key-value pair is organized in a preset first-level structure linked list, and different header identifiers are respectively inserted into the header information of each structure node in the first-level structure linked list. In the second storage space, each second key-value pair is organized in a preset second-level structure linked list, and different header identifiers are respectively inserted into the header information of each structure node in the second-level structure linked list. Thus, based on the target header identifier of the target first key-value pair, among the second key-value pairs in the second storage space, the second key-value pair that matches the target header identifier is used as the candidate second key-value pair.
[0118] In the value structure of each first key-value pair, each second-level index identifier is concatenated to obtain a corresponding set of second-level index identifiers, and each second-level index identifier in the set of second-level index identifiers is separated by the character 0.
[0119] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this document, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential either, but can be executed alternately or in turns with at least a part of other steps or steps or stages in other steps.
[0120] Based on the same inventive concept, the embodiments of the present application also provide a data management device based on an industrial non-volatile data hierarchy for implementing the data management method based on the industrial non-volatile data hierarchy described above. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the data management device based on the industrial non-volatile data hierarchy provided below can refer to the limitations on the data management method based on the industrial non-volatile data hierarchy in the foregoing, and will not be repeated here.
[0121] In an exemplary embodiment, as Figure 4 shown, a data management device based on an industrial non-volatile data hierarchy is provided, including: a generation module 401, a first indexing module 402, a second indexing module 403, and an execution module 404, wherein: The generation module 401 is configured to generate a data management task, and the data management task represents a task corresponding to at least one of a data storage operation, a data change operation, and a data read operation; The first indexing module 402 is configured to read each first key-value pair in a preset first storage space and display it on the first-layer interface of a preset display interface, and determine a target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-layer interface. The key of each first key-value pair represents a first-level index identifier, and the value of each first key-value pair represents a set of second-level index identifiers; The second index module 403 is configured to read each candidate second key-value pair in a preset second storage space based on a target first key-value pair and display them on a secondary interface of the display interface, and determine a target second key-value pair corresponding to a data management task from the candidate second key-value pairs displayed on the secondary interface. The key of each candidate second key-value pair represents a combination of a first-level index identifier of the target first key-value pair and any one of the corresponding secondary-level index identifier sets, and the value of each candidate second key-value pair represents a data block corresponding to the corresponding secondary-level index identifier. The execution module 404 is configured to display the target data block of the target second key-value pair on a data interface in the display interface, and execute a data management task based on the target data block displayed on the data interface.
[0122] In an exemplary embodiment, the execution module 404 is further configured to: in a preset cache layer, receive an operation instruction from the data interface based on the data management task, perform corresponding processing on the target data block according to the operation instruction to obtain target data, cache the target data and send it to a preset intermediate storage layer for recording; in the intermediate storage layer, record the target data from the cache layer, and send the target data to a preset long-term storage layer for storage according to a preset sending frequency; in the long-term storage layer, store the target data from the intermediate storage layer, and send a synchronization instruction to the intermediate storage layer according to a preset synchronization frequency, and update the stored target data to obtain updated target data based on the response of the intermediate storage layer to the synchronization instruction.
[0123] In an exemplary embodiment, the first index module 402 is further configured to: read each first key-value pair organized in a preset first-level structure linked list in the first storage space, and identify the key structure and value structure of each first key-value pair in the first-level structure linked list based on a preset structure naming rule; identify the first-level index identifier corresponding to the key structure of each first key-value pair based on the matching relationship between the key structure of each first key-value pair and each first-level index identifier; identify each field in the value structure of each first key-value pair based on a preset value naming rule of the first key-value pair, and determine the set of secondary-level index identifiers corresponding to the value structure of each first key-value pair based on the matching relationship between each field in the value structure of each first key-value pair and each secondary-level index identifier; display each first key-value pair on the first-level interface of the display interface based on the first-level index identifier and the set of secondary-level index identifiers corresponding to each first key-value pair.
[0124] In an exemplary embodiment, the first indexing module 402 is further configured to: based on the structure naming rule, determine the header identifier, key structure, and value structure corresponding to each first key-value pair in the header information and body information of each structure node in the first-level structure linked list; the second indexing module 403 is further configured to: based on the target header identifier of the target first key-value pair, in each second key-value pair in the second storage space, use the second key-value pair that matches the target header identifier as a candidate second key-value pair and display it on the secondary interface of the display interface.
[0125] In an exemplary embodiment, the second indexing module 403 is further configured to: read each candidate second key-value pair organized in a preset secondary-level structure linked list in the second storage space, and based on the preset structure naming rule, identify the key structure and value structure of each candidate second key-value pair in the secondary-level structure linked list; in the first-level index identifier and secondary-level index identifier set corresponding to the target first key-value pair, based on the matching relationship between the key structure of each candidate second key-value pair and each secondary-level index identifier in the corresponding secondary-level index identifier set, identify the first-level index identifier and secondary-level index identifier corresponding to the key structure of each candidate second key-value pair; based on the preset value naming rule of the second key-value pair, identify each sub-data in the data block corresponding to the value structure of each candidate second key-value pair; based on the first-level index identifier, secondary-level index identifier, and each sub-data in the data block corresponding to each candidate second key-value pair, display each candidate second key-value pair on the secondary interface of the display interface.
[0126] In an exemplary embodiment, the device further includes a partitioning module, and the partitioning module is configured to: build an initial non-volatile storage database based on a preset non-volatile storage medium, and based on different physical sectors in the non-volatile storage medium, generate a first logical page and a second logical page corresponding to each different physical sector in the non-volatile storage database; use each first key-value pair as each entry in the first logical page to obtain a first storage space storing each first key-value pair; use each second key-value pair as each entry in the second logical page to obtain a second storage space storing each second key-value pair, where the key of each second key-value pair represents a combination of any first-level index identifier and any secondary-level index identifier, and the value of each second key-value pair represents the data block corresponding to the corresponding secondary-level index identifier.
[0127] In an exemplary embodiment, the first indexing module 402 is further configured to: receive a first selection instruction input through a function control on the first-level interface, and use the first key-value pair matching the first selection instruction among the first key-value pairs displayed on the first-level interface as the target first key-value pair; the second indexing module 403 is further configured to: receive a second selection instruction input through a function control on the second-level interface, and use the candidate second key-value pair matching the second selection instruction among the candidate second key-value pairs displayed on the second-level interface as the target second key-value pair; the execution module 404 is further configured to: receive an operation instruction input through a function control on the data interface, perform a data operation corresponding to a data management task on the target data block based on the operation instruction, and display a prompt pop-up window corresponding to the task processing status on the data interface according to the task processing status in response to the data operation.
[0128] Each module in the above data management device based on the industrial non-volatile data hierarchy can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or be stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0129] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in any of the above embodiments are implemented.
[0130] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in any of the above embodiments are implemented.
[0131] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0132] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, 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, it should be considered as the scope recorded in this specification.
[0133] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A data management method based on an industrial non-volatile data hierarchy, characterized in that, The method includes: generating a data management task, where the data management task represents a task corresponding to at least one of a data storage operation, a data change operation, and a data read operation; reading each first key-value pair in a preset first storage space and displaying it on the first-layer interface of a preset display interface, and determining a target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-layer interface, where the key of each first key-value pair represents a first-level index identifier, and the value of each first key-value pair represents a set of second-level index identifiers; based on the target first key-value pair, reading each candidate second key-value pair in a preset second storage space and displaying it on the second-layer interface of the display interface, and determining a target second key-value pair corresponding to the data management task among the candidate second key-value pairs displayed on the second-layer interface, where the key of each candidate second key-value pair represents a combination of the first-level index identifier of the target first key-value pair and any second-level index identifier in the corresponding set of second-level index identifiers, and the value of each candidate second key-value pair represents a data block corresponding to the corresponding second-level index identifier; displaying the target data block of the target second key-value pair on the data interface of the display interface, and executing the data management task based on the target data block displayed on the data interface.
2. The method according to claim 1, characterized in that, The executing the data management task based on the target data block displayed on the data interface includes: in a preset cache layer, based on the data management task, receiving an operation instruction from the data interface, performing corresponding processing on the target data block based on the operation instruction to obtain target data, caching the target data and sending it to a preset intermediate storage layer for recording; in the intermediate storage layer, recording the target data from the cache layer, and sending the target data to a preset long-term storage layer for storage at a preset sending frequency; in the long-term storage layer, storing the target data from the intermediate storage layer, and sending a synchronization instruction to the intermediate storage layer at a preset synchronization frequency, and updating the stored target data based on the response of the intermediate storage layer to the synchronization instruction to obtain updated target data.
3. The method according to claim 1, wherein The reading each first key-value pair in a preset first storage space and displaying it on the first-layer interface of a preset display interface includes: reading each first key-value pair organized in a preset first-layer structure linked list in the first storage space, and identifying the key structure and value structure of each first key-value pair in the first-layer structure linked list based on a preset structure naming rule; identifying the first-level index identifier corresponding to the key structure of each first key-value pair based on the matching relationship between the key structure of each first key-value pair and each first-level index identifier; identifying each field in the value structure of each first key-value pair based on a preset value naming rule of the first key-value pair, and determining the set of second-level index identifiers corresponding to the value structure of each first key-value pair based on the matching relationship between each field in the value structure of each first key-value pair and each second-level index identifier; Based on the first-level index identifiers and the set of second-level index identifiers corresponding to each first key-value pair, display each first key-value pair on the first-level interface of the display interface.
4. The method according to claim 3, wherein The identifying the key structure and value structure of each first key-value pair in the first-level structure linked list based on a preset structure naming rule includes: Based on the structure naming rule, determine the header identifier, key structure, and value structure corresponding to each first key-value pair in the header information and body information of each structure node in the first-level structure linked list. The reading each candidate second key-value pair in a preset second storage space based on the target first key-value pair and displaying it on the second-level interface of the display interface includes: Based on the target header identifier of the target first key-value pair, among the second key-value pairs in the second storage space, use the second key-value pair that matches the target header identifier as the candidate second key-value pair and display it on the second-level interface of the display interface.
5. The method according to claim 1, wherein The reading each candidate second key-value pair in a preset second storage space based on the target first key-value pair and displaying it on the second-level interface of the display interface includes: Read each candidate second key-value pair organized in a preset second-level structure linked list in the second storage space. Based on the preset structure naming rule, identify the key structure and value structure of each candidate second key-value pair in the second-level structure linked list. In the set of first-level index identifiers and second-level index identifiers corresponding to the target first key-value pair, based on the matching relationship between the key structure of each candidate second key-value pair and each second-level index identifier in the corresponding set of second-level index identifiers, identify the first-level index identifier and second-level index identifier corresponding to the key structure of each candidate second key-value pair. Based on a preset value naming rule for the second key-value pair, identify each sub-data in the data block corresponding to the value structure of each candidate second key-value pair. Based on the first-level index identifier, second-level index identifier, and each sub-data in the data block corresponding to each candidate second key-value pair, display each candidate second key-value pair on the second-level interface of the display interface.
6. The method according to claim 1, characterized in that, The method further includes: Construct an initial non-volatile storage database based on a preset non-volatile storage medium. Based on different physical sectors in the non-volatile storage medium, generate a first logical page and a second logical page corresponding to each different physical sector in the non-volatile storage database. Use each first key-value pair as each entry in the first logical page to obtain a first storage space storing all the first key-value pairs. Use each second key-value pair as each entry in the second logical page to obtain a second storage space storing all the second key-value pairs. The key of each second key-value pair represents a combination of any first-level index identifier and any second-level index identifier, and the value of each second key-value pair represents the data block corresponding to the corresponding second-level index identifier.
7. The method according to claim 1, wherein The display interface is a graphical user interface designed based on a preset lightweight graphics library. The determining the target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-level interface includes: Receive a first selection instruction input through a function control on the first-layer interface, and use the first key-value pair that matches the first selection instruction among the first key-value pairs displayed on the first-layer interface as the target first key-value pair; Determining the target second key-value pair corresponding to the data management task among the candidate second key-value pairs displayed on the secondary layer interface includes: Receive a second selection instruction input through a function control on the secondary layer interface, and use the candidate second key-value pair that matches the second selection instruction among the candidate second key-value pairs displayed on the secondary layer interface as the target second key-value pair; Performing the data management task based on the target data block displayed on the data interface includes: Receive an operation instruction input through a function control on the data interface, perform a data operation corresponding to the data management task on the target data block based on the operation instruction, and display a prompt pop-up window corresponding to the task processing status on the data interface according to the task processing status in response to the data operation.
8. A data management device based on an industrial non-volatile data hierarchy, characterized in that The device includes: A generation module for generating a data management task, where the data management task represents a task corresponding to at least one of a data storage operation, a data change operation, and a data read operation; A first indexing module for reading each first key-value pair in a preset first storage space and displaying it on the first-layer interface of a preset display interface, determining the target first key-value pair corresponding to the data management task among the first key-value pairs displayed on the first-layer interface, where the key of each first key-value pair represents a first-level index identifier, and the value of each first key-value pair represents a set of second-level index identifiers; A second indexing module for, based on the target first key-value pair, reading each candidate second key-value pair in a preset second storage space and displaying it on the secondary layer interface of the display interface, determining the target second key-value pair corresponding to the data management task among the candidate second key-value pairs displayed on the secondary layer interface, where the key of each candidate second key-value pair represents a combination of the first-level index identifier of the target first key-value pair and any second-level index identifier in the corresponding set of second-level index identifiers, and the value of each candidate second key-value pair represents the data block corresponding to the corresponding second-level index identifier; An execution module for displaying the target data block of the target second key-value pair on the data interface in the display interface, and performing the data management task based on the target data block displayed on the data interface.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.