Method and system for realizing data governance of cruise ship based on block chain and database
By using a blockchain and database-based approach to collect cruise ship business data, analyze data ownership mapping relationships, and calculate storage weights, the problem of data fragmentation in cruise ship data governance is solved, data accuracy and security are achieved, and the continuity and efficiency of cruise ship business are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies for cruise ship data governance suffer from issues such as data fragmentation and inconsistent definitions and labels, leading to difficulties in cross-entity data collaboration. Consequently, the accuracy of data governance, resource utilization, and sharing security fail to meet actual operational needs.
By using a blockchain and database-based approach, cruise ship business data is collected, operational data attributes and data storage identifiers are extracted, data ownership mapping relationships are analyzed, business timestamps are determined using a consensus mechanism, storage weights are calculated, and shared storage writes are executed using a lightweight transaction mechanism to ensure the accuracy and availability of data recovery requirements.
It improves the accuracy of cruise ship data governance, enhances data location efficiency and access performance, ensures that data is stored in an orderly, conflict-free and traceable manner in distributed storage, and supports the continuity and security of cruise ship operations.
Smart Images

Figure CN121636622A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a data governance method and system for cruise ships based on blockchain and database, and belongs to the field of blockchain technology. Background Technology
[0002] Cruise ship data governance is a core component for ensuring cruise ship operational safety, improving service quality, and enhancing operational efficiency. The integrity, consistency, and rationality of the data directly impact critical business operations such as sailing scheduling, passenger services, and maintenance management. Currently, cruise ship business data is characterized by multi-source heterogeneity and massive growth, encompassing multiple dimensions including sailing status data, ticketing transaction data, passenger service data, and equipment maintenance data. Furthermore, data sharing and collaboration must be achieved among multiple distributed nodes, including cruise ships, ports, and operations management centers.
[0003] Currently, large cruise ship operations have deployed more than a dozen digital systems, but most of them are private data platforms, which have problems such as data fragmentation and inconsistent definitions and identifiers. This makes cross-entity data collaboration difficult. In the process of integrating blockchain and databases into cruise ship data governance, existing solutions cannot effectively coordinate the accurate correspondence between data ownership and storage identifiers, the reasonable storage allocation based on consensus mechanisms, and the data recovery guarantee under node synchronization. As a result, in the long-term archiving of cruise ship business data, the accuracy of data governance, resource utilization and sharing security are difficult to meet the actual operational needs. Summary of the Invention
[0004] This invention provides a method and system for data governance of cruise ships based on blockchain and database, the main purpose of which is to improve the accuracy of data governance of cruise ships based on blockchain and database.
[0005] To achieve the above objectives, the present invention provides a data governance method for cruise ships based on blockchain and database, comprising: Collect cruise business data from the blockchain network, extract operational data attributes of the cruise operator and data storage identifiers for database sharding from the cruise business data, and analyze the data ownership mapping relationship between the operational data attributes and the data storage identifiers; The business timestamp of the cruise business data is determined based on the consensus mechanism in the blockchain network, and the storage weight of the cruise business data in different database shards during the long-term archiving process is calculated in combination with the data ownership mapping relationship. Obtain the synchronization status and consistency records of nodes in the blockchain network to analyze the data recovery requirements of the cruise business data entry process; By combining the storage weight, the data recovery requirements, and the data ownership mapping relationship, a lightweight transaction mechanism is used to perform shared storage writes of the cruise ship business data to obtain the storage results.
[0006] Optionally, the step of extracting operational data attributes of the cruise operator and data storage identifiers for database sharding from the cruise business data includes: Obtain on-chain business records from the cruise business data, and extract core data items describing the operational status and key index information for locating sharded storage, so as to construct the extraction path of the operational data attributes and the generation method of data storage identifiers respectively; Based on the extraction path and the generation method, operational data attributes of the cruise operator and data storage identifiers for database sharding are extracted from the cruise business data.
[0007] Optionally, the method for constructing the extraction path of the operational data attributes and the generation method for the data storage identifier based on the core data items and the key index information includes: Filter out the core business fields and sharding association fields from the core data items and the key index information; The core business fields and the sharding association fields are respectively subjected to structural encoding processing to obtain a business field table and a sharding field table, so as to construct the extraction path of the operation data attributes and the generation method of data storage identifier respectively.
[0008] Optionally, analyzing the data ownership mapping relationship between the operational data attributes and the data storage identifier includes: Calculate the structural similarity and distribution overlap between the operational data attributes and the data storage identifier; By combining the structural similarity and the distribution overlap, the data attribution mapping relationship between the operational data attributes and the data storage identifier is analyzed.
[0009] Optionally, the step of calculating the storage weight of cruise business data in different database shards during the long-term archiving process, based on the data ownership mapping relationship, includes: Read the cumulative access records of the cruise business data since it was written to storage to calculate the recent access frequency of the data; Obtain the legal and compliance requirements of the business contracts involved in the cruise business data in order to calculate the mandatory retention period for the data; By combining the business timestamp, the data ownership mapping relationship, the recent access popularity, and the mandatory retention period value, the storage weight of the cruise business data in the long-term archiving process is calculated.
[0010] Optionally, the step of calculating the storage weight of the cruise business data in the long-term archiving process by combining the business timestamp, the data ownership mapping relationship, the recent access popularity, and the mandatory retention period value includes: Based on the data attribution mapping relationship and the business timestamp, determine the mapping health and time decay coefficient corresponding to the cruise business data; Based on the mandatory retention period value, the retention threshold corresponding to the cruise business data is calculated, and combined with the mapping health, the time decay coefficient, and the recent access popularity, the storage weight of the cruise business data in the long-term archiving process is calculated.
[0011] Optionally, calculating the retention threshold corresponding to the cruise business data based on the mandatory retention period value includes: Identify the mandatory retention period category associated with the cruise business data; Assess the urgency of each piece of business data relative to its remaining timeframe and calculate the compliance weight of its category to determine the retention threshold for the cruise business data.
[0012] Optionally, the data recovery requirements for analyzing the cruise ship business data entry process include: Based on the synchronization state, the data synchronization integrity of the nodes in the blockchain network is calculated, and the synchronization delay deviation of the nodes in the blockchain network is determined. Based on the consistency record, the consistency fit of the cruise business data is calculated, and the data recovery requirements of the cruise business data entry process are analyzed by combining the data synchronization integrity and the synchronization delay deviation.
[0013] Optionally, the analysis of data recovery requirements in the cruise business data entry process, combining the data synchronization integrity, synchronization delay deviation, and consistency fit, includes: Based on the data synchronization integrity, the synchronization delay deviation, and the consistency fit, the recovery priority of the cruise business data is calculated. Based on the recovery priority, the data recovery requirements of the cruise business data entry process are analyzed.
[0014] To address the aforementioned issues, this invention also provides a data governance system for cruise ships based on blockchain and databases, the system comprising: The mapping relationship analysis module is used to collect cruise business data in the blockchain network, extract the operational data attributes of the cruise operator and the data storage identifier used for database sharding from the cruise business data, and analyze the data ownership mapping relationship between the operational data attributes and the data storage identifier. The storage weight calculation module is used to determine the business timestamp of the cruise business data based on the consensus mechanism in the blockchain network, and calculate the storage weight of the cruise business data in different database shards during the long-term archiving process in combination with the data ownership mapping relationship. The recovery requirement analysis module is used to obtain the synchronization status and consistency records of nodes in the blockchain network in order to analyze the data recovery requirements of the cruise business data entry process; The data processing module is used to combine the storage weight, the data recovery requirements, and the data ownership mapping relationship, and use a lightweight transaction mechanism to perform shared storage writes of the cruise ship business data to obtain storage results.
[0015] Compared to the problems described in the background technology, this invention, by extracting operational data attributes and data storage identifiers from blockchain cruise business data, can clarify the physical distribution logic of cruise operation information in distributed storage, providing a structural basis for blockchain-based cruise business data query and shard management, effectively improving data location efficiency and access performance. Furthermore, by utilizing the event sequence solidified in the blockchain network consensus process, this invention assigns an immutable business timestamp to cruise business data, and combined with the attribution mapping analysis between data and storage shards, it can quantify the value and cost balance point of each piece of business data in the long-term preservation system, thus providing a direct basis for the differentiated allocation of archival resources. Next, this process adopts… By integrating the synchronization status and consistency records of blockchain nodes, this invention clarifies the recovery standards for data loss or anomalies during the cruise ship business data entry process, ensuring the accuracy and availability of recovered data and preventing data issues from affecting the continuity of cruise ship operations. Subsequently, this embodiment of the invention integrates storage weights, data recovery requirements, and data ownership mapping relationships, coupled with a lightweight transaction mechanism to complete shared storage writes. This approach balances data storage priority, reliability requirements, and ownership adaptability, ensuring that cruise ship business data is stored in an orderly, conflict-free, and traceable manner in distributed storage. This provides a solid foundation for subsequent data access and recovery. Therefore, this invention can improve the accuracy of data governance for cruise ships based on blockchain and databases. Attached Figure Description
[0016] Figure 1 A flowchart illustrating a data governance method for cruise ships based on blockchain and database, provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the data extraction process in a data governance method for cruise ships based on blockchain and database, provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of a module for implementing the data governance method for cruise ships based on blockchain and database, provided in an embodiment of the present invention; Figure 4A schematic diagram of a computer device for implementing a data governance method for cruise ships based on blockchain and database, according to an embodiment of the present invention; The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0017] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0018] This application provides a data governance method for cruise ships based on blockchain and database. The executing entity of this data governance method for cruise ships includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the data governance method for cruise ships based on blockchain and database can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.
[0019] Reference Figure 1 The diagram shown is a flowchart illustrating a data governance method for cruise ships based on blockchain and database, according to an embodiment of the present invention. In this embodiment, the data governance method for cruise ships based on blockchain and database includes: S1. Collect cruise business data from the blockchain network, extract the operational data attributes of the cruise operator and the data storage identifiers used for database sharding from the cruise business data, and analyze the data ownership mapping relationship between the operational data attributes and the data storage identifiers.
[0020] This invention extracts operational data attributes and data storage identifiers from blockchain cruise business data, which clarifies the physical distribution logic of cruise operation information in distributed storage. This provides a structural basis for blockchain-based cruise business data query and shard management, effectively improving data location efficiency and access performance.
[0021] The cruise business data refers to a set of structured or semi-structured data recorded in the blockchain network that reflects cruise operation activities, such as passenger ticketing records, voyage information, and supply chain logs. The operational data attributes refer to key feature items extracted from the business data to describe the cruise operation status, such as a combination of "voyage number + departure port + number of passengers + sailing date". The data storage identifier refers to a unique identifier used to locate the data storage location in a distributed database sharding architecture, such as a composite identifier of "sharding key + block hash + smart contract address". Furthermore, the cruise business data in the blockchain network can be collected and preliminarily cleaned through a data access module to ensure data integrity and consistency. The data access module is compiled using the Go language.
[0022] Figure 2 This is a schematic diagram of the data extraction process in a data governance method for cruise ships based on blockchain and database, provided by an embodiment of the present invention.
[0023] As an embodiment of the present invention, the step of extracting operational data attributes of the cruise operator and data storage identifiers for database sharding from the cruise business data includes: S201: Obtain the on-chain business records in the cruise business data, and extract the core data items describing the operational status and the key index information used to locate the sharded storage, so as to construct the extraction path of the operational data attributes and the generation method of the data storage identifier respectively; S202: Based on the extraction path and the generation method, extract the operational data attributes of the cruise operator and the data storage identifier for database sharding from the cruise business data.
[0024] The on-chain business record refers to a data unit that records specific business activities of the cruise ship, confirmed and persistently stored through blockchain consensus. This includes block data containing transaction hashes, timestamps, smart contract addresses, input parameters, and execution results. The core data items are elements extracted from the on-chain business record that directly reflect the key operational status and facts of the cruise ship, such as voyage number, number of passengers, cabin class, port code, and ticket price. The key index information is information generated or pre-defined in the on-chain business record along with business logic, used to indicate which physical storage shard the record should belong to, such as a range identifier based on voyage date, operating company code, and route area code. The extraction path refers to the deterministic sequence of steps followed in locating, parsing, and combining core data items from the original on-chain business record to form standardized operational data attributes, based on business logic and data specifications. The generation method refers to the calculation or encoding process used to convert key index information into a unique data storage identifier that can be directly mapped to a specific storage node, according to predefined sharding logic.
[0025] Optionally, on-chain business records from cruise ship business data can be obtained through a blockchain client plugin and a distributed storage connector. The plugin adapts to the blockchain node interface to read data, while the connector connects to distributed storage systems such as HBase to assist in index positioning. Alternatively, a data parsing pipeline can be used to extract core data items and key index information from on-chain business records. This pipeline includes three stages: block structure parsing, business field filtering, and index information extraction, respectively completing block data disassembly, operation-related field filtering, and storage-related information extraction. Furthermore, path traversal parsing and identifier rule matching technologies can be used to extract operational data attributes by traversing on-chain business records layer by layer based on the extraction path. Key index information is then combined according to the generation method to generate data storage identifiers, ensuring that the extraction results are consistent with the positioning requirements of blockchain storage sharding.
[0026] Optionally, the method for constructing the extraction path of the operational data attributes and the generation method for the data storage identifier based on the core data items and the key index information includes: Filter out the core business fields and sharding association fields from the core data items and the key index information; The core business fields and the sharding association fields are respectively subjected to structural encoding processing to obtain a business field table and a sharding field table, so as to construct the extraction path of the operation data attributes and the generation method of data storage identifier respectively.
[0027] The core business fields are essential data units selected from the core data items to fully define and distinguish different cruise ship operating entities, such as "unique voyage code, ship identifier, departure and arrival port pair, and planned sailing period." The fragmented association fields are fields selected from the key index information whose value range or specific values directly determine which physical storage segment a record should fall into in the distributed database, such as "the year / quarter of the voyage, the geographical region of the route, and the ticketing sales channel code." The structure encoding process refers to the process of format conversion, standardization mapping, and validity verification of the original field values according to the data specifications and type constraints of the target system. For example, converting unstructured port names to international port codes and splitting time intervals into start and end timestamps. The business field table and fragmented field table are structured lists with clearly defined columns and standardized data values formed after structure encoding processing, serving as inputs for attribute extraction and identifier generation, respectively.
[0028] Optionally, when filtering fields, based on the entity-attribute model of the cruise business domain, fields constituting the business primary key or key facts are selected as core business fields; based on the pre-sharding scheme of the underlying distributed database, fields designated as components of the partition key are selected as sharding association fields, such as HBase and Cassandra. During structure encoding processing, a business rule validator and standard formatter are applied to the core business fields, such as verifying the existence of port codes and ensuring the unified currency unit is US dollars; a range normalizer and encoding converter are applied to the sharding association fields. When constructing the business field table, the processed core business fields are organized into a table structure with rows as records and columns as fields. When constructing the sharding field table, the processed sharding association fields are also organized into a table structure. When defining the extraction path, a processing function is written that reads a row from the business field table, fills in the corresponding field values according to predefined structured templates such as "Basic Cruise Information," "Operating Resource Information," and "Financial Indicator Information," and finally outputs a complete operational data attribute object. When defining the generation method, write a calculation function that reads a row from the sharding field table, concatenates the values of the "Annual Quarter" and "Geographic Region ID" fields according to the configured sharding algorithm, calculates its hash value, and takes the modulo of the total number of shards to generate the final data storage identifier.
[0029] As an embodiment of the present invention, the analysis of the data ownership mapping relationship between the operational data attributes and the data storage identifier includes: Calculate the structural similarity and distribution overlap between the operational data attributes and the data storage identifier; By combining the structural similarity and the distribution overlap, the data attribution mapping relationship between the operational data attributes and the data storage identifier is analyzed.
[0030] The structural similarity refers to a static correspondence metric obtained by comparing the consistency of the attribute structure and the identifier structure in terms of field composition, order, and type, which measures the formal association between the two; the distribution overlap refers to a dynamic consistency metric obtained by statistically analyzing the frequency of co-occurrence of the attribute values and identifier values corresponding to the same business entity in the sharding space, which measures the degree of actual distribution overlap between the two.
[0031] Optionally, the structural similarity between the operational data attribute and the data storage identifier can be calculated using methods based on edit distance or field matching rate; the distribution overlap between the operational data attribute and the data storage identifier can be calculated using methods based on co-occurrence statistics and shard distribution histograms; combining the structural similarity and the distribution overlap, the data attribution mapping relationship between the operational data attribute and the data storage identifier is analyzed. First, a comprehensive mapping health score is calculated by geometrically averaging the two to quantify the quality of the overall mapping relationship; then, a judgment is made based on the score: if the score is higher than a preset threshold, the current mapping relationship is determined to be balanced and effective; if it is lower than the threshold, a mismatch is determined, and targeted optimization actions are triggered, such as adjusting the data sharding strategy or migrating storage units.
[0032] S2. Based on the consensus mechanism in the blockchain network, determine the business timestamp of the cruise business data, and in conjunction with the data ownership mapping relationship, calculate the storage weight of cruise business data in different database shards during the long-term archiving process.
[0033] This invention utilizes the event sequence solidified by the consensus process of a blockchain network to assign an immutable business timestamp to cruise business data. Combined with the attribution mapping analysis between data and storage shards, it quantifies the value and cost balance point of each piece of business data in the long-term preservation system, thus providing a direct basis for the differentiated allocation of archiving resources. The business timestamp refers to the logical time marker recorded after the blockchain network reaches a consensus on the order in which data is uploaded to the chain. Independent of the server system time, it represents the generally accepted order of occurrence of business events in an untrusted environment. The storage weight is a quantitative indicator used to guide the priority of cruise business data retention during long-term archiving and the amount of storage resources allocated to it. It determines the storage location and retention duration of data in different shards of the archived database. Furthermore, after nodes in the blockchain network jointly verify the validity of the cruise business data and reach a consensus, the time recorded when the corresponding block is confirmed by the network is used as the business timestamp, ensuring the immutability and consistency of the time record.
[0034] As an embodiment of the present invention, the step of calculating the storage weight of cruise business data in different database shards during the long-term archiving process, based on the data attribution mapping relationship, includes: Read the cumulative access records of the cruise business data since it was written to storage to calculate the recent access frequency of the data; Obtain the legal and compliance requirements of the business contracts involved in the cruise business data in order to calculate the mandatory retention period for the data; By combining the business timestamp, the data ownership mapping relationship, the recent access popularity, and the mandatory retention period value, the storage weight of the cruise business data in the long-term archiving process is calculated.
[0035] The recent access popularity refers to the number and frequency of successful accesses to business data within the most recent preset period, based on historical query logs, to reflect its practical value in the near future. The preset period can be the past 90 days. The mandatory retention period refers to the minimum time that the data must be properly preserved, as clearly stipulated by the terms of the associated voyage contract, passenger insurance, maritime regulations, etc.
[0036] Optionally, the access log statistics module of the distributed storage can be used to read the cumulative access records of the cruise business data since it was written to the storage. The access log statistics module is compiled by the JAVA language. The mandatory retention period can be automatically identified and extracted by parsing the code of the smart contract on the blockchain or the associated legal text entries. The recent access popularity can be obtained by querying the database audit log or application layer access log and counting the number of accesses within the rolling time window.
[0037] Optionally, the step of calculating the storage weight of the cruise business data in the long-term archiving process by combining the business timestamp, the data ownership mapping relationship, the recent access popularity, and the mandatory retention period value includes: Based on the data attribution mapping relationship and the business timestamp, determine the mapping health and time decay coefficient corresponding to the cruise business data; Based on the mandatory retention period value, the retention threshold corresponding to the cruise business data is calculated, and combined with the mapping health, the time decay coefficient, and the recent access popularity, the storage weight of the cruise business data in the long-term archiving process is calculated.
[0038] The mapping health score refers to a quantitative score obtained by matching and analyzing the key range division, physical distribution location, access frequency, and growth trend of the current storage shards of the data. It reflects the rationality of the data distribution and access efficiency in the existing storage architecture. The time decay coefficient is a factor less than or equal to 1 calculated by a preset decay function based on the difference between the current time and the business timestamp. It is used to characterize the degree of natural decay of the data value over time. The retention threshold is a dynamic value related to the mandatory retention period. It is obtained by calculating the number of days remaining until the expiration date of the period and converting it into a reverse indicator. The fewer the remaining days, the higher the threshold, which means that the data is under greater pressure to be retained in compliance.
[0039] Optionally, the parameters can be calculated using the following methods: The calculation of mapping health can be derived by combining the load balancing score of the storage unit (Region) where the data is located, and the overlap between the data access pattern and the storage unit location (data locality); The calculation of the time decay coefficient can be performed using the formula, where is the decay rate constant and is the difference between the current time and the business timestamp; The final calculation of storage weight can use mapping health and recent access popularity as positive gain factors, and the time decay coefficient as a negative decay factor, and use the retention threshold to weight and amplify the combined result of the first two. The specific formula can be designed as: Storage weight = retention threshold × (mapping health × popularity factor) / time decay coefficient.
[0040] Optionally, calculating the retention threshold corresponding to the cruise business data based on the mandatory retention period value includes: Identify the mandatory retention period category associated with the cruise business data; Assess the urgency of each piece of business data relative to its remaining timeframe and calculate the compliance weight of its category to determine the retention threshold for the cruise business data.
[0041] The mandatory retention period category refers to the type of data classified according to the legal source and business importance of the data, such as "maritime safety supervision", "passenger contract dispute", and "financial audit record". Different categories represent different compliance risks and business values. The remaining time urgency refers to the quantified reciprocal of the time interval between the current time and the expiration date of the mandatory retention period. The shorter the interval, the higher the urgency. The compliance weight refers to the importance coefficient preset according to different period categories, reflecting the mandatory priority of data of that category in archiving and preservation.
[0042] Optionally, when identifying mandatory retention period categories, the tags in the blockchain smart contract metadata or related business documents can be parsed first, mapping the period value to a preset category system. When assessing the urgency of the remaining time, the difference in days between the current date and the expiration date is directly calculated, using the formula Urgency = 1 / (Remaining Days + 1) to ensure that urgency is 1 when the remaining days are 0. When determining compliance weights, values are assigned according to a preset category-weight mapping table; for example, the weight for "Maritime Safety Supervision" is 1.0, and the weight for "Financial Audit Reference" is 0.6. When comprehensively calculating the retention threshold, a product formula is used: Retention Threshold = Compliance Weight × Remaining Time Urgency. The higher this value, the greater the urgency that the data must be fully retained in the short term due to compliance requirements.
[0043] S3. Obtain the synchronization status and consistency records of nodes in the blockchain network to analyze the data recovery requirements of the cruise business data entry process.
[0044] This process, by collecting the synchronization status and consistency records of blockchain nodes, clarifies the recovery standards for data loss or anomalies during the cruise business data entry process, ensuring the accuracy and availability of recovered data and preventing disruptions to cruise operations due to data issues. The synchronization status refers to the degree of matching and synchronization progress between each node in the blockchain network and the main chain data; the consistency records are the set of verification results formed through consensus verification between nodes, including block hash matching records, transaction signature consistency identifiers, and data integrity verification logs; the data recovery requirements are determined by comprehensively considering node synchronization status and data consistency levels, specifying the priority and integrity standards that recovery operations must meet. The synchronization status and consistency records of nodes in the blockchain network can be obtained through API interfaces of blockchain clients such as HyperledgerBesu, JSON-RPC standard interfaces, the block query function of blockchain explorers, node local synchronization log parsing tools, and consensus verification record export modules.
[0045] As an embodiment of the present invention, the data recovery requirements for analyzing the cruise ship business data entry process include: Based on the synchronization state, the data synchronization integrity of the nodes in the blockchain network is calculated, and the synchronization delay deviation of the nodes in the blockchain network is determined. Based on the consistency record, the consistency fit of the cruise business data is calculated, and the data recovery requirements of the cruise business data entry process are analyzed by combining the data synchronization integrity and the synchronization delay deviation.
[0046] The data synchronization integrity refers to a quantitative indicator reflecting the data completeness and internal consistency, calculated by checking whether the blocks locally stored by a blockchain node constitute a continuous and verified chain extending from the genesis block to the latest height. The synchronization delay deviation refers to a value reflecting the degree of data lag of a node, calculated by comparing the current block height of a node with the network's recognized valid chain height. This deviation can be expressed as a difference in the number of blocks or a difference in timestamps. The consistency fit refers to an indicator reflecting the legitimacy of a node's data and the degree of consensus compliance, calculated by analyzing key identifiers such as historical block hashes and the world state root recorded by the node and comparing them with authoritative records that have finally reached consensus on the network.
[0047] Optionally, when calculating data synchronization integrity, the latest block height H stored by the node can be obtained first. Then, starting from the genesis block, the hash pointer of each block is checked sequentially to see if it continuously points to the next block, and the validity of its digital signature or proof-of-work is verified. The longest consecutive and valid block sequence length L is calculated, and the data synchronization integrity = L / H. When determining the synchronization delay deviation, the latest consensus block height H2 of multiple trusted nodes in the network, such as beacon nodes or the majority of active nodes, can be obtained periodically, and the difference ΔH = H2 - H between the target node's height H and the target node's height can be calculated. This ΔH is used as the synchronization delay deviation. When calculating the consistency fit, all block hashes and world state roots recorded in the past N confirmation cycles can be extracted from the node's local history and compared item by item with the corresponding records obtained from the network's authoritative sources. The proportion of matching items is calculated, and this proportion is the consistency fit. Network authoritative sources include blockchain explorer APIs and majority node query results.
[0048] Optionally, the analysis of data recovery requirements in the cruise business data entry process, combining the data synchronization integrity, synchronization delay deviation, and consistency fit, includes: Based on the data synchronization integrity, the synchronization delay deviation, and the consistency fit, the recovery priority of the cruise business data is calculated. Based on the recovery priority, the data recovery requirements of the cruise business data entry process are analyzed.
[0049] The recovery priority is a numerical value calculated by comprehensively considering data synchronization integrity, synchronization delay deviation, and consistency. It indicates the urgency and importance of restoring cruise ship business data due to abnormal node status. This priority determines the order in which the system allocates resources to perform restoration when multiple data items or nodes have simultaneous restoration needs.
[0050] Optionally, based on the recovery priority, the data recovery requirements of the cruise business data entry process are analyzed. If the value is higher, it indicates that the reliability and timeliness of the data at that node deviate more seriously, and an active and comprehensive recovery process needs to be triggered immediately. If the value is lower, it indicates that the node is basically healthy and only needs to be included in the regular monitoring and incremental synchronization plan, or there is no need to perform specific recovery operations immediately.
[0051] Optionally, as another optional embodiment of the present invention, the recovery priority of the cruise business data is calculated using the following formula, combining the data synchronization integrity, the synchronization delay deviation, and the consistency fit:
[0052] Where P represents the recovery priority of cruise business data, C represents the data synchronization integrity, D-norm represents the synchronization delay deviation, and A represents the consistency fit.
[0053] Before calculating the above formula, the dimensions of the data synchronization integrity, the synchronization delay deviation and the consistency fit need to be unified to ensure the unit consistency in the calculation process. Furthermore, (1-C), D-norm and (1-A) in the formula represent the data missing risk, data outdated risk and data error risk, respectively.
[0054] S4. Combining the storage weight, the data recovery requirements, and the data ownership mapping relationship, a lightweight transaction mechanism is used to perform shared storage write of the cruise ship business data to obtain the storage result.
[0055] This invention integrates storage weights, data recovery requirements, and data ownership mapping relationships, coupled with a lightweight transaction mechanism to complete shared storage writes. This approach balances data storage priority, reliability requirements, and ownership compatibility, ensuring that cruise ship business data is stored in an orderly, conflict-free, and traceable manner within distributed storage, providing a solid foundation for subsequent data access and recovery. The lightweight transaction mechanism is based on multi-version concurrency control, using a metadata table to record complete data state version numbers for snapshot reads. This avoids the additional overhead of distributed transactions, ensuring an efficient concurrency control method that guarantees atomicity and conflict-free data writes in shared storage, aligning with the characteristics of blockchain distributed storage and the requirement for data immutability. Furthermore, combining the storage weight, data recovery requirements, and data ownership mapping relationship, a lightweight transaction mechanism is used to perform shared storage writes of the cruise ship business data to obtain storage results. The specific steps are as follows: First, based on the data ownership mapping relationship, determine the specific storage shard to which the data should be written, such as a table or region, and combine the storage weight and data recovery requirements to determine the transaction guarantee level and operation order for this write; then, drive the lightweight transaction mechanism to allocate a new version number according to the above calculation results, and write the data to multiple target shards in atomic operations, while ensuring that either all succeed and update the global version snapshot, or all fail and roll back; finally, generate a storage result receipt containing a success identifier, a new version number, and the actual storage location to complete the write.
[0056] like Figure 3 The diagram shown is a functional module diagram of the data governance system for cruise ships based on blockchain and database, as implemented in this invention.
[0057] The data governance system 300 for cruise ships based on blockchain and database described in this invention can be installed in an electronic device. Depending on the functions implemented, the data governance system 300 for cruise ships based on blockchain and database may include a mapping relationship analysis module 301, a storage weight calculation module 302, a recovery requirement analysis module 303, and a data processing module 304. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, stored in the memory of the electronic device.
[0058] In this embodiment of the invention, the functions of each module / unit are as follows: The mapping relationship analysis module 301 is used to collect cruise business data in the blockchain network, extract the operational data attributes of the cruise operator and the data storage identifier for database sharding from the cruise business data, and analyze the data ownership mapping relationship between the operational data attributes and the data storage identifier. The storage weight calculation module 302 is used to determine the business timestamp of the cruise business data based on the consensus mechanism in the blockchain network, and calculate the storage weight of cruise business data in different database shards during the long-term archiving process in combination with the data ownership mapping relationship. The recovery requirement analysis module 303 is used to obtain the synchronization status and consistency records of nodes in the blockchain network in order to analyze the data recovery requirements of the cruise business data entry process; The data processing module 304 is used to combine the storage weight, the data recovery requirements and the data ownership mapping relationship, and use a lightweight transaction mechanism to perform shared storage writing of the cruise business data to obtain the storage result.
[0059] In detail, the modules in the data governance system 300 for cruise ships based on blockchain and database described in this embodiment of the invention adopt the same approach as described above when in use. Figure 1 The data governance method for cruise ships based on blockchain and databases described in the article uses the same technical means and can produce the same technical effects, so it will not be elaborated here.
[0060] In one embodiment, a computer device is provided, which may be a server or a client, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a data governance method for cruise ships based on blockchain and database on the server or client side.
[0061] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0062] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0063] Finally, it should be noted that in the above embodiments, each embodiment can be combined with each other or independent. Deleting any one of them will not affect the technical implementation of other embodiments. The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for data governance of a cruise ship based on a blockchain and a database, characterized in that, The method comprises: Collecting cruise business data in a blockchain network, extracting operation data attributes of a cruise operator and data storage identifiers for database sharding from the cruise business data, and analyzing data ownership mapping relationships between the operation data attributes and the data storage identifiers; Determining a business timestamp of the cruise business data based on a consensus mechanism in the blockchain network, and calculating storage weights of cruise business data in different database shards in a long-term archiving process in combination with the data ownership mapping relationships; Obtaining synchronization states and consistency records of nodes in the blockchain network to analyze data recovery requirements of the cruise business data entry process; In combination with the storage weights, the data recovery requirements, and the data ownership mapping relationships, performing shared storage writing of the cruise business data using a lightweight transaction mechanism to obtain a storage result.
2. The method for data governance of cruise ships based on blockchain and database according to claim 1, wherein, The extraction of operation data attributes of a cruise operator and data storage identifiers for database sharding from the cruise business data comprises: Obtaining on-chain business records in the cruise business data, and extracting core data items describing operation states and key index information for locating shard storage to respectively construct an extraction path of the operation data attributes and a generation method of the data storage identifiers; Based on the extraction path and the generation method, extracting operation data attributes of a cruise operator and data storage identifiers for database sharding from the cruise business data. 3.The method of claim 2, wherein, The construction of the extraction path of the operation data attributes and the generation method of the data storage identifiers based on the core data items and the key index information comprises: Filtering core business fields and shard association fields in the core data items and the key index information; Respectively performing structure coding processing on the core business fields and the shard association fields to obtain a business field table and a shard field table to respectively construct the extraction path of the operation data attributes and the generation method of the data storage identifiers.
4. The method for data governance of cruise ships based on blockchain and database according to claim 1, wherein, The analysis of data ownership mapping relationships between the operation data attributes and the data storage identifiers comprises: Calculating structural similarity and distribution overlap between the operation data attributes and the data storage identifiers; In combination with the structural similarity and the distribution overlap, analyzing data ownership mapping relationships between the operation data attributes and the data storage identifiers.
5. The method for data governance of cruise ships based on blockchain and database according to claim 1, wherein, The calculation of storage weights of cruise business data in different database shards in a long-term archiving process in combination with the data ownership mapping relationships comprises: Reading cumulative access records of the cruise business data since being written into storage to calculate recent access heat of data; Obtaining legal and compliance requirements of business contracts related to the cruise business data to calculate a mandatory retention period value of data; In combination with the business timestamp, the data ownership mapping relationships, the recent access heat, and the mandatory retention period value, calculating storage weights of the cruise business data in a long-term archiving process.
6. The method for data governance of cruise ships based on blockchain and database according to claim 5, wherein, The combination of the business timestamp, the data ownership mapping relationship, the recent access heat and the mandatory retention period value, the storage weight of the cruise business data in the long-term archiving process is calculated, including: Based on the data ownership mapping relationship and the business timestamp, the mapping health degree and the time decay coefficient corresponding to the cruise business data are determined; According to the mandatory retention period value, the retention criticality corresponding to the cruise business data is calculated, combined with the mapping health degree, the time decay coefficient and the recent access heat, to calculate the storage weight of the cruise business data in the long-term archiving process.
7. The method for data governance of cruise ships based on blockchain and database according to claim 6, wherein, According to the mandatory retention period value, the retention criticality corresponding to the cruise business data is calculated, including: Identify the mandatory retention period category associated with the cruise business data; Evaluate the remaining time urgency of each business data relative to its period, and calculate the compliance weight of its category to obtain the retention criticality corresponding to the cruise business data.
8. The method for data governance of cruise ships based on blockchain and database according to claim 1, wherein, The analysis of the data recovery requirement of the cruise business data entry process includes: Based on the synchronization state, the data synchronization integrity of the nodes in the blockchain network is calculated, and the synchronization delay deviation of the nodes in the blockchain network is determined; Based on the consistency record, the consistency fit degree of the cruise business data is calculated, combined with the data synchronization integrity and the synchronization delay deviation, to analyze the data recovery requirement of the cruise business data entry process. 9.The method of claim 8, wherein, The combination of the data synchronization integrity, the synchronization delay deviation and the consistency fit degree, the analysis of the data recovery requirement of the cruise business data entry process includes: Combined with the data synchronization integrity, the synchronization delay deviation and the consistency fit degree, the recovery priority of the cruise business data is calculated; Based on the recovery priority, the data recovery requirement of the cruise business data entry process is analyzed.
10. A data governance system for a cruise ship implemented based on a blockchain and a database, characterized in that, The system includes: A mapping relationship analysis module is used to collect cruise business data in a blockchain network, extract operation data attributes about a cruise operator and data storage identifiers for database shards from the cruise business data, and analyze the data ownership mapping relationship between the operation data attributes and the data storage identifiers; A storage weight calculation module is used to determine the business timestamp of the cruise business data based on the consensus mechanism in the blockchain network, and to calculate the storage weight of the cruise business data in the long-term archiving process in different database shards combined with the data ownership mapping relationship; A recovery requirement analysis module is used to obtain the synchronization state and consistency record of the nodes in the blockchain network to analyze the data recovery requirement of the cruise business data entry process; A data processing module is used to combine the storage weight, the data recovery requirement and the data ownership mapping relationship to execute shared storage writing of the cruise business data using a lightweight transaction mechanism to obtain a storage result.