CN-121979893-A - Centralized storage method and device for airborne multi-relation table database
Abstract
The invention provides a centralized storage method and a centralized storage device for an onboard multi-relation table database, wherein a transaction management unit acquires transaction operation instructions and sends the transaction operation instructions to a data mirror table processing unit, the data mirror table processing unit searches whether a corresponding data relation list exists locally based on the transaction operation instructions, if so, the data mirror table processing unit acquires the data table corresponding to the data relation list locally and carries out operation indicated by the transaction operation instructions on the acquired data table, the data mirror table processing unit temporarily stores the updated data relation list and the data table locally after executing all the transaction operation instructions, and when preset conditions are met, the updated data relation list and the data table are sent to a multi-relation table storage unit to be stored and cover the original data relation list and the data table of the multi-relation table storage unit, so that the system performance and the resource utilization rate can be improved, and the data table in a disk is managed in the onboard embedded database.
Inventors
- Lu Aoran
- Ma wangfu
- SU YUCHEN
- LIU CHAOWEI
- LIN WEI
Assignees
- 中国航空工业集团公司西安飞行自动控制研究所
Dates
- Publication Date
- 20260505
- Application Date
- 20251224
Claims (10)
- 1. The centralized storage device of the airborne multi-relation table database is characterized by comprising a multi-relation table storage unit, a data mirror image table processing unit and a transaction management unit; The multi-relation table storage unit stores a data relation list and a data table of a plurality of relation types, wherein each data relation list corresponds to at least one data table; The transaction management unit is used for acquiring a transaction operation instruction and sending the transaction operation instruction to the data mirror image table processing unit, wherein the transaction operation instruction carries identification information of a data relationship list; The data mirror image table processing unit is used for searching whether a corresponding data relation list exists or not from the local based on the transaction operation instruction, if so, acquiring the data table corresponding to the data relation list from the local, and carrying out operation indicated by the transaction operation instruction on the acquired data table, otherwise, acquiring the corresponding data relation list and the data table from the multi-relation table storage unit, and executing corresponding operation, and temporarily storing the updated data relation list and the data table after all the transaction operation instructions are executed, and when preset conditions are met, sending the updated data relation list and the data table to the multi-relation table storage unit to store and cover the original data relation list and the data table of the multi-relation table storage unit.
- 2. The apparatus of claim 1, wherein the data mirror table processing unit is further configured to: When the locally stored data relation list and data table need to be deleted, the updated data relation list and data table are sent to a multi-relation table storage unit; or when the log check point is required to be written, the updated data relation list and the data table are sent to the multi-relation table storage unit.
- 3. The apparatus according to claim 1, wherein the data mirror table processing unit does not find the corresponding data relationship list and the data table from the local based on the transaction operation instruction, the data mirror table processing unit sends the request information to the transaction management unit, the transaction management unit sends the instruction information to the multiple relationship table storage unit after receiving the request information, and the multiple relationship table storage unit sends the corresponding data relationship list and the data table to the data mirror table processing unit based on the instruction information.
- 4. The apparatus according to claim 2, wherein the data mirror table processing unit deletes the data table having the lowest access frequency, the farthest access time interval, and the smallest access number based on the access information of the data table recorded during a period of time when the locally stored data relationship list and the data table need to be deleted.
- 5. The apparatus of claim 4, wherein the data mirroring table processing unit records information of the last K accessed data tables including identification of the accessed data table, access time, and access times through a linked list of size K when the access information of the data table is recorded.
- 6. The apparatus according to claim 1, wherein when the data mirror table processing unit performs the operation indicated by the operation instruction on a certain data table, if other transactions in the transaction management list of the transaction management unit are to modify the certain data table at the same time, the data mirror table processing unit sends a refusal operation instruction to the transaction management unit, the transaction management unit updates the transaction state in the transaction management list to be a delayed modification, and when the certain data table is completed to modify and the transaction management unit receives an execution completion reply, the refused transaction operation is re-executed.
- 7. The apparatus of claim 1, wherein the multiple relationship table storage unit comprises a data table storage module and a data table mirror management module; The data table storage module manages a data relation list and a data table, wherein the data relation list records the relation between the data tables and supports the consistency modification of the associated data tables; the data table mirror image management module analyzes the indication information of the transaction management unit and sends the data table required by the transaction to the data mirror image table processing unit.
- 8. The apparatus of claim 1, wherein the transaction management unit comprises a transaction generation module and a transaction list module; The transaction generating module analyzes the transaction operation instruction and stores the analyzed corresponding transaction in the transaction list module; The transaction list module stores the transaction state corresponding to each transaction operation instruction and the data table related to the transaction operation, and sends instructions to the multi-relation table data storage unit and the data mirror table processing unit, receives reply information of the data mirror table processing unit, and externally sends a database actual operation result set.
- 9. The apparatus of claim 1, wherein the data mirror table processing unit stores the list of data relationships, the modified data table, and the execution state of the corresponding transaction, and wherein when the execution state of the transaction is complete, the instruction is sent to the transaction management unit to update the execution state in the list of transactions.
- 10. A method for the centralized storage of an on-board multi-relational table database according to any one of claims 1 to 9, comprising: The transaction management unit acquires a transaction operation instruction and sends the transaction operation instruction to the data mirror image table processing unit, wherein the transaction operation instruction carries identification information of a data relationship list; The data mirror image table processing unit searches whether a corresponding data relation list exists from the local based on the transaction operation instruction, if so, the data table corresponding to the data relation list is obtained from the local, and the operation indicated by the transaction operation instruction is carried out on the obtained data table; and when the preset condition is met, the updated data relationship list and the data list are sent to the multi-relationship list storage unit to be stored and the original data relationship list and the data list of the multi-relationship list storage unit are covered.
Description
Centralized storage method and device for airborne multi-relation table database Technical Field The invention belongs to the technical field of database safety management in the field of airborne safety keys, and particularly relates to a centralized storage method and device of an airborne multi-relation table database. Background Compared with the traditional database management method, the method has the advantages that the data operation scene in the onboard database is more complex, the real-time performance of data operation is higher, the data flexibility is higher, and the data security requirement is higher. In an airborne safety critical operation environment, the consistency assurance of data among distributed nodes, the concurrent execution data management efficiency and the data safety and reliability are all the difficulties. The method aims at the storage of the airborne database in the prior art, and has the problems that firstly, when transactions are not completed, a modified data table is allowed to be stored in a disk, so that the performance of the database is reduced, secondly, when the data table in a memory is managed, and when the memory does not have redundant space, only the writing time of the data table is considered by deleting the data table in the memory, so that the response speed and the throughput of the database are possibly reduced, thirdly, a single table structure or a memory-based caching mechanism is adopted, and effective support for a multi-table relation is lacked, so that the efficiency is low when associated data are processed. Disclosure of Invention In order to solve the problems in the prior art, when the transaction is not completed, the modified data table is allowed to be stored in the disk, which can cause frequent refreshing of the disk and reduce the performance of the database; when the memory has no redundant space, deleting the data table in the memory only considers the writing time of the data table, which may cause the reduction of the response speed and throughput of the database, and adopting a single table structure or a memory-based caching mechanism, which lacks effective support for multi-table relation and causes low efficiency in processing associated data. The goal is to rationally select the data table to be maintained or replaced in memory to reduce disk I/O operations, improve the locality and overall performance of data access. The technical scheme is as follows: in a first aspect, a centralized storage device of an airborne multiple-relation table database is provided, and the device comprises a multiple-relation table storage unit, a data mirror image table processing unit and a transaction management unit; The multi-relation table storage unit stores a data relation list and a data table of a plurality of relation types, wherein each data relation list corresponds to at least one data table; The transaction management unit acquires a transaction operation instruction and sends the transaction operation instruction to the data mirror image table processing unit, wherein the transaction operation instruction carries identification information of a data relationship list; The data mirror image table processing unit searches whether a corresponding data relation list exists or not from the local based on the transaction operation instruction, if so, the data table corresponding to the data relation list is obtained from the local, and operation indicated by the transaction operation instruction is carried out on the obtained data table, otherwise, the corresponding data relation list and the data table are obtained from the multi-relation table storage unit, and corresponding operation is carried out, the data mirror image table processing unit temporarily stores the updated data relation list and the data table in the local after all the transaction operation instructions are carried out, and when preset conditions are met, the updated data relation list and the data table are sent to the multi-relation table storage unit to be stored and cover the original data relation list and the data table of the multi-relation table storage unit. Further, the method comprises the steps of, The data mirror table processing unit is further configured to: When the locally stored data relation list and data table need to be deleted, the updated data relation list and data table are sent to a multi-relation table storage unit; or when the log check point is required to be written, the updated data relation list and the data table are sent to the multi-relation table storage unit. Optionally, the data mirror table processing unit does not find the corresponding data relationship list and the data table from the local based on the transaction operation instruction, the data mirror table processing unit sends request information to the transaction management unit, the transaction management unit sends indication information to the multi-relationship ta